You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marc Chételat ML <ml...@chetelat.net> on 2006/09/14 22:22:46 UTC

dependency-maven-plugin question

Hi all,

I m currently migrating from Ant 1.6.5 to Maven 2.0.4 a project with 
multiple modules as follow :

<Project root path> (pom.xml with each subdirectory as <module>)
|
|--- applet
|--- sharedlib
|--- ejbmodule-jar
|--- webapp1-war
|--- webapp2-war
|--- finalpackage-ear
|...

With the help of Geoffrey (thanks users@maven mailing-list) I used the 
plugin "dependency-maven-plugin" from Mojo to compile the applet and 
then copy it in a webapp. Here's a part of the pom.xml of webapp1:

...
<plugin>       
        <groupId>org.codehaus.mojo</groupId>
         <artifactId>dependency-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-applet</id>
            <phase>process-resources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
                <artifactItems>
                  <artifactItem>
                     <artifactId>appletplayer</artifactId>
                     <groupId>com.test</groupId>
                     <version>2.0</version>
                     <type>jar</type>
                  </artifactItem>
                 </artifactItems>
               <outputDirectory>./target/webapp1/applet</outputDirectory>
               <stripVersion>true</stripVersion>              
            </configuration>
          </execution>
        </executions>
      </plugin>
...

To build the all, I always typed "mvn package" from the <project root 
directory> ... but since the dependency-maven-plugin, I must install the 
applet module with typing "mvn install" ... if not, Maven try to 
download the package from the repositories...
Other issue, sharedlib.jar module is defined as a <dependency> for the 
webapp1-war module and then put in the WEB-INF/lib directory of the war 
package. But for this it's work without installing the sharedlib in the 
local repository...

My questions are: With my comprehension of Maven, I don't have to 
install a "module" of my project in the local respository... isn't it? 
Or is my comprehension wrong? ... or perhaps I m using the plugin wrong? 
or... have you another solution to use the command "mvn package" and 
build my project to get a marvelous ear file and deploy it on my server?

Thanks in advance for any helps!

Regards,
ML






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org