You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stefano Fornari <st...@gmail.com> on 2013/01/27 21:35:39 UTC

excluding web content from an assembly of a war project

Hi All,
I have a war project which generate its own war package on mvn package
Then I want to create a tgz package with some other content, in particular
excluding the content under src/main/webapp.
I could not find a way to do it or an answer from other questrions... does
anyone know how to do it?

Thanks in advance,

-- 
Ste

Re: excluding web content from an assembly of a war project

Posted by Stefano Fornari <st...@gmail.com>.
Ah, ok, sorry for the lack of information, I thought it was a kind of dumb
question (meaning done by a beginner) :). Thanks a lot for your help and
effort, here some links:

The pom:
https://github.com/stefanofornari/beanshellweb/blob/master/webapp/pom.xml

The assembly file:
https://github.com/stefanofornari/beanshellweb/blob/master/webapp/src/main/assembly/bin.xml

Then, after packaging, here is the content of the dir:

[ste beanshellweb-webapp-1.1-SNAPSHOT] =)o ls -la
total 44
drwxrwxr-x  9 ste ste 4096 Jan 28 13:07 .
drwxrwxr-x 10 ste ste 4096 Jan 28 13:07 ..
drwxrwxr-x  2 ste ste 4096 Jan 28 13:07 bin
drwxrwxr-x  5 ste ste 4096 Jan 28 13:06 bootstrap
drwxrwxr-x  4 ste ste 4096 Jan 28 13:06 console
-rw-rw-r--  1 ste ste  485 Jan 28 13:04 favicon.png
-rw-rw-r--  1 ste ste 1649 Jan 28 13:04 index.html
drwxrwxr-x  2 ste ste 4096 Jan 28 13:07 lib
drwxrwxr-x  2 ste ste 4096 Jan 28 13:06 META-INF
drwxrwxr-x  6 ste ste 4096 Jan 28 13:07 webapps
drwxrwxr-x  5 ste ste 4096 Jan 28 13:06 WEB-INF

Interestingly, I now checked the tgz and the content instead is fine,
therefore the problem seems to be only for the dir distribution.

