Hi,
I have the following situation
Project A
project.xml
maven.xml, contains java:compile preGoal and postGoal
These are needed to compile project A.
Project B
extends Project A project.xml (because it shares the dependencies and
some more information)
maven.xml contains no pre and post goals because they're not needed
here.
Building Project B now crashes, because it tries to execute the pre
and post goal from Project A maven.xml file!
Building Project B is completely different from Project A. All I need
are a few properties. So this is not possible? How can I avoid to run
the project A pre and post goals when I want to build Project B.
(This is a real world situation. Consider "Project A" being the
db-torque runtime and "Project B" the db-torque generator).
Test case:
/tmp/bar/maven.xml:
--- cut ---
<project
default="foo"
xmlns:pom="pom"
xmlns:deploy="deploy">
<preGoal name="java:compile">
<echo>PRE BAR</echo>
</preGoal>
<postGoal name="java:compile">
<echo>POST BAR</echo>
</postGoal>
</project>
--- cut ---
/tmp/bar/foo/maven.xml:
--- cut ---
<project
default="foo"
xmlns:pom="pom"
xmlns:deploy="deploy">
<preGoal name="java:compile">
<echo>PRE FOO</echo>
</preGoal>
<postGoal name="java:compile">
<echo>POST FOO</echo>
</postGoal>
</project>
--- cut ---
% cd /tmp/bar
% maven -b java:compile
java:compile:
[echo] PRE BAR
[echo] Compiling to /tmp/bar/target/classes
[echo] No java source files to compile.
[echo] POST BAR
BUILD SUCCESSFUL
% cd /tmp/bar/foo
% maven -b java:compile
java:compile:
[echo] PRE BAR
[echo] PRE FOO
[echo] Compiling to /tmp/bar/foo/target/classes
[echo] No java source files to compile.
[echo] POST BAR
[echo] POST FOO
BUILD SUCCESSFUL
I tested this with beta9 and rc1 snapshots. Both exhibit the same
behaviour.
Please include me in Cc because I don't monitor the maven lists on a
regular base.
Regards
Henning
--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen INTERMETA GmbH
[EMAIL PROTECTED] +49 9131 50 654 0 http://www.intermeta.de/
Java, perl, Solaris, Linux, xSP Consulting, Web Services
freelance consultant -- Jakarta Turbine Development -- hero for hire
"Dominate!! Dominate!! Eat your young and aggregate! I have grotty silicon!"
-- AOL CD when played backwards (User Friendly - 200-10-15)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]