Lewis, Eric wrote at Freitag, 26. Juni 2009 11:36:
> Hi Jörg
>
>>
>> To get this right: You've defined the plugin in the profile
>> section of the
>> parent and you try to activate it in the individual modules?
>
> Yes
>
>> Interesting idea.
>
> Thanks, but born out of sheer despair ;-)
> I don't really know if this is how such builds are supposed to be done in
> Maven...
>
>> Are you sure that it simply does not work in reactor,
>> because it is
>> looking for the file in the wrong working dir then? Did you try
>> <exists>${basedir}/jaxb.profile</exists> ?
>
> Thanks, good idea! I just tried it, just building the specific module, not
> the whole project.
>
> <exists>osgi-bundle.profile</exists>
>
> works:
>
> [INFO] [compiler:compile]
> [INFO] Compiling 11 source files to ....
> [INFO] [bundle:manifest {execution: bundle-manifest}]
> [INFO] [resources:testResources]
>
>
> However
>
> <exists>${basedir}/osgi-bundle.profile</exists>
>
> doesn't work:
>
> [INFO] [compiler:compile]
> [INFO] Compiling 11 source files to ....
> [INFO] [resources:testResources]
What happens if you move the activation part also to the parent? Hint: Maven
cannot activate a profile from child to parent since the profiles in the
parent have already be processed when the child is "interpreted". However,
it is not clear to me if ${basedir} used in the parent is relative to the
parent's physical location or to the one of the child.
> Also, to be sure, I added help:active-profiles, but this doesn't seem to
> work in this case. For the successful build, it only lists the profile
> which is active by default
>
> [INFO] [help:active-profiles]
> [INFO]
> Active Profiles for Project 'ch.ipi:util-di:jar:1.0.0-SNAPSHOT':
>
> The following profiles are active:
>
> - local (source: settings.xml)
> - local (source: settings.xml)
>
> (and God only knows why it's listed twice...)
Don't use "activeByDefault". Set it explicitly active in an activeProfiles
section. Hint: Normally a profile activated by default should be not active
if a different one is activated. However, it is not clear what "another one
is activated" really means: another one is activated by command line or is
activated by condition. Even worse that different maven versions do behave
differently in this respect ;-)
- Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]