Hi,
depending on which plateform i build my projects, i need to change the scope
of some dependencies.
For dev, i need to build WARs with full jars dependency included. So the
scope must be compiled.
For integration/production, i need to excluded some jars of the WARs as they
will be exposed on the commons/lib of the JOnaAS server (scope provided).

In order to manage this dual setup, i add in my parent pom a property who
setup the scope to provided by default:
    <properties>
        <my.scope>provided</my.scope>
    </properties>

Then, i have created a profile for development:
    <profiles>
        <profile>
            <id>envdev</id>
            <activation>
                <os>
                    <family>Windows</family>
                </os>
            </activation>
            <build>
                <resources>
                    <resource>
                        <directory>src/main/config</directory>
                    </resource>
                    <resource>
                        <directory>src/main/resources</directory>
                    </resource>
                </resources>
            </build>
            <properties>
                <my.scope>compile</my.scope>
            </properties>
        </profile>
    </profiles>

Finally, this setup doesnt seems to work: i have a compilation failure
during the WARs build (missing classes). If i hardcode the scope to compiled
in the pom of the WAR, and relaunch the build, everything goes fine.

Do you have an idea on what's going wrong?
Thks,

PS: i use the <scope>${my.scope}</scope> tag only into the pom of the WARs
projects, not on the JARs projects themselves where the scope is compiled by
default.

Reply via email to