Hallo

from what i've read in this list somewhere:
profiles are not inherited to sub-modules. so the profile will not appear as activated. but nontheless the effects of a parent-pom profile are inherited to the child-modules.

so es you should be able to define a profile in the parent pom and use it in the child modules. i use such a setup for filtering and it seem to work.

regards

ossi



Torsten Marek schrieb:
Hi all,

I have a problem wrt profile reusability and inheritance and currently I'm not sure if what I want to do is even possible. - in a large projects with ~40 sub-projects, we want to add a special builder to the Eclipse project configuration for selected projects and also write a configuration file. So far, making that a profile and activating it via a property is easy and the profile works as expected.

<profile>
        <activation>...</activation>
        <build>
                <plugins>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-eclipse-plugin</artifactId>
                                <version>2.3</version>
                                <configuration>
                                        <additionalBuildcommands>
                                                ...
                                        </additionalBuildcommands>
                                        <additionalProjectnatures>
                                                ...
                                        </additionalProjectnatures>
                                </configuration>
                        </plugin>
                </plugins>
        </build>
</profile>

Since this should also contain a configuration file, I don't want to put this into more than one place, but I failed to put the profile into the super POM and have it activated in the child POM. I suspect that putting it into the local settings would work, but we'd prefer to have the settings in the repository under source control.

What we would optimally want to have:
- add the profile in the super POM in the main projects
- activate the profile in the subprojects based on the existence of a tag file and the flag property

Is that possible?

Thanks in advance & best regards,

Torsten

PS: Please CC me, as I'm not subscribed to the list.


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

Reply via email to