[ste target] =)o tar tvzf beanshellweb-webapp-1.1-SNAPSHOT.tar.gz
-rw-rw-r-- ste/ste       17112 2013-01-28 13:06
lib/beanshellweb-lib-1.1-SNAPSHOT.jar
-rw-rw-r-- ste/ste      281694 2011-06-25 17:57 lib/bsh-2.0b4.jar
-rw-rw-r-- ste/ste      414240 2012-10-24 18:36 lib/jstl-1.2.jar
-rw-rw-r-- ste/ste      100535 2013-01-20 21:57
lib/jetty-servlet-9.0.0.M4.jar
-rw-rw-r-- ste/ste       91047 2013-01-20 21:57
lib/jetty-security-9.0.0.M4.jar
-rw-rw-r-- ste/ste      318206 2013-01-20 21:57
lib/jetty-server-9.0.0.M4.jar
-rw-rw-r-- ste/ste      200387 2013-01-20 21:57
lib/javax.servlet-3.0.0.v201112011016.jar
-rw-rw-r-- ste/ste      101594 2013-01-20 21:57 lib/jetty-http-9.0.0.M4.jar
-rw-rw-r-- ste/ste      294351 2013-01-20 21:57 lib/jetty-util-9.0.0.M4.jar
-rw-rw-r-- ste/ste       91162 2013-01-20 21:57 lib/jetty-io-9.0.0.M4.jar
-rw-rw-r-- ste/ste      185140 2012-12-16 22:43 lib/commons-io-2.4.jar
-rw-rw-r-- ste/ste      449505 2012-12-05 15:27 lib/velocity-1.7.jar
-rw-rw-r-- ste/ste      575389 2011-11-30 11:28
lib/commons-collections-3.2.1.jar
-rw-rw-r-- ste/ste      261809 2011-08-09 18:37 lib/commons-lang-2.4.jar
-rw-rw-r-- ste/ste     3149303 2013-01-28 13:06
lib/beanshellweb-webapp-1.1-SNAPSHOT.war
-rwxrwxr-x ste/ste        1108 2013-01-28 13:07 bin/steapp
drwxrwxrwx 1000/1000         0 2013-01-28 13:04 webapps/console/
drwxrwxrwx ste/ste           0 2013-01-28 13:04 webapps/console/c/
drwxrwxrwx ste/ste           0 2013-01-28 13:04 webapps/console/v/
drwxrwxrwx 1000/1000         0 2013-01-28 13:04 webapps/bootstrap/
drwxrwxrwx ste/ste           0 2013-01-28 13:04 webapps/bootstrap/img/
drwxrwxrwx ste/ste           0 2013-01-28 13:04 webapps/bootstrap/css/
drwxrwxrwx ste/ste           0 2013-01-28 13:04 webapps/bootstrap/js/
drwxrwxrwx ste/ste           0 2013-01-28 13:04 webapps/WEB-INF/bsh/
drwxrwxrwx 1000/1000         0 2013-01-28 13:04 webapps/META-INF/
-rwxrwxrwx ste/ste         603 2013-01-28 13:04 webapps/console/c/exec.bsh
-rwxrwxrwx ste/ste        1060 2013-01-28 13:04 webapps/console/v/main.v
-rwxrwxrwx ste/ste        1182 2013-01-28 13:04 webapps/console/v/main.jsp
-rwxrwxrwx ste/ste         161 2013-01-28 13:04 webapps/console/index.html
-rwxrwxrwx ste/ste       12799 2013-01-28 13:04
webapps/bootstrap/img/glyphicons-halflings.png
-rwxrwxrwx ste/ste        8777 2013-01-28 13:04
webapps/bootstrap/img/glyphicons-halflings-white.png
-rwxrwxrwx ste/ste      103314 2013-01-28 13:04
webapps/bootstrap/css/bootstrap.min.css
-rwxrwxrwx ste/ste       16553 2013-01-28 13:04
webapps/bootstrap/css/bootstrap-responsive.min.css
-rwxrwxrwx ste/ste       31596 2013-01-28 13:04
webapps/bootstrap/js/bootstrap.min.js
-rwxrwxrwx ste/ste          14 2013-01-28 13:04 webapps/WEB-INF/.gitignore
-rwxrwxrwx ste/ste        2024 2013-01-28 13:04 webapps/WEB-INF/web.xml
-rwxrwxrwx ste/ste           0 2013-01-28 13:04
webapps/WEB-INF/bsh/attributes.bsh
-rwxrwxrwx ste/ste          80 2013-01-28 13:04 webapps/META-INF/context.xml
-rwxrwxrwx 1000/1000       485 2013-01-28 13:04 webapps/favicon.png
-rwxrwxrwx 1000/1000      1649 2013-01-28 13:04 webapps/index.html

Thanks again in advance,
Stefano




On Mon, Jan 28, 2013 at 9:07 AM, Baptiste MATHUS <ml...@batmat.net> wrote:

> Well, if you already use the assembly-plugin, that would have been great to
> just say it :).
> And then, showing your assembly files might help to help...
>
> Even better, push some project showing your issue on Github for example.
>
> Cheers
>
>
> 2013/1/27 Stefano Fornari <st...@gmail.com>
>
> > Hi Baptiste,
> > of course it is :) What I am saying is that in the tgz produced by the
> > assembly plugin, I find at the root level the content of src/main/webapp,
> > which I do not what.
> >
> > Thanks anyway for your reply!
> >
> > Ste
> >
> >
> > On Sun, Jan 27, 2013 at 9:37 PM, Baptiste MATHUS <ml...@batmat.net> wrote:
> >
> > > Hi,
> > > The standard way to go for this kind of thing is using the Maven
> Assembly
> > > Plugin:
> > > http://maven.apache.org/plugins/maven-assembly-plugin/
> > >
> > > Cheers
> > >
> > >
> > > 2013/1/27 Stefano Fornari <st...@gmail.com>
> > >
> > > > Hi All,
> > > > I have a war project which generate its own war package on mvn
> package
> > > > Then I want to create a tgz package with some other content, in
> > > particular
> > > > excluding the content under src/main/webapp.
> > > > I could not find a way to do it or an answer from other questrions...
> > > does
> > > > anyone know how to do it?
> > > >
> > > > Thanks in advance,
> > > >
> > > > --
> > > > Ste
> > > >
> > > > --
> > > > Baptiste <Batmat> MATHUS - http://batmat.net
> > > > Sauvez un arbre,
> > > > Mangez un castor ! nbsp;!
> > >
> >
> >
> >
> > --
> > Ste
> >
> > --
> > Baptiste <Batmat> MATHUS - http://batmat.net
> > Sauvez un arbre,
> > Mangez un castor ! nbsp;!
>



