You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Erik Husby <mh...@broad.mit.edu> on 2006/09/05 19:40:09 UTC
[M2] Convert simple Maven 1 Ant task to Maven2
I am in the process of learning Maven 2. I am converting a simple
Maven 1 project to Maven 2 and need help converting a set of Ant
commands to Maven 2. I can't seem to find any usable documentation on
the maven-antrun-plugin either on-line or in the "Build Builds with
Maven" book.
I've figured out how to hook in some Ant tasks to generate a java
source with build information in it. What I can't figure out is how
to do the equivalent of the Maven 1 commands
<ant:path id="src.set" location="${project.build.directory}/
generated-sources/mysources"/>
<maven:addPath id="maven.compile.src.set" refid="src.set"/>
Do I need to write some Java code to do this? I did get a look at the
Castor plugin and see where it does a "project.addCompileSourceRoot
( dest);"
Writing a java class to do that call seems like overkill at this point.
Any pointers?
---
Erik Husby
Senior Software Engineer
Broad Institute of MIT and Harvard
Rm. 2267, 320 Charles St, Cambridge, MA 02141-2023
mobile: 781.354.6669, office: 617.258.9227
email: mhusby@broad.mit.edu AIM: ErikAtBroad
Re: [M2] Convert simple Maven 1 Ant task to Maven2
Posted by Erik Husby <mh...@broad.mit.edu>.
Well, I've managed to answer my own question. Did not understand how
to use the antrun property <sourceRoot>. Now I do.
---
Erik Husby
Senior Software Engineer
Broad Institute of MIT and Harvard
Rm. 2267, 320 Charles St, Cambridge, MA 02141-2023
mobile: 781.354.6669, office: 617.258.9227
email: mhusby@broad.mit.edu AIM: ErikAtBroad