http://mojo.codehaus.org/build-helper-maven-plugin/
This plugin will add additional source directories to your project. Ruel Loehr JBoss QA ----------------------------- 512-347-7840 ext 2011 Yahoo: ruelloehr Skype: ruelloehr AOL: dokoruel -----Original Message----- From: Peschier J. (Jeroen) [mailto:[EMAIL PROTECTED] Sent: Friday, January 06, 2006 7:26 AM To: Maven Users List Subject: RE: [M2] adding source-dir within maven-antrun-plugin tasks One solution is to add all your directories to the maven-compile-plugin like this: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0</version> <configuration> <includes> <include implementation="java.lang.String">../src/**/*.java</include> <include implementation="java.lang.String">../generated-src/**/*.java</include> </includes> </configuration> </plugin> It's a kludge though. Other plugins won't know about the extra source directory. I.e. the maven-eclipse-plugin will not generate multiple source directories for you :( There really ought to be a way to add multiple sourceDirectories in the POM like you can with Maven 1. But the Maven developers seem dead against it. Short of patching Maven yourself there is not real solution. -----Oorspronkelijk bericht----- Van: Jens Zastrow [mailto:[EMAIL PROTECTED] Verzonden: vrijdag 6 januari 2006 14:04 Aan: [email protected] Onderwerp: [M2] adding source-dir within maven-antrun-plugin tasks Hi, i need to use the sun-jaxb-compiler (xjc) which only seems to work correctly with the antrun plugin. The problem now is to put the generated .java files in a directory which is a pom-source-folder or one which is later added to the pom-source-folders. Since i dont know a way to do this fromt he ant snipshet, my current - bad - solution is to generate them into ${basedir}/src/main/java. Any ideas? Thanks jens <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>validate</phase> <configuration> <tasks> <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask"/> <xjc schema="src/main/xsd/de/dailab/util/jaxb/agentrole/AgentRole.xsd" package="de.dailab.util.jaxb.agentrole" target="${basedir}/src/main/java" extension="false"/> <copy todir="${project.build.directory}/classes"> <fileset dir="${basedir}/src/main/java" excludes="**/*.java"/> </copy> </tasks> </configuration> </executions> </plugin> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
