You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by kovalsmd <ko...@gmail.com> on 2008/02/29 13:03:00 UTC
classifier + exclusion
Hello,
I've three projects:
main
project1
project2
project3
in project1 is something like this:
...
<dependency>
<groupId>${groupId}</groupId>
<artifactId>project3</artifactId>
<version>1.0</version>
</dependency>
...
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>blabla</classifier>
<includes>
<include>**/blabla/*</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
in project2:
<dependency>
<groupId>${groupId}</groupId>
<artifactId>project1</artifactId>
<version>1.0</version>
<classifier>blabla</classifier>
<exclusions>
<exclusion>
<groupId>${groupId}</groupId>
<artifactId>project3</artifactId>
</exclusion>
</exclusions>
</dependency>
and the problem is that <exclusion> doesn't work. If I delete <classifier>
everything is ok.
--
View this message in context: http://www.nabble.com/classifier-%2B-exclusion-tp15757147s177p15757147.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: classifier + exclusion
Posted by Clifton <cl...@gmail.com>.
Classifier changes the dependency type from a typical jar dependency to
something other like src or javadoc. The question is what are you trying to
accomplish overall? Maybe exclusion isn't the answer. It seems like you're
using a multi-module project. Maybe you can try using profiles to
conditionally include submodules from the build? Something roughly like
(from the top of my head):
<profiles>
<profile>
<id>default</id>
<activation><activebydefault>true</activebydefault></activation>
<modules>
<module>proj1</module>
<module>proj2</module>
</modules>
</profile>
<profile>
<id>exclude-proj3</id>
<activation><property><name>exclude-proj3</name></property></activation>
<modules>
<module>proj1</module>
<module>proj2</module>
</modules>
</profile>
</profiles>
Then do:
mvn -Dexclude-proj3 install
from the project root?
kovalsmd wrote:
>
> Hello,
>
> I've three projects:
> main
> project1
> project2
> project3
>
> in project1 is something like this:
> ...
> <dependency>
> <groupId>${groupId}</groupId>
> <artifactId>project3</artifactId>
> <version>1.0</version>
> </dependency>
> ...
> <plugin>
> <artifactId>maven-jar-plugin</artifactId>
> <executions>
> <execution>
> <phase>package</phase>
> <goals>
> <goal>jar</goal>
> </goals>
> <configuration>
> <classifier>blabla</classifier>
> <includes>
> <include>**/blabla/*</include>
> </includes>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> in project2:
>
> <dependency>
> <groupId>${groupId}</groupId>
> <artifactId>project1</artifactId>
> <version>1.0</version>
> <classifier>blabla</classifier>
> <exclusions>
> <exclusion>
> <groupId>${groupId}</groupId>
> <artifactId>project3</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
>
> and the problem is that <exclusion> doesn't work. If I delete <classifier>
> everything is ok.
>
--
View this message in context: http://www.nabble.com/classifier-%2B-exclusion-tp15757147s177p15758919.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org