You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by an...@nokia.com on 2006/04/19 08:26:37 UTC
unpack only a single dependency
Hi,
I trying to use the assemply:unpack mojo to extract sources from a dependency into the source directory. When I add the dependency in the main section of the pom it works, but then the unpack mojo also extracts all the other dependencies. And when I try to specify the dependency for the assemply plugin only, I'm getting a build error.
How can this be resolved?
<build>
<sourceDirectory>src/main/java/oss_om_spec_model-1.0-SNAPSHOT-sources</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<workDirectory>${project.build.sourceDirectory}/..</workDirectory>
<dependencies>
<dependency>
<groupId>ossj.jsr264</groupId>
<artifactId>oss_om_spec_model</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
<classifier>sources</classifier>
<scope>compile</scope>
</dependency>
</dependencies>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
---
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Error configuring: org.apache.maven.plugins:maven-assembly-plugin. Reason: ERROR: Cannot over
ride read-only parameter: dependencies in goal: assembly:unpack
Thanks,
_ __ _ _
//\ndreas.[|-bbert-[]/arroum(a)[|\|okia.com
`- `
Andreas Ebbert-Karroum
Software Design Engineer - Nokia Networks Services / Middleware
phone: +49-211-94123928, fax: +49-211-9412-3838
Heltorfer Straße 1, 40472 Düsseldorf, Germany
----------------------------------------------------------------------
This message is confidential. If you have received this message in error,
please delete it from your system. You should not copy it for any purpose,
or disclose its contents to any other person. Internet communications are
not secure and therefore Nokia GmbH does not accept legal responsibility
for the contents of this message as it has been transmitted over a public
network. Thank you.
Nokia GmbH, Nokia Networks is a German Company. Further information
about the Company is available from its principal offices at
Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the
website at http://www.nokia.com/
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: unpack only a single dependency
Posted by an...@nokia.com.
Hi Bernd,
>-----Original Message-----
>From: ext Bernd Bohmann [mailto:bernd.bohmann@atanion.com]
>Hello Andreas,
>
>please try the dependency-maven-plugin from mojo.
Works perfectly, thanks for the hint!
_ __ _ _
//\ndreas.[|-bbert-[]/arroum(a)[|\|okia.com
`- `
Andreas Ebbert-Karroum
Software Design Engineer - Nokia Networks Services / Middleware
phone: +49-211-94123928, fax: +49-211-9412-3838
Heltorfer Straße 1, 40472 Düsseldorf, Germany
----------------------------------------------------------------------
This message is confidential. If you have received this message in error,
please delete it from your system. You should not copy it for any purpose,
or disclose its contents to any other person. Internet communications are
not secure and therefore Nokia GmbH does not accept legal responsibility
for the contents of this message as it has been transmitted over a public
network. Thank you.
Nokia GmbH, Nokia Networks is a German Company. Further information
about the Company is available from its principal offices at
Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the
website at http://www.nokia.com/
----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: unpack only a single dependency
Posted by Bernd Bohmann <be...@atanion.com>.
Hello Andreas,
please try the dependency-maven-plugin from mojo.
Here is an example from the
http://svn.apache.org/repos/asf/myfaces/tobago/trunk/contrib/facelets/pom.xml
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>dependency-maven-plugin</artifactId>
<executions>
<execution>
<id>unpack-sources</id>
<phase>generate-sources</phase>
<goals><goal>unpack</goal></goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.apache.myfaces.tobago</groupId>
<artifactId>tobago-core</artifactId>
<version>${version}</version>
<type>jar</type>
<classifier>sources</classifier>
</artifactItem>
</artifactItems>
<outputDirectory>${project.build.directory}/tobago-core-sources</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
Regards
Bernd
andreas.ebbert-karroum@nokia.com schrieb:
> Hi,
>
> I trying to use the assemply:unpack mojo to extract sources from a dependency into the source directory. When I add the dependency in the main section of the pom it works, but then the unpack mojo also extracts all the other dependencies. And when I try to specify the dependency for the assemply plugin only, I'm getting a build error.
>
> How can this be resolved?
>
> <build>
> <sourceDirectory>src/main/java/oss_om_spec_model-1.0-SNAPSHOT-sources</sourceDirectory>
> <plugins>
> <plugin>
> <artifactId>maven-assembly-plugin</artifactId>
> <configuration>
> <workDirectory>${project.build.sourceDirectory}/..</workDirectory>
> <dependencies>
> <dependency>
> <groupId>ossj.jsr264</groupId>
> <artifactId>oss_om_spec_model</artifactId>
> <version>1.0-SNAPSHOT</version>
> <type>jar</type>
> <classifier>sources</classifier>
> <scope>compile</scope>
> </dependency>
> </dependencies>
> </configuration>
> <executions>
> <execution>
> <phase>generate-sources</phase>
> <goals>
> <goal>unpack</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
>
> ---
>
> [INFO] ----------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ----------------------------------------------------------------------------
> [INFO] Error configuring: org.apache.maven.plugins:maven-assembly-plugin. Reason: ERROR: Cannot over
> ride read-only parameter: dependencies in goal: assembly:unpack
>
> Thanks,
> _ __ _ _
> //\ndreas.[|-bbert-[]/arroum(a)[|\|okia.com
> `- `
> Andreas Ebbert-Karroum
> Software Design Engineer - Nokia Networks Services / Middleware
> phone: +49-211-94123928, fax: +49-211-9412-3838
> Heltorfer Straße 1, 40472 Düsseldorf, Germany
>
> ----------------------------------------------------------------------
> This message is confidential. If you have received this message in error,
> please delete it from your system. You should not copy it for any purpose,
> or disclose its contents to any other person. Internet communications are
> not secure and therefore Nokia GmbH does not accept legal responsibility
> for the contents of this message as it has been transmitted over a public
> network. Thank you.
> Nokia GmbH, Nokia Networks is a German Company. Further information
> about the Company is available from its principal offices at
> Heltorferstrasse 1, D-40472, Düsseldorf, Germany and from the
> website at http://www.nokia.com/
> ----------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Dipl.-Ing. Bernd Bohmann - Atanion GmbH - Software Development
Bismarckstr. 13, 26122 Oldenburg, http://www.atanion.com
phone: +49 441 4082312, mobile: +49 173 8839471, fax: +49 441 4082333
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org