You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ashley Williams <ag...@mac.com> on 2005/11/26 12:10:49 UTC
[m2] configuring war plugin
Hi
Before I file a jira issue is there some way of configuring the war
plugin so that it essentially does the bare minimum of jaring up my
classes directory and using a .war extension? Currently I don't need
any of the bells and whistles such as autogenerating the web.xml file
as I use xdoclet to do this sort of stuff for me.
Currently I have to configure war like this as a result of the last
discussion I had, which involves a hardcoded value that is subject to
change in order to fool it into copying over a web.xml file that I
have already generated with xdoclet:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0-beta-2</version>
<configuration>
<webXml>${project.build.directory}/generated/src/main/
resources/WEB-INF/web.xml</webXml>
</configuration>
</plugin>
Additionally I can't figure out
how to make it copy over everything else under WEB-INF such as the
jboss web dd so it's actually a blocker.
And even if I eventually figure it out, I would say that the config
options aren't very suitable for working with xdoclet.
Thanks
- Ashley
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: RE : [m2] configuring war plugin
Posted by Ashley Williams <ag...@mac.com>.
I look forward to trying out the patch.
On 26 Nov 2005, at 13:30, Olivier Lamy wrote:
> Hi,
> Look at the issue http://jira.codehaus.org/browse/MNG-1683.
> I'm actually working to implements this feature (war plugin
> modification
> + a maven-zip-plugin to implements <package>zip</package>) (It's
> due to
> a company use case).
> With the feature I propose you just need to add this in the
> configuration (Instead of using some other stuffs like embeded ant
> scripts in the pom to copy resources) :
>
> <configuration>
>
> <warSourceDirectory>${baseDir}/src/main/webapp</warSourceDirectory>
> <webappDirectory
> implementation="java.io.File">${basedir}/webappdir</webappDirectory>
> <resources>
> <!-- adding generating web.xml -->
> <resource>
>
> <directory>${project.build.directory}/generated/xdoclet</directory>
>
> <targetPath>${basedir}/webappdir/WEB-INF</targetPath>
> </resource>
> <!-- adding generating classes by some binding tools -->
> <resource>
>
> <directory>${project.build.directory}/generated/xbeans</directory>
>
> <targetPath>${basedir}/webappdir/WEB-INF/classes</targetPath>
>
> </resource>
> <!--
> adding html content coming from an other artifact zip
> type or anything else
> jar + unpack true will be honored but doesn't make sense
> ;-)
> -->
> <resource>
> <targetPath>${basedir}/webappdir</targetPath>
> <dependencies>
>
> <dependency>
> <groupId>groupId</groupId>
> <artifactId>artifactId</artifactId>
> <version>version</version>
> <unpack>true</unpack>
> <type>zip</type>
> </dependency>
> </dependencies>
>
> </resource>
> </resources>
> </configuration>
>
>
> I don't know if this will be integrated in the svn (If not the patch
> will be attached to the issue).
> If you're interested just push a vote ;-)
>
> - Olivier
>
>
>
> -----Message d'origine-----
> De : Ashley Williams [mailto:agwilliams1000@mac.com]
> Envoyé : samedi 26 novembre 2005 12:40
> À : Maven Users List
> Cc : evenisse@apache.org
> Objet : Re: [m2] configuring war plugin
>
>
> Ok, I have managed to come up with a workaround like so:
>
> <configuration>
> <warSourceDirectory>${project.build.directory}/generated/
> src/main/resources</warSourceDirectory>
> </configuration>
>
> In other words I've told it to copy everything from under generated
> resources - that just happens to be the
> xdoclet generated WEB-INF dir.
>
> Hardcoding not ideal but no blocker - I'm happy.
>
> - Ashley
>
> On 26 Nov 2005, at 11:10, Ashley Williams wrote:
>
>> Hi
>>
>> Before I file a jira issue is there some way of configuring the war
>> plugin so that it essentially does the bare minimum of jaring up my
>> classes directory and using a .war extension? Currently I don't
>> need any of the bells and whistles such as autogenerating the
>> web.xml file as I use xdoclet to do this sort of stuff for me.
>>
>> Currently I have to configure war like this as a result of the last
>> discussion I had, which involves a hardcoded value that is subject
>> to change in order to fool it into copying over a web.xml file that
>> I have already generated with xdoclet:
>>
>>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-war-plugin</artifactId>
>> <version>2.0-beta-2</version>
>> </configuration>
>> </plugin>
>>
>> Additionally I can't figure out
>> how to make it copy over everything else under WEB-INF such as the
>> jboss web dd so it's actually a blocker.
>> And even if I eventually figure it out, I would say that the config
>> options aren't very suitable for working with xdoclet.
>>
>> Thanks
>> - Ashley
>>
>> ---------------------------------------------------------------------
>> 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
>
>
>
> This e-mail, any attachments and the information contained therein
> ("this message") are confidential and intended solely for the use
> of the addressee(s). If you have received this message in error
> please send it back to the sender and delete it. Unauthorized
> publication, use, dissemination or disclosure of this message,
> either in whole or in part is strictly prohibited.
> ----------------------------------------------------------------------
> ----------------------------------------
> Ce message électronique et tous les fichiers joints ainsi que les
> informations contenues dans ce message ( ci après "le message" ),
> sont confidentiels et destinés exclusivement à l'usage de la
> personne à laquelle ils sont adressés. Si vous avez reçu ce message
> par erreur, merci de le renvoyer à son émetteur et de le détruire.
> Toutes diffusion, publication, totale ou partielle ou divulgation
> sous quelque forme que se soit non expressément autorisées de ce
> message, sont interdites.
> ----------------------------------------------------------------------
> ---------------------------------------
>
>
> ---------------------------------------------------------------------
> 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 : [m2] configuring war plugin
Posted by Olivier Lamy <ol...@accor.com>.
Hi,
Look at the issue http://jira.codehaus.org/browse/MNG-1683.
I'm actually working to implements this feature (war plugin modification
+ a maven-zip-plugin to implements <package>zip</package>) (It's due to
a company use case).
With the feature I propose you just need to add this in the
configuration (Instead of using some other stuffs like embeded ant
scripts in the pom to copy resources) :
<configuration>
<warSourceDirectory>${baseDir}/src/main/webapp</warSourceDirectory>
<webappDirectory
implementation="java.io.File">${basedir}/webappdir</webappDirectory>
<resources>
<!-- adding generating web.xml -->
<resource>
<directory>${project.build.directory}/generated/xdoclet</directory>
<targetPath>${basedir}/webappdir/WEB-INF</targetPath>
</resource>
<!-- adding generating classes by some binding tools -->
<resource>
<directory>${project.build.directory}/generated/xbeans</directory>
<targetPath>${basedir}/webappdir/WEB-INF/classes</targetPath>
</resource>
<!--
adding html content coming from an other artifact zip
type or anything else
jar + unpack true will be honored but doesn't make sense
;-)
-->
<resource>
<targetPath>${basedir}/webappdir</targetPath>
<dependencies>
<dependency>
<groupId>groupId</groupId>
<artifactId>artifactId</artifactId>
<version>version</version>
<unpack>true</unpack>
<type>zip</type>
</dependency>
</dependencies>
</resource>
</resources>
</configuration>
I don't know if this will be integrated in the svn (If not the patch
will be attached to the issue).
If you're interested just push a vote ;-)
- Olivier
-----Message d'origine-----
De : Ashley Williams [mailto:agwilliams1000@mac.com]
Envoyé : samedi 26 novembre 2005 12:40
À : Maven Users List
Cc : evenisse@apache.org
Objet : Re: [m2] configuring war plugin
Ok, I have managed to come up with a workaround like so:
<configuration>
<warSourceDirectory>${project.build.directory}/generated/
src/main/resources</warSourceDirectory>
</configuration>
In other words I've told it to copy everything from under generated
resources - that just happens to be the
xdoclet generated WEB-INF dir.
Hardcoding not ideal but no blocker - I'm happy.
- Ashley
On 26 Nov 2005, at 11:10, Ashley Williams wrote:
> Hi
>
> Before I file a jira issue is there some way of configuring the war
> plugin so that it essentially does the bare minimum of jaring up my
> classes directory and using a .war extension? Currently I don't
> need any of the bells and whistles such as autogenerating the
> web.xml file as I use xdoclet to do this sort of stuff for me.
>
> Currently I have to configure war like this as a result of the last
> discussion I had, which involves a hardcoded value that is subject
> to change in order to fool it into copying over a web.xml file that
> I have already generated with xdoclet:
>
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <version>2.0-beta-2</version>
> </configuration>
> </plugin>
>
> Additionally I can't figure out
> how to make it copy over everything else under WEB-INF such as the
> jboss web dd so it's actually a blocker.
> And even if I eventually figure it out, I would say that the config
> options aren't very suitable for working with xdoclet.
>
> Thanks
> - Ashley
>
> ---------------------------------------------------------------------
> 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
This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
--------------------------------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers joints ainsi que les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
-------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: [m2] configuring war plugin
Posted by Ashley Williams <ag...@mac.com>.
Ok, I have managed to come up with a workaround like so:
<configuration>
<warSourceDirectory>${project.build.directory}/generated/
src/main/resources</warSourceDirectory>
</configuration>
In other words I've told it to copy everything from under generated
resources - that just happens to be the
xdoclet generated WEB-INF dir.
Hardcoding not ideal but no blocker - I'm happy.
- Ashley
On 26 Nov 2005, at 11:10, Ashley Williams wrote:
> Hi
>
> Before I file a jira issue is there some way of configuring the war
> plugin so that it essentially does the bare minimum of jaring up my
> classes directory and using a .war extension? Currently I don't
> need any of the bells and whistles such as autogenerating the
> web.xml file as I use xdoclet to do this sort of stuff for me.
>
> Currently I have to configure war like this as a result of the last
> discussion I had, which involves a hardcoded value that is subject
> to change in order to fool it into copying over a web.xml file that
> I have already generated with xdoclet:
>
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-war-plugin</artifactId>
> <version>2.0-beta-2</version>
> <configuration>
> <webXml>${project.build.directory}/generated/src/main/
> resources/WEB-INF/web.xml</webXml>
> </configuration>
> </plugin>
>
> Additionally I can't figure out
> how to make it copy over everything else under WEB-INF such as the
> jboss web dd so it's actually a blocker.
> And even if I eventually figure it out, I would say that the config
> options aren't very suitable for working with xdoclet.
>
> Thanks
> - Ashley
>
> ---------------------------------------------------------------------
> 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