antrun

Maven Antrun and Dependencies

(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...

Maven: Result of Antrun is in target, but not in output of site-stage and site-deploy. Why?

I have configured the ant-run-plugin to run in the post-site phase. By the way, it transforms to findbugs-report. I find its result in my target/site-folder. Calling site-stage produces the entire multi-module site in an extra directory. There, my transformed findbugs-report is missing. Why is that? I assumend stage-site copies the pie...

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

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" /> </c...

Run a Ant task in Maven only if a property is set

Hello, My pom.xml is running an Ant task to deploy a file using FTP. However, this deployment must be only done if the -Dftp=true argument is given in the Maven command (i.e. mvn clean install -Dftp=true). Thus, I wrote the following code: <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> ...

Maven build fails on an Ant FTP task failure

I'm using the FTP Ant task with maven-antrun-plugin <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>ftp</id> <phase>generate-resources</phase> <configuration> <tasks> ...

Maven: how to filter the same resource multiple times with different property values?

Our project uses Log4J, configured via log4j.properties file. We have multiple production servers, which log to different log files, so that the logs can be differentiated. So log4j.properties for node 1 looks like this: ... log4j.appender.Application.File=D:/logs/application_1.log ... log4j.appender.tx_info.File=D:/logs/tx_info_1.log ....

Converting Ant to Maven: problem with target attribute "depends" on Ant

I am converting ant to maven2. I meet a problem. Please help me: In build.xml, i have <target name="clean"> <delete file="${dir.dist}/${api.jarfile}" /> <delete dir="${dir.build}/**" /> /target> <target name="prepare1" depends="clean"> <mkdir dir="${dir.build}" /> <mkdir dir="${dir.generated.code.junit}/build" /> <mkdir dir="$...

Maven multiple modules - post-packaging step

I have a Maven project that consists of several modules. I have a single POM file that I use to invoke the build of all dependent modules. What I want to do is to copy a bunch of files to a single location and zip them up once, after the package lifecycle of all the sub-modules has completed. I've looked into antrun, but can't see how...

maven antrun plugin

I have the following in my pom: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ant-plugin</artifactId> <version>2.3</version> <configuration> <target> <echo message="hello ant, from Maven!" /> <echo>Maybe this will work?</echo> </target> </configuration> </pl...

How to run an ant target from Maven2?

How do i run a specific target with the antrun-plugin from the command line? mvn antrun:run doesn't make it run. <project> ... <build> <plugins> ... <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> ...

How to bind maven antrun plugin to the clean phase

Hello, I have just translated an ant project into maven however since maven does not really deal with deployment I introduce some antrun into the build. However when I try to execute it the plugin skips my tasks. for exemple when I run mvn clean antrun:run I get the following message: No ant target defined - SKIPPED. the same happends...

Parent properties inside maven antrun plugin

There is a multi-module project. Inside the child I need to do some complicated stuff (integration test with deploying to application server and so on). So there is an integrationtest child, and from this module I need the root of the parent to reach other modules. I do not want to use "..". There is a property in integrationtest POM: <...