maven-plugin

Activation in my maven profile is ignored (profile always executed) using file exist

你说的曾经没有我的故事 提交于 2019-12-02 03:59:33
I am using activation based on file exists in my pom.xml. However, my profile is ALWAYS executed, no matter what. Here is the profile description: <profile> <id>copy</id> <activation> <file> <exists>file.xml</exists> </file> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>copy-resources</id> <phase>validate</phase> <configuration> <target name="copy and rename file"> <copy file="${basedir}/src/main/resources/application.${env}.properties" tofile="${basedir}/src

What is the difference between executions and configurations in a maven plugin?

余生长醉 提交于 2019-12-02 03:56:13
问题 I found this description but it does not seem comprehensive. Could someone explain in detail what is the difference between executions and configurations in a maven plugin? 回答1: An <execution> causes the plugin to be executed during the maven build lifecycle, i.e. during your build. The <configuration> allows you to configure the plugin for how it should behave during execution. Many Maven plugins provide documentation about their configuration options, e.g. the maven-compiler-plugin. You can

Get clean machine-friendly Maven lines/xml/json output parseable by scripts in STDOUT?

假装没事ソ 提交于 2019-12-02 01:45:25
问题 For example, run this command with for a maven project: mvn dependency:list What I need from Maven is only these two lines (cut out from the output below): com.example.code_samples.maven_dependencies:direct_library:jar:0.0.1-SNAPSHOT:compile com.example.code_samples.maven_dependencies:indirect_library:jar:0.0.1-SNAPSHOT:compile Is there a way (CLI --option ) to see only this requested info in clean lines, xml, json, ...? Instead, the output looks more like an unstructured log. It has no known

What is the difference between executions and configurations in a maven plugin?

只谈情不闲聊 提交于 2019-12-01 23:48:28
I found this description but it does not seem comprehensive. Could someone explain in detail what is the difference between executions and configurations in a maven plugin? An <execution> causes the plugin to be executed during the maven build lifecycle, i.e. during your build. The <configuration> allows you to configure the plugin for how it should behave during execution. Many Maven plugins provide documentation about their configuration options, e.g. the maven-compiler-plugin . You can define <configuration> s on the <plugin> level or the <execution> level. The former is globally valid for

compiling project with jdk1.5 using maven2

≯℡__Kan透↙ 提交于 2019-12-01 19:20:17
问题 i managed to create my project structure using maven2. but when am compiling my project using mvn install getting error generics are not supported in -source 1.3 googled to build my project using jdk1.5 and added build tag <project> <modelVersion>4.0.0</modelVersion> <groupId>com.myProject</groupId> <artifactId>project</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>myapp</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>junit<

compiling project with jdk1.5 using maven2

旧街凉风 提交于 2019-12-01 19:01:42
i managed to create my project structure using maven2. but when am compiling my project using mvn install getting error generics are not supported in -source 1.3 googled to build my project using jdk1.5 and added build tag <project> <modelVersion>4.0.0</modelVersion> <groupId>com.myProject</groupId> <artifactId>project</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>myapp</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <

Unable to invoke avro-maven plugin

浪尽此生 提交于 2019-12-01 18:04:44
My question is similar to Unable to compile and create .avro file from .avsc using Maven I have tried all possible things, checked the maven project 100 times, still i am not able to run the avro-maven plugin to generate the code for my avsc file. i have read the following posts and followed the same, but to no success http://grepalex.com/2013/05/24/avro-maven/ https://github.com/phunt/avro-maven-plugin i downloaded the above maven project, and here also the result is same. [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------

Unable to invoke avro-maven plugin

这一生的挚爱 提交于 2019-12-01 17:18:29
问题 My question is similar to Unable to compile and create .avro file from .avsc using Maven I have tried all possible things, checked the maven project 100 times, still i am not able to run the avro-maven plugin to generate the code for my avsc file. i have read the following posts and followed the same, but to no success http://grepalex.com/2013/05/24/avro-maven/ https://github.com/phunt/avro-maven-plugin i downloaded the above maven project, and here also the result is same. [INFO] Scanning

maven goal doesn't execute properly if plugins are defined under pluginManagement

让人想犯罪 __ 提交于 2019-12-01 17:09:08
问题 I have maven-jaxb2-plugin. I generate jaxb objects and refer it in other classes of project.I've put jaxb plugin and compiler plugin under pluginManagement tag. Maven is executing compile phase first than generate phase where as if i remove pluginManagement tag, it works fine, first generate phase gets executed and all jaxb object gets generated and then compile phase gets executed. Due to pluginManagement tag, my project doesn't compile. Is pluginManagement tag used only for defining all the

Maven plugin executes multiple times during build

北战南征 提交于 2019-12-01 16:28:16
问题 I have a Maven project with multiple overlapping profiles. I want to display the active profiles at the beginning of every build. So I put the following into the pom.xml <build> section: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-help-plugin</artifactId> <version>2.1.1</version> <executions> <execution> <id>display-active-profiles-at-start-of-build</id> <phase>validate</phase> <goals> <goal>active-profiles</goal> </goals> </execution> </executions> </plugin> The