You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Enrique Gaona <eg...@us.ibm.com> on 2007/02/26 19:33:47 UTC
Problem building war file
Hi,
I'm running into problems building my war file. Inside my parent pom, I am
adding entry to my manifest file, but when it creates the war file, it
complains about an Embedded error. Anyone seen this before?
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<BuildVersion>${buildNumber}</BuildVersion>
</manifestEntries>
</archive>
</configuration>
</plugin>
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error assembling WAR
Embedded error: The attribute "BuildVersion" may not occur more than once
in the same section
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 minutes 52 seconds
[INFO] Finished at: Mon Feb 26 12:28:34 CST 2007
[INFO] Final Memory: 40M/110M
[INFO]
------------------------------------------------------------------------
Thanks
Enrique
Re: Problem building war file
Posted by Enrique Gaona <eg...@us.ibm.com>.
Julian,
Yes, I realized that after I looked at the version of my plugin. Thanks.
Enrique
Julian Wood <wo...@ucalgary.ca> wrote on 02/28/2007 12:37:02 PM:
> The problem is with different versions of the war plugin. Version
> 2.0.1 and below used the syntax you tried, while newer versions need
> additional configuration. The additional config is not backwards
> compatible.
>
> Try this:
>
> <archive>
> <manifest>
> <addDefaultImplementationEntries>true</
> addDefaultImplementationEntries>
> </manifest>
> <manifestEntries>
> < BuildVersion >${buildNumber}</BuildVersion>
> </manifestEntries>
> </archive>
>
> You should also specify that you need version 2.0.2 (or greater) of
> the war plugin, either in pluginManagement, or in the plugin spec
> itself.
>
> J
>
> On 26-Feb-07, at 1:01 PM, Jo Vandermeeren wrote:
>
> > Hi Enrique,
> >
> > Well.. Do you add a BuildVersion attribute to the manifest
> > someplace else?
> >
> > Cheers
> > Jo
> >
> > On 2/26/07, Enrique Gaona <eg...@us.ibm.com> wrote:
> >>
> >>
> >> Hi,
> >> I'm running into problems building my war file. Inside my parent
> >> pom, I
> >> am
> >> adding entry to my manifest file, but when it creates the war
> >> file, it
> >> complains about an Embedded error. Anyone seen this before?
> >>
> >>
> >> <plugin>
> >> <artifactId>maven-war-plugin</
> >> artifactId>
> >> <configuration>
> >> <archive>
> >> <manifestEntries>
> >>
> >> <BuildVersion>${buildNumber}</BuildVersion>
> >> </manifestEntries>
> >> </archive>
> >> </configuration>
> >> </plugin>
> >>
> >> [INFO]
> >> ---------------------------------------------------------------------
> >> ---
> >> [ERROR] BUILD ERROR
> >> [INFO]
> >> ---------------------------------------------------------------------
> >> ---
> >> [INFO] Error assembling WAR
> >>
> >> Embedded error: The attribute "BuildVersion" may not occur more
> >> than once
> >> in the same section
> >> [INFO]
> >> ---------------------------------------------------------------------
> >> ---
> >> [INFO] For more information, run Maven with the -e switch
> >> [INFO]
> >> ---------------------------------------------------------------------
> >> ---
> >> [INFO] Total time: 2 minutes 52 seconds
> >> [INFO] Finished at: Mon Feb 26 12:28:34 CST 2007
> >> [INFO] Final Memory: 40M/110M
> >> [INFO]
> >> ---------------------------------------------------------------------
> >> ---
> >>
> >> Thanks
> >>
> >> Enrique
> >>
>
> --
> Julian Wood <wo...@ucalgary.ca>
>
> Software Engineer
> Teaching & Learning Centre
> University of Calgary
>
> http://tlc.ucalgary.ca
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
Re: Problem building war file
Posted by Julian Wood <wo...@ucalgary.ca>.
The problem is with different versions of the war plugin. Version
2.0.1 and below used the syntax you tried, while newer versions need
additional configuration. The additional config is not backwards
compatible.
Try this:
<archive>
<manifest>
<addDefaultImplementationEntries>true</
addDefaultImplementationEntries>
</manifest>
<manifestEntries>
< BuildVersion >${buildNumber}</BuildVersion>
</manifestEntries>
</archive>
You should also specify that you need version 2.0.2 (or greater) of
the war plugin, either in pluginManagement, or in the plugin spec
itself.
J
On 26-Feb-07, at 1:01 PM, Jo Vandermeeren wrote:
> Hi Enrique,
>
> Well.. Do you add a BuildVersion attribute to the manifest
> someplace else?
>
> Cheers
> Jo
>
> On 2/26/07, Enrique Gaona <eg...@us.ibm.com> wrote:
>>
>>
>> Hi,
>> I'm running into problems building my war file. Inside my parent
>> pom, I
>> am
>> adding entry to my manifest file, but when it creates the war
>> file, it
>> complains about an Embedded error. Anyone seen this before?
>>
>>
>> <plugin>
>> <artifactId>maven-war-plugin</
>> artifactId>
>> <configuration>
>> <archive>
>> <manifestEntries>
>>
>> <BuildVersion>${buildNumber}</BuildVersion>
>> </manifestEntries>
>> </archive>
>> </configuration>
>> </plugin>
>>
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [ERROR] BUILD ERROR
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [INFO] Error assembling WAR
>>
>> Embedded error: The attribute "BuildVersion" may not occur more
>> than once
>> in the same section
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [INFO] For more information, run Maven with the -e switch
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>> [INFO] Total time: 2 minutes 52 seconds
>> [INFO] Finished at: Mon Feb 26 12:28:34 CST 2007
>> [INFO] Final Memory: 40M/110M
>> [INFO]
>> ---------------------------------------------------------------------
>> ---
>>
>> Thanks
>>
>> Enrique
>>
--
Julian Wood <wo...@ucalgary.ca>
Software Engineer
Teaching & Learning Centre
University of Calgary
http://tlc.ucalgary.ca
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Problem building war file
Posted by Enrique Gaona <eg...@us.ibm.com>.
Hi Jo,
I only see this error on my SLES10 dev box, but not on my RHEL3 build
server. The workaround wouId be to add the attribute to the children
pom.xml files rather than the parent, but I would have to do so in 50
different poms, would be a PITA, imo;-)
Cheers
Enrique
"Jo Vandermeeren"
<jo.vandermeeren@
gmail.com> To
"Maven Users List"
02/26/2007 02:01 <us...@maven.apache.org>
PM cc
Subject
Please respond to Re: Problem building war file
"Maven Users
List"
<users@maven.apac
he.org>
Hi Enrique,
Well.. Do you add a BuildVersion attribute to the manifest someplace else?
Cheers
Jo
On 2/26/07, Enrique Gaona <eg...@us.ibm.com> wrote:
>
>
> Hi,
> I'm running into problems building my war file. Inside my parent pom, I
> am
> adding entry to my manifest file, but when it creates the war file, it
> complains about an Embedded error. Anyone seen this before?
>
>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <archive>
> <manifestEntries>
>
> <BuildVersion>${buildNumber}</BuildVersion>
> </manifestEntries>
> </archive>
> </configuration>
> </plugin>
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error assembling WAR
>
> Embedded error: The attribute "BuildVersion" may not occur more than once
> in the same section
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2 minutes 52 seconds
> [INFO] Finished at: Mon Feb 26 12:28:34 CST 2007
> [INFO] Final Memory: 40M/110M
> [INFO]
> ------------------------------------------------------------------------
>
> Thanks
>
> Enrique
>
Re: Problem building war file
Posted by Jo Vandermeeren <jo...@gmail.com>.
Hi Enrique,
Well.. Do you add a BuildVersion attribute to the manifest someplace else?
Cheers
Jo
On 2/26/07, Enrique Gaona <eg...@us.ibm.com> wrote:
>
>
> Hi,
> I'm running into problems building my war file. Inside my parent pom, I
> am
> adding entry to my manifest file, but when it creates the war file, it
> complains about an Embedded error. Anyone seen this before?
>
>
> <plugin>
> <artifactId>maven-war-plugin</artifactId>
> <configuration>
> <archive>
> <manifestEntries>
>
> <BuildVersion>${buildNumber}</BuildVersion>
> </manifestEntries>
> </archive>
> </configuration>
> </plugin>
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error assembling WAR
>
> Embedded error: The attribute "BuildVersion" may not occur more than once
> in the same section
> [INFO]
> ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2 minutes 52 seconds
> [INFO] Finished at: Mon Feb 26 12:28:34 CST 2007
> [INFO] Final Memory: 40M/110M
> [INFO]
> ------------------------------------------------------------------------
>
> Thanks
>
> Enrique
>