You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Steinhauer, Frank" <f....@olympus-odl.com> on 2007/06/19 12:48:09 UTC
How do I add jars to my WAR-file ?
Hi there,
how do I add JARs from the repository to my WAR file, using a special
directory (not in WEB-INF/lib)? I tried using the assembly plugin, but I
can't get it to do something.... When using goal "attached", nothing
happens, when using "directory-inline", I get an error message (see
below). Please help someone!
Cheers,
Frank
Plugin config in my sub-project-pom:
BEGIN_CODEBLOCK
-----------------------------------------------------------------
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptors>
<descriptor>src/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
END_CODEBLOCK
My assembly.xml:
BEGIN_CODEBLOCK
-----------------------------------------------------------------
<assembly>
<id>janus-jars</id>
<appendAssemblyId>false</appendAssemblyId>
<dependencySets>
<dependencySet>
<outputDirectory>janus-libs</outputDirectory>
<includes>
<include>commons-collections:commons-collections:3.1:jar</include>
<include>commons-lang:commons-lang:2.0:jar</include>
<include>commons-logging:commons-logging:1.0.4:jar</include>
<include>org.hibernate:hibernate:3.0.5:jar</include>
</includes>
</dependencySet>
</dependencySets>
</assembly>
--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
END_CODEBLOCK
When using <goal>directory-inline</goal>:
BEGIN_CODEBLOCK
-----------------------------------------------------------------
[INFO] Processing DependencySet (output=janus-libs)
[WARNING] The following patterns were never triggered in this artifact
inclusion filter:
o 'commons-collections:commons-collections:3.1:jar'
o 'commons-lang:commons-lang:2.0:jar'
o 'commons-logging:commons-logging:1.0.4:jar'
o 'org.hibernate:hibernate:3.0.5:jar'
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error creating assembly: Error creating assembly archive: You
must set at least one file.
END_CODEBLOCK--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--
+--+--
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
AW: How do I add jars to my WAR-file ?
Posted by "Steinhauer, Frank" <f....@olympus-odl.com>.
Thanks, it worked! Haven't seen it....
-----Ursprüngliche Nachricht-----
Von: Jochen Wiedmann [mailto:jochen.wiedmann@gmail.com]
Gesendet: Dienstag, 19. Juni 2007 12:53
An: Maven Users List
Betreff: Re: How do I add jars to my WAR-file ?
On 6/19/07, Steinhauer, Frank <f....@olympus-odl.com> wrote:
> how do I add JARs from the repository to my WAR file, using a special
> directory (not in WEB-INF/lib)?
Use the maven-dependency-plugin.
--
"Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.
The german government justifying the use of electronic voting machines
and obviously believing that we don't need a police, because all
illegal actions are forbidden.
http://dip.bundestag.de/btd/16/051/1605194.pdf
---------------------------------------------------------------------
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: How do I add jars to my WAR-file ?
Posted by Jochen Wiedmann <jo...@gmail.com>.
On 6/19/07, Steinhauer, Frank <f....@olympus-odl.com> wrote:
> how do I add JARs from the repository to my WAR file, using a special
> directory (not in WEB-INF/lib)?
Use the maven-dependency-plugin.
--
"Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.
The german government justifying the use of electronic voting machines
and obviously believing that we don't need a police, because all
illegal actions are forbidden.
http://dip.bundestag.de/btd/16/051/1605194.pdf
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org