You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Raymond Domingo <ra...@domingo.nl> on 2006/04/05 17:14:45 UTC

How to put a Jar in my War

Hello all,

Can any one please explain to me how I can add my Jar file to my War file...
it seems such an easy thing to do...

So currently I have an assembly which create a jar file (I like this)

I also can create a second assembly creating a zip file (looks good)

But if I change the format of this second assembly from zip to war I get an error:
[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] Error creating assembly

Embedded error: webxml attribute is required (or pre-existing WEB-INF/web.xml
if executing in update mode)
[INFO] 

One thing I notice that inside my zip file it says web-inf/web.xml and not
WEB-INF/web.xml


Any way to solve this problem ?

thnx,
raymond

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


Re: How to put a Jar in my War

Posted by Mang Jun Lau <Ma...@otpp.com>.
Hi,

In your pom.xml for your war, I believe you need the following:

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <webXml>/path/to/web.xml</webXml> <!-- specify location of 
web.xml here -->
        </configuration>
      </plugin>
    </plugins>
  </build>


_Mang Lau





"Raymond Domingo" <ra...@domingo.nl> 
04/05/2006 11:14 AM
Please respond to
"Maven Users List" <us...@maven.apache.org>


To
users@maven.apache.org
cc

Subject
How to put a Jar in my War






Hello all,

Can any one please explain to me how I can add my Jar file to my War 
file...
it seems such an easy thing to do...

So currently I have an assembly which create a jar file (I like this)

I also can create a second assembly creating a zip file (looks good)

But if I change the format of this second assembly from zip to war I get 
an error:
[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
----------------------------------------------------------------------------
[INFO] Error creating assembly

Embedded error: webxml attribute is required (or pre-existing 
WEB-INF/web.xml
if executing in update mode)
[INFO] 

One thing I notice that inside my zip file it says web-inf/web.xml and not
WEB-INF/web.xml


Any way to solve this problem ?

thnx,
raymond

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