You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Manuel Ramirez Velasco <ma...@lineadirecta.es> on 2010/10/25 12:52:48 UTC

Zip Assembly Problem

Hello, I´ve a problem using maven assembly plugin.

I´m using my own assembly descriptor:

<assembly xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 
http://maven.apache.org/xsd/assembly-1.1.0.xsd">
  <id>updateZip</id>
  <formats>
    <format>zip</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>
  <fileSets>
    <fileSet>
        <outputDirectory>${artifactId}.war</outputDirectory>
        <directory>${project.build.directory}</directory>
            <excludes>
                <exclude>*.metadata</exclude>
                <exclude>*.zip</exclude>
                <exclude>maven-archiver</exclude>
                <exclude>archive-tmp</exclude>
                <exclude>${artifactId}.jar</exclude>
            </excludes>
    </fileSet>
    <fileSet>
        <outputDirectory>${artifactId}.war</outputDirectory>
        <directory>WebContent</directory>
            <excludes>
                <exclude>*.metadata</exclude>
            </excludes>
    </fileSet>
  </fileSets>
</assembly>

This descriptor packages the app in a zip archive.

I´m generating a changes package in a zip file that allow me to deploy WAS 
update zips of an application deployed in WAS 6.0.

The problem is that the zip format of the asembly plugin store the zip y a 
temp folder and the zip is not generated cleaned everytime. I need to 
generate a clean zip everytime with the actual changes only, without 
previous changes.

How can I resolve this problem??

Cheers

PD: Excuse me for my bad english!!!






Visítenos en:  www.lineadirecta.com  

"Este mensaje y los documentos que, en su caso, lleve anexos, pueden contener información confidencial. Por ello, se informa a quien lo reciba por error que la información contenida en el mismo es reservada y su uso no autorizado está prohibido legalmente, por lo que en tal caso le rogamos se abstenga de realizar copias del mensaje, leerlo, remitirlo o difundirlo y proceda a borrarlo inmediatamente." 

"This message is intended only for the use of the individual to whom it is addressed and may contain information that is confidential. If you have received this communication, by error, you are hereby notified that any distribution or copying of this communication is prohibited."   

Re: Zip Assembly Problem

Posted by Antonio Petrelli <an...@gmail.com>.
2010/10/25 Manuel Ramirez Velasco <ma...@lineadirecta.es>:
> Excuse me if i don´t explain the problem correctly. The problem isn´t WAS
> or update zips.
>
> The problem is:
>
> In my folder I have a two items:
>
> FOLDER/src/one.java
>                  /src/two.java
>
> I am generating a zip:
>
> FOLDER.zip/WEB-INF/classes/one.class
>                        /WEB-INF/classes/two.class
>
> The second time that I run de maven assembly plugin I have in the folder:
>
> FOLDER/src/three.java
>
> And the assembly plugin is generating:
>
> FOLDER.zip/WEB-INF/classes/one.class
>                        /WEB-INF/classes/two.class
>                        /WEB-INF/classes/three.class
>
> where should generate:
>
> FOLDER.zip/WEB-INF/classes/three.class

I see, then run mvn clean before assemblying.

Antonio

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


Re: Zip Assembly Problem

Posted by Manuel Ramirez Velasco <ma...@lineadirecta.es>.
Hello Antonio, thanks for your reply.

Excuse me if i don´t explain the problem correctly. The problem isn´t WAS 
or update zips.

The problem is:

In my folder I have a two items:

FOLDER/src/one.java
                  /src/two.java

I am generating a zip:

FOLDER.zip/WEB-INF/classes/one.class
                        /WEB-INF/classes/two.class

The second time that I run de maven assembly plugin I have in the folder:

FOLDER/src/three.java

And the assembly plugin is generating:

FOLDER.zip/WEB-INF/classes/one.class
                        /WEB-INF/classes/two.class
                        /WEB-INF/classes/three.class

where should generate:

FOLDER.zip/WEB-INF/classes/three.class

Cheers




Antonio Petrelli <an...@gmail.com> 
25/10/2010 13:24
Por favor, responda a
"Maven Users List" <us...@maven.apache.org>


Para
Maven Users List <us...@maven.apache.org>
cc

Asunto
Re: Zip Assembly Problem






2010/10/25 Manuel Ramirez Velasco <ma...@lineadirecta.es>:
> Hello, I´ve a problem using maven assembly plugin.
>...
> I´m generating a changes package in a zip file that allow me to deploy 
WAS
> update zips of an application deployed in WAS 6.0.

In other words, you're trying to use the assembly plugin to package a
partial app zip file.
I think that there is a big obstacle: how do you know what is deployed
on the WAS server?
Even if you know it, you should compute the differences (I really
don't know how) and, after that, package a zip with the computed
differences.
At the end, you'll notice that packaging the complete app is easier.
Or, if you really want to do it, you will need to create an ad hoc
plugin.
You might want to ask the team behind this plugin:
http://mojo.codehaus.org/was6-maven-plugin/
They might help more than us.

Ciao
Antonio

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




Visítenos en:  www.lineadirecta.com  

"Este mensaje y los documentos que, en su caso, lleve anexos, pueden contener información confidencial. Por ello, se informa a quien lo reciba por error que la información contenida en el mismo es reservada y su uso no autorizado está prohibido legalmente, por lo que en tal caso le rogamos se abstenga de realizar copias del mensaje, leerlo, remitirlo o difundirlo y proceda a borrarlo inmediatamente." 

"This message is intended only for the use of the individual to whom it is addressed and may contain information that is confidential. If you have received this communication, by error, you are hereby notified that any distribution or copying of this communication is prohibited."   

Re: Zip Assembly Problem

Posted by Antonio Petrelli <an...@gmail.com>.
2010/10/25 Manuel Ramirez Velasco <ma...@lineadirecta.es>:
> Hello, I´ve a problem using maven assembly plugin.
>...
> I´m generating a changes package in a zip file that allow me to deploy WAS
> update zips of an application deployed in WAS 6.0.

In other words, you're trying to use the assembly plugin to package a
partial app zip file.
I think that there is a big obstacle: how do you know what is deployed
on the WAS server?
Even if you know it, you should compute the differences (I really
don't know how) and, after that, package a zip with the computed
differences.
At the end, you'll notice that packaging the complete app is easier.
Or, if you really want to do it, you will need to create an ad hoc
plugin.
You might want to ask the team behind this plugin:
http://mojo.codehaus.org/was6-maven-plugin/
They might help more than us.

Ciao
Antonio

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