Hi,

I'm hosting a project consisting of multiple subprojects. Each subproject is depending on jars of other subprojects. To be able to compile (and test) each subproject I have to include jars of other subprojects into the particular classpath. Since it doesn't make sense to publish project-dependent jars in a central repository I've to find another solution...

what I've tried so far:
------------------------------------------------
1.) created my own java:compile goal in maven.xml, adding local jars to ant.

<!--goal name="java:compile" description="Compile all Java Classes for subproject 2">
<echo>Compiling all Java-Classes</echo>
<ant:mkdir dir="${maven.build.dir}/classes"/>
<ant:path id="mio.classpath">
<ant:pathelement location="D:\Project\Subproject1\dist\jar1.jar"/>
<ant:pathelement location="D:\Project\Subproject1\dist\jar2.jar"/>
<ant:pathelement location="D:\Project\Subproject1\dist\jar3.jar"/>
<ant:path refid="maven.dependency.classpath"/>
<ant:pathelement path="${maven.build.dest}"/>
</ant:path>
<ant:javac srcdir="${maven.src.dir}" destdir="${maven.build.dest}" debug="${maven.compile.debug}" deprecation="${maven.compile.deprecation}" optimize="${maven.compile.optimize}" classpathref="mio.classpath"/>
</goal-->


--> works, but as soon as I call "maven test" compiling fails. Besides, it doesn't seem to be a proper solution, because you have to rewrite all existing goals


2.) defined a local repository, pointing to jars of other subprojects


maven.repo.remote=http://www.ibiblio.org/maven,file:///D:/Project/Subproject1/dist/

--> works, but is not a proper solution
-----------------------------------------------

Any suggestions how I could my problem?
Is there a way to manipulate the maven.dependency.classpath property? If yes, I could use a java:compile pregoal...
Is the multiproject plugin the solution? If that is the case, is there any useful documentation? Any examples?



thx bernhard


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to