maven-antrun-plugin

Maven antrun with sequential ant-contrib fails to run

我的未来我决定 提交于 2019-12-01 02:03:32
问题 We have a special routine to explode files in a subfolder into extensions, which will be copied and jared into single extension files. For this special approach I wanted to use the maven-antrun-plugin , for the sequential iteration and jar packaging through the dirset, we need the library ant-contrib. The upcoming plugin configuration fails with an error. What did I misconfigured? Thank you. Plugin configuration <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun

How to execute tasks conditionally using the maven-antrun-plugin?

懵懂的女人 提交于 2019-11-30 07:27:27
I need to execute some ant commands depending on an environment variable passed in as a parameter to the maven build command. At the moment I have 3 tasks blocks and only the tasks block with no condition is being executed. <tasks name="isProdCheck"> <condition property="isProd"> <equals arg1="${environment}" arg2="PROD" /> </condition> </tasks> <tasks if="isProd" depends="isProdCheck"> ... </tasks> <tasks> ... I am the only block executed </tasks> What am I doing wrong, is there a better way to do this? First, according to Maven 1.x website, the current stable release for maven 1.x is version

Maven Antrun and Dependencies

混江龙づ霸主 提交于 2019-11-30 03:17:52
问题 (See edits below.) The reason I can't just use the classpath, is because I need to manage some non-java libraries, and I'm compiling a non-java project. I'm trying to use maven dependencies in an antrun call, following the documentation on the maven site: http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.html At the bottom of the page: <property name="mvn.dependency.jar" refid="maven.dependency.my.group.id:my.artifact.id:classifier:jar.path"/> <echo message="My

How to execute tasks conditionally using the maven-antrun-plugin?

☆樱花仙子☆ 提交于 2019-11-29 10:28:50
问题 I need to execute some ant commands depending on an environment variable passed in as a parameter to the maven build command. At the moment I have 3 tasks blocks and only the tasks block with no condition is being executed. <tasks name="isProdCheck"> <condition property="isProd"> <equals arg1="${environment}" arg2="PROD" /> </condition> </tasks> <tasks if="isProd" depends="isProdCheck"> ... </tasks> <tasks> ... I am the only block executed </tasks> What am I doing wrong, is there a better way

Run an ant task in maven build phase before war is packaged?

和自甴很熟 提交于 2019-11-29 04:05:28
When deploying a webapp I need to update some variables in UI resources, unzip some assets and concat some files, currently this is achieved via an ant task. I'm trying to run this task in the maven build process using something like this... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.6</version> <executions> <execution> <id>deploy-ui</id> <phase>prepare-package</phase> <inherited>false</inherited> <configuration> <target> <property name="buildDir" value="${project.build.directory}/${project.build.finalName}" /> <ant antfile=

Run an ant task in maven build phase before war is packaged?

放肆的年华 提交于 2019-11-27 18:22:42
问题 When deploying a webapp I need to update some variables in UI resources, unzip some assets and concat some files, currently this is achieved via an ant task. I'm trying to run this task in the maven build process using something like this... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <version>1.6</version> <executions> <execution> <id>deploy-ui</id> <phase>prepare-package</phase> <inherited>false</inherited> <configuration> <target>

Using antcontrib <if> task via maven-antrun-plugin

℡╲_俬逩灬. 提交于 2019-11-27 15:29:48
My maven java project uses the maven-antrun-plugin to execute a deploy.xml ant script that deploys my app. The deploy.xml uses the <if> task and this seems to be causing the problem; [INFO] Executing tasks [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found. deploy: [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] An Ant BuildException has occured: The following error occurred while executing this line: E:

Using antcontrib <if> task via maven-antrun-plugin

空扰寡人 提交于 2019-11-26 17:11:49
问题 My maven java project uses the maven-antrun-plugin to execute a deploy.xml ant script that deploys my app. The deploy.xml uses the <if> task and this seems to be causing the problem; [INFO] Executing tasks [taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found. deploy: [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------