You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Adrian Herscu <bm...@fastmail.fm> on 2006/06/08 21:54:39 UTC

Re: [m2] problem w/ dependency-maven-plugin:unpack-dependencies

Any encouraging news about this issue?...

Brian E. Fox wrote:
> This is a known issue caused by maven reacting differently when run from
> a parent. I'll attempt to find a workaround, but IMNSHO, this is a
> defect in maven core. 
> 
> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Adrian Herscu
> Sent: Monday, March 20, 2006 6:24 PM
> To: users@maven.apache.org
> Subject: [m2] problem w/ dependency-maven-plugin:unpack-dependencies
> 
> Hi all,
> 
> I have a project with two war modules (app1, app2) that depend one on
> the other. I have defined a parent pom.xml (root) in order to be able to
> build both project modules at once.
> 
> In one of the war modules (app2) I am using the dependency-maven-plugin
> in order to merge the artifact produced by the other war module (app1)
> into a deployable artifact.
> 
> When I am building app2 directly everything works as expected (the app1
> artifact is expanded in the webappDirectory).
> 
> A weird thing happens when I am building root: the
> dependency-maven-plugin does not expand the dependencies.
> 
> Adrian.
> 
> The pom.xml files are:
> 
> 1) The root:
> 
> <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.mycompany</groupId>
>   <artifactId>mycompany</artifactId>
>   <version>1.0-SNAPSHOT</version>
> 
>   <packaging>pom</packaging>
> 
>   <modules>
>     <module>mycompany-app1</module>
>     <module>mycompany-app2</module>
>   </modules>
> </project>
> 
> 
> 
> 2) app1:
> 
> <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>
> 
>   <parent>
>     <groupId>com.mycompany</groupId>
>     <artifactId>mycompany</artifactId>
>     <version>1.0-SNAPSHOT</version>
>   </parent>
> 
>   <groupId>com.mycompany.app1</groupId>
>   <artifactId>mycompany-app1</artifactId>
>   <packaging>war</packaging>
>   <version>1.0-SNAPSHOT</version>
> 
>   <name>Maven Webapp #1</name>
>   <url>http://maven.apache.org</url>
> 
>   <build>
>   </build>
> </project>
> 
> 
> 3) app2:
> 
> <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>
> 
>   <parent>
>     <groupId>com.mycompany</groupId>
>     <artifactId>mycompany</artifactId>
>     <version>1.0-SNAPSHOT</version>
>   </parent>
> 
>   <groupId>com.mycompany.app2</groupId>
>   <artifactId>mycompany-app2</artifactId>
>   <packaging>war</packaging>
>   <version>1.0-SNAPSHOT</version>
> 
>   <name>Maven Webapp #2</name>
>   <url>http://maven.apache.org</url>
> 
>   <dependencies>
>     <dependency>
>       <groupId>com.mycompany.app1</groupId>
>       <artifactId>mycompany-app1</artifactId>
>       <version>1.0-SNAPSHOT</version>
>       <type>war</type>
>     </dependency>
>   </dependencies>
> 
>   <build>
>     <plugins>
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>dependency-maven-plugin</artifactId>
>         <executions>
>           <execution>
>             <phase>process-resources</phase>
>             <goals>
>               <goal>unpack-dependencies</goal>
>             </goals>
>             <configuration>
> 
> <outputDirectory>${project.build.directory}/${project.build.finalName}</
> 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


Re: [m2] problem w/ dependency-maven-plugin:unpack-dependencies

Posted by dan tran <da...@gmail.com>.
try the "unpack" mojo in maven-dependency-maven,it works for me.
you will need to build it your self

-dan


On 6/8/06, Adrian Herscu <bm...@fastmail.fm> wrote:
>
> Any encouraging news about this issue?...
>
> Brian E. Fox wrote:
> > This is a known issue caused by maven reacting differently when run from
> > a parent. I'll attempt to find a workaround, but IMNSHO, this is a
> > defect in maven core.
> >
> > -----Original Message-----
> > From: news [mailto:news@sea.gmane.org] On Behalf Of Adrian Herscu
> > Sent: Monday, March 20, 2006 6:24 PM
> > To: users@maven.apache.org
> > Subject: [m2] problem w/ dependency-maven-plugin:unpack-dependencies
> >
> > Hi all,
> >
> > I have a project with two war modules (app1, app2) that depend one on
> > the other. I have defined a parent pom.xml (root) in order to be able to
> > build both project modules at once.
> >
> > In one of the war modules (app2) I am using the dependency-maven-plugin
> > in order to merge the artifact produced by the other war module (app1)
> > into a deployable artifact.
> >
> > When I am building app2 directly everything works as expected (the app1
> > artifact is expanded in the webappDirectory).
> >
> > A weird thing happens when I am building root: the
> > dependency-maven-plugin does not expand the dependencies.
> >
> > Adrian.
> >
> > The pom.xml files are:
> >
> > 1) The root:
> >
> > <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.mycompany</groupId>
> >   <artifactId>mycompany</artifactId>
> >   <version>1.0-SNAPSHOT</version>
> >
> >   <packaging>pom</packaging>
> >
> >   <modules>
> >     <module>mycompany-app1</module>
> >     <module>mycompany-app2</module>
> >   </modules>
> > </project>
> >
> >
> >
> > 2) app1:
> >
> > <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>
> >
> >   <parent>
> >     <groupId>com.mycompany</groupId>
> >     <artifactId>mycompany</artifactId>
> >     <version>1.0-SNAPSHOT</version>
> >   </parent>
> >
> >   <groupId>com.mycompany.app1</groupId>
> >   <artifactId>mycompany-app1</artifactId>
> >   <packaging>war</packaging>
> >   <version>1.0-SNAPSHOT</version>
> >
> >   <name>Maven Webapp #1</name>
> >   <url>http://maven.apache.org</url>
> >
> >   <build>
> >   </build>
> > </project>
> >
> >
> > 3) app2:
> >
> > <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>
> >
> >   <parent>
> >     <groupId>com.mycompany</groupId>
> >     <artifactId>mycompany</artifactId>
> >     <version>1.0-SNAPSHOT</version>
> >   </parent>
> >
> >   <groupId>com.mycompany.app2</groupId>
> >   <artifactId>mycompany-app2</artifactId>
> >   <packaging>war</packaging>
> >   <version>1.0-SNAPSHOT</version>
> >
> >   <name>Maven Webapp #2</name>
> >   <url>http://maven.apache.org</url>
> >
> >   <dependencies>
> >     <dependency>
> >       <groupId>com.mycompany.app1</groupId>
> >       <artifactId>mycompany-app1</artifactId>
> >       <version>1.0-SNAPSHOT</version>
> >       <type>war</type>
> >     </dependency>
> >   </dependencies>
> >
> >   <build>
> >     <plugins>
> >       <plugin>
> >         <groupId>org.codehaus.mojo</groupId>
> >         <artifactId>dependency-maven-plugin</artifactId>
> >         <executions>
> >           <execution>
> >             <phase>process-resources</phase>
> >             <goals>
> >               <goal>unpack-dependencies</goal>
> >             </goals>
> >             <configuration>
> >
> > <outputDirectory>${project.build.directory}/${project.build.finalName}</
> > 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
>
>