I am trying to setup a build scheme that will work for
about 30 different projects of different types
(portlet, EJB, EJB client, etc) but which all comprise
one "business project."

Consequently, I need to define the sourceDirectory
(and  sometimes the outputDirectory) depending on the
type of project.  Sometimes the source directory is
JavaSource, sometimes it's ejbModule... (thank you,
IBM/RAD).

In my parent pom.xml, I define:

  <build>
 
<sourceDirectory>${source.directory}</sourceDirectory>

 
<outputDirectory>${output.directory}</outputDirectory>
</build>

What I would like to do is to create different
profiles in the parent pom.xml that would be activated
based on the type of the child project.  I've tried
activating using a property, but apparently
activations by property only work (in my limited
experience) when the property is defined on the
command line (as opposed to defined in the child
pom.xml).  I've also tried activating by the existence
of a file (e. g.
${basedir}/WebContent/WEB-INF/portlet.xml to indicate
a portlet project).  This doesn't seem to work, and
when I perform a mvn projecthelp:effective-pom, it
appears that the profile activation is evaluated once
for the parent as opposed to evaluating separately for
each module the parent is building.

I think my next move is simply to have a different
parent pom.xml file for each type of project.  I was
just hoping I could reduce duplication by effective
usage of profiles.

Please let me know if I've missed something or am
heading down the wrong path.

Thanks.

Michael

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to