hi,

  since the pmd plugin is currently unusable[1] for us we had to
resort to creating an ANT script for generating the PMD reports. our
project structure has some auxiliary subproject that are made from
classes from other modules and looks like this

X
 |-module1
 |   |-pom.xml
 |-module2
 |   |-pom.xml
 |-aux
 |   |-EJB1
 |   |   |-pom.xml
 |   |-EJB2
 |   |   |-pom.xml
 |-ENV
 |   |-config
 |   |   |-build.xml
 |-Main
 |   |-pom.xml

 where the Main project declares all modules and auxilliary projects
as its dependencies.

 in the main pom.xml we have the property ENV.home defined as
${basedir}/../ENV and an antrun execution bound in the
generate-sources phase, the antrun execution references the build file
using the followong statement

<tasks>
    <echo>[OUT] ENV.home is ${ENV.home}</echo>
    <ant
        target = "generate-pmd"
        antfile = "${ENV.home}/config/build.xml">
    </ant>
</tasks>

  since this wont work on the auxiliary projects (they are two level2
deep) we declared property overrides for ENV.home in the EJB project
descriptors (i.e. ${basedir}/../../ ) .

  the problem is that during the antrun executions in the EJB projects
it throws an error because the ANT task is searching for the build
file in X:\aux\ENV\config\build.xml  when it should have been going 2
directories down.

  the [OUT] echo shows that the ENV.home property points to the
correct directory but it seems that the ANT task is not being
re-initialized for each sub-project. is there a workaround for this?

  or is there a way to tell the antrun execution to skip the
auxilliary projects? i tried creating a similarly named profile in the
auxilliary project descriptors in the hopes that it would cancel out
the ones declared in the Main project .

   thanks.

[1] http://jira.codehaus.org/browse/MNG-1158

ciao!

--

"Programming, an artform that fights back"

Anuerin G. Diaz
Registered Linux User #246176
Friendly Linux Board @ http://mandrivausers.org/index.php
http://capsule.ramfree17.org , when you absolutely have nothing else
better to do

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

Reply via email to