-- 
Ste

Re: excluding web content from an assembly of a war project

Posted by Baptiste MATHUS <ml...@batmat.net>.
Well, if you already use the assembly-plugin, that would have been great to
just say it :).
And then, showing your assembly files might help to help...

Even better, push some project showing your issue on Github for example.

Cheers


2013/1/27 Stefano Fornari <st...@gmail.com>

> Hi Baptiste,
> of course it is :) What I am saying is that in the tgz produced by the
> assembly plugin, I find at the root level the content of src/main/webapp,
> which I do not what.
>
> Thanks anyway for your reply!
>
> Ste
>
>
> On Sun, Jan 27, 2013 at 9:37 PM, Baptiste MATHUS <ml...@batmat.net> wrote:
>
> > Hi,
> > The standard way to go for this kind of thing is using the Maven Assembly
> > Plugin:
> > http://maven.apache.org/plugins/maven-assembly-plugin/
> >
> > Cheers
> >
> >
> > 2013/1/27 Stefano Fornari <st...@gmail.com>
> >
> > > Hi All,
> > > I have a war project which generate its own war package on mvn package
> > > Then I want to create a tgz package with some other content, in
> > particular
> > > excluding the content under src/main/webapp.
> > > I could not find a way to do it or an answer from other questrions...
> > does
> > > anyone know how to do it?
> > >
> > > Thanks in advance,
> > >
> > > --
> > > Ste
> > >
> > > --
> > > Baptiste <Batmat> MATHUS - http://batmat.net
> > > Sauvez un arbre,
> > > Mangez un castor ! nbsp;!
> >
>
>
>
> --
> Ste
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor ! nbsp;!

Re: excluding web content from an assembly of a war project

Posted by Stefano Fornari <st...@gmail.com>.
Hi Baptiste,
of course it is :) What I am saying is that in the tgz produced by the
assembly plugin, I find at the root level the content of src/main/webapp,
which I do not what.

Thanks anyway for your reply!

Ste


On Sun, Jan 27, 2013 at 9:37 PM, Baptiste MATHUS <ml...@batmat.net> wrote:

> Hi,
> The standard way to go for this kind of thing is using the Maven Assembly
> Plugin:
> http://maven.apache.org/plugins/maven-assembly-plugin/
>
> Cheers
>
>
> 2013/1/27 Stefano Fornari <st...@gmail.com>
>
> > Hi All,
> > I have a war project which generate its own war package on mvn package
> > Then I want to create a tgz package with some other content, in
> particular
> > excluding the content under src/main/webapp.
> > I could not find a way to do it or an answer from other questrions...
> does
> > anyone know how to do it?
> >
> > Thanks in advance,
> >
> > --
> > Ste
> >
> > --
> > Baptiste <Batmat> MATHUS - http://batmat.net
> > Sauvez un arbre,
> > Mangez un castor ! nbsp;!
>



-- 
Ste

Re: excluding web content from an assembly of a war project

Posted by Baptiste MATHUS <ml...@batmat.net>.
Hi,
The standard way to go for this kind of thing is using the Maven Assembly
Plugin:
http://maven.apache.org/plugins/maven-assembly-plugin/

Cheers


2013/1/27 Stefano Fornari <st...@gmail.com>

> Hi All,
> I have a war project which generate its own war package on mvn package
> Then I want to create a tgz package with some other content, in particular
> excluding the content under src/main/webapp.
> I could not find a way to do it or an answer from other questrions... does
> anyone know how to do it?
>
> Thanks in advance,
>
> --
> Ste
>
> --
> Baptiste <Batmat> MATHUS - http://batmat.net
> Sauvez un arbre,
> Mangez un castor ! nbsp;!