On Mon, 03 Jan 2005, at 11:58:54 [GMT -0500] Randy Xu wrote:
> 1) Are project.properties settings inherited when project.xml is inherited?
Yes
> 2) Can/how (do) we define variables in project.xml? I assume those are
> inherited.
I don't know about defining them, but you can use variables in
project.xml. For instance, I have this in mine:
<developerConnection>
scm:cvs:pserver:[EMAIL PROTECTED]:/home/cvs:myproj
</developerConnection>
> 3) Can project.xml members be references in project.xml? I really don't
> like hardcoding the filenames of the internal subproject dependencies in
> project.properties and project.xml. For example can I do something like
> the following (this currently doesn't work):
> <dependency>
> <groupId>com.blah.app</groupId>
> <artifactId>app-lib</artifactId>
> <version>${pom.version}</version>
> <type>jar</type>
> <jar>${basedir}/../app-lib/target/app-lib-${pom.version}.jar</jar>
> </dependency>
> 3b) Or better yet, not even define the <jar/> but just have it know
> that it's in
> ${basedir}/../${artifactId}/target/${artifactId}-${pom.version}.jar
You don't need the <jar> element. If you do a multiproject:install,
your artifacts will get installed in your local repo. Your
<dependency> (without the <jar>) then tells Maven to find that jar in
your local repo, so you don't need to give an exact path.
> 4) Can/how (do) I reference all of this in maven.xml? I'd like it so
> when the jars are built that they are copied over to a top level
> directory '/deploy' So based on the answer to question 1, it may work
> to put maven.deploy.dir in maven.root/project.properties right? And is
> there a way I can tell it exactly to include app-lib-1.0-dev.jar without
> resorting to *.jar?
> <postGoal name="jar:jar">
> <copy todir="${maven.deploy.dir}>
> <fileset dir="${basedir}/target/">
> <include name="*.jar">
> </fileset>
> </copy>
If you just want to bundle all your jars for distribution (say into a
zip), you can create another subproject that references the other
artifacts in its dependency list. Then you can copy them from your
local repo to a temp location before zipping. For an idea of how to do
this, check out the war plugin and search for 'war.bundle'.
Jeff
--
mailto:[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]