Dont be shy, just try it. 2009/11/17 eyal edri <[email protected]>
> can i use the 'dependency:copy-dependencies< > http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html > >' > goal in this project to tell it to copy all it's > dependencies to the "lib" dir? > like shown in here: > > > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-dependency-plugin</artifactId> > <executions> > <execution> > <id>copy-dependencies</id> > <phase>package</phase> > <goals> > <goal>copy-dependencies</goal> > </goals> > <configuration> > <outputDirectory>/usr/local/app</outputDirectory> > <overWriteReleases>false</overWriteReleases> > <overWriteSnapshots>false</overWriteSnapshots> > <overWriteIfNewer>true</overWriteIfNewer> > </configuration> > </execution> > </executions> > </plugin> > </plugins> > </build> > > > > btw: (when you said <classpathPrefix>*lib*</classpathPrefix>, > > does this means "projectHome/lib" is the classPath?) > > > On Tue, Nov 17, 2009 at 4:51 PM, Alexander <[email protected]> wrote: > > > You could do this without assembly plugin. > > > > Just copy all dependencies with maven-dependency-plugin to some folder > and > > than add this folder as classpath prefix in maven-jar-plugin. > > > > example for second part > > > > <plugin> > > <artifactId>maven-jar-plugin</artifactId> > > <configuration> > > <archive> > > <manifest> > > <mainClass>you.main.class</mainClass> > > <addClasspath>true</addClasspath> > > <classpathPrefix>lib</classpathPrefix> > > </manifest> > > </archive> > > </configuration> > > </plugin> > > > > 2009/11/17 eyal edri <[email protected]> > > > > > Hi, > > > > > > i'm trying to figure out how can i create a working executable JAR that > > has > > > dependencies > > > (in-house maven projects plus external lib such as Log4J). > > > > > > I tried using the assembly plugin by creating a > "jar-with-dependencies". > > > > > > but this creates a big JAR with all the dependencies included. > > > > > > I want to be able to install commons dependencies in a commons > directory > > > (/usr/lib/maven-projects/ for e.g.), > > > and that every project that depends on them can use them. > > > > > > What should i do in the pom file of the infrastructure project and the > > > project that depends on it? > > > > > > i've read almost all the complete "maven-definite-guide", but didn't > find > > a > > > concise answer... > > > > > > thanks, > > > -- > > > Eyal Edri > > > > > > > > > > > -- > > Regards, > > Alexander > > > > > > -- > Eyal Edri > -- Regards, Alexander
