You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Haszlakiewicz, Eric" <EH...@transunion.com> on 2010/06/16 19:21:47 UTC
unpack-dependencies unpacks all dependencies
I'm having some problems making unpack-dependencies work right. It
seems that no matter what I put for includeGroupId and includeArtifactId
it always unpacks all dependencies instead of only those that I want.
I was looking through jira to see if anyone else had this problem and
found something that looks like it might be related (although it only
talks about includeClassifiers):
http://jira.codehaus.org/browse/MDEP-257
That suggests to "Update the version [of maven-common-artifact-filters]
to current version 1.2 ... and you'll be fine".
So, I'm wondering how do I do that? I tried removing my .m2 directory
to see if it would pick up a newer version, but I still end up with
version 1.0. (and only maven-dependency-plugin 2.0, even though it looks
like there's a 2.1 version available)
Alternately, am I doing something wrong with the unpack-dependencies
configuration?
At the end of this message is an example pom.xml file that demonstrates
the problem. I am expecting this to only unpack the commons-beansutils
dependency, but it also unpacks commons-validator (and it's
dependencies). I tried this with Maven 2.2.1.
Thanks,
eric
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>test</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Test</name>
<dependencies>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>compile</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupId>commons-beanutils</includeGroupId>
<includeArtifactId>commons-beanutils</includeArtifactId>
<outputDirectory>${project.build.directory}/tempdir</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: unpack-dependencies unpacks all dependencies
Posted by "Haszlakiewicz, Eric" <EH...@transunion.com>.
>-----Original Message-----
>From: GALLAGHER, RON (ATTSI) [mailto:RG7679@att.com]
>Sent: Wednesday, June 16, 2010 9:00 PM
>To: Maven Users List
>Subject: RE: unpack-dependencies unpacks all dependencies
>
>Eric,
>
>The properties you should use are includeGroupIds [1] and
>includeArtifactIds [2]. The POM file you provided does not pluralize
>those properties.
Ah, so I should. It works fine with the right element names. Thanks!
So what are the non-plural ones (and why aren't they documented)? Or,
if those aren't valid elements at all, why doesn't the build fail due to
invalid xml?
eric
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: unpack-dependencies unpacks all dependencies
Posted by "GALLAGHER, RON (ATTSI)" <RG...@att.com>.
Eric,
The properties you should use are includeGroupIds [1] and
includeArtifactIds [2]. The POM file you provided does not pluralize
those properties.
[1]
http://maven.apache.org/plugins/maven-dependency-plugin/unpack-dependenc
ies-mojo.html#excludeGroupIds
[2]
http://maven.apache.org/plugins/maven-dependency-plugin/unpack-dependenc
ies-mojo.html#includeArtifactIds
Ron Gallagher
-----Original Message-----
From: Haszlakiewicz, Eric [mailto:EHASZLA@transunion.com]
Sent: Wednesday, June 16, 2010 1:22 PM
To: Maven Users List
Subject: unpack-dependencies unpacks all dependencies
I'm having some problems making unpack-dependencies work right. It
seems that no matter what I put for includeGroupId and includeArtifactId
it always unpacks all dependencies instead of only those that I want.
I was looking through jira to see if anyone else had this problem and
found something that looks like it might be related (although it only
talks about includeClassifiers):
http://jira.codehaus.org/browse/MDEP-257
That suggests to "Update the version [of maven-common-artifact-filters]
to current version 1.2 ... and you'll be fine".
So, I'm wondering how do I do that? I tried removing my .m2 directory
to see if it would pick up a newer version, but I still end up with
version 1.0. (and only maven-dependency-plugin 2.0, even though it looks
like there's a 2.1 version available)
Alternately, am I doing something wrong with the unpack-dependencies
configuration?
At the end of this message is an example pom.xml file that demonstrates
the problem. I am expecting this to only unpack the commons-beansutils
dependency, but it also unpacks commons-validator (and it's
dependencies). I tried this with Maven 2.2.1.
Thanks,
eric
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>test</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Test</name>
<dependencies>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>compile</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupId>commons-beanutils</includeGroupId>
<includeArtifactId>commons-beanutils</includeArtifactId>
<outputDirectory>${project.build.directory}/tempdir</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org