Redeem the reputation points you've earned from participating in O'Reilly Answers for O'Reilly ebooks, videos, courses, and conferences. Related Posts + 1 Posted Oct 01 2009 07:39 AM You need to execute an external Ant script in a Maven build. Configure the run goal form the Maven AntRun plugin. Define any properties you wish to pass to the external Ant build, and then call the external Ant build with the ant task, specifying the antfile and target you wish to execute.
<build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>ant-magic</id> <phase>prepare-package</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <property name="compile_classpath" refid="maven.compile.classpath"/> <property name="outputDir" value="${project.build.outputDirectory}"/> <property name="sourceDir" value="${project.build.sourceDirectory}"/> <ant antfile="${basedir}/src/main/ant/create-deps.xml" target="create"/> </tasks> </configuration> </execution> </executions> </plugin> </plugins> </build>Read full article from Running an External Ant Script in a Maven Build - O'Reilly Answers
No comments:
Post a Comment