Hi Jeff, Ron, and other !

Yes, I had tried to use a fileset with directory. It did'nt work. But I had
some mistakes, like ${project.build.outputDirectory} instead
of ${project.build.directory}.

I have found a solution on this way. I put it here if it can help anybody
...

In my pom.xml, I have this plugin section :

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>make-inter</id>
<configuration>
<descriptors>
<descriptor>src/main/assemblies/assembly-inter.xml</descriptor>
</descriptors>
*<attach>false</attach>*
*<outputDirectory>${project.build.directory}/inter</outputDirectory>*
</configuration>
<phase>prepare-package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
<execution>
<id>make-final</id>
<configuration>
<descriptors>
<descriptor>src/main/assemblies/assembly-final.xml</descriptor>
</descriptors>
</configuration>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>

Note the *<attach>false</attach>* for the first ZIP file to not attach this
intermediate ZIP file to the artefact (and to avoid a Maven warnin/error).

Note also the following instruction to generate the intermediate ZIP file
in a specified directory :

*<outputDirectory>${project.build.directory}/inter</outputDirectory>*

To generate the first intermediate ZIP file, the assembly file
"assembly-inter.xml" is very classic.

For the final ZIP file, the assembly-final.xml file contains the following
section to include all files generated in the "inter" directory :

<fileSets>
...
<fileSet>
<directory>*${project.build.directory}/inter*</directory>
<outputDirectory>/</outputDirectory>
 </fileSet>
...
</fileSets>

Thanks for your helps !

Xavier






2012/11/28 Jeff MAURY <[email protected]>

> I don't feel he is not following the Maven way if the first ZIP is not
> attached to the project
>
> Jeff
>
>
>
> On Wed, Nov 28, 2012 at 2:50 PM, Ron Wheeler <
> [email protected]
> > wrote:
>
> > General rule - one artifact from one project.
> >
> > First get your zip with a zip included, working by doing it the Maven
> way.
> > Then see if it is worth optimizing the process.
> >
> > Ron
> >
> >
> > On 28/11/2012 8:42 AM, Jeff MAURY wrote:
> >
> >> Can'y you use a fileset with directory element being to your project
> >> output
> >> directory, it should include the first ZIP file, no ?
> >>
> >> Jeff
> >>
> >>
> >> On Wed, Nov 28, 2012 at 2:39 PM, Xavier NOPRE <[email protected]> wrote:
> >>
> >>  Hi all,
> >>>
> >>> With Maven (3.0.3), I can generate a ZIP file containing some resources
> >>> from my projet, with maven-assembly-plugin and an assembly.xml
> >>> descriptor.
> >>> OK.
> >>>
> >>> I can also generate 2 different ZIP files with 2 executions binded on
> >>> different phases. OK.
> >>>
> >>> Now, I need to generate the second ZIP file containing some resources
> and
> >>> the first generated ZIP file. I can do that with a separated module to
> >>> generate the first ZIP file. But is it possible without modules, just
> one
> >>> Maven project ?
> >>>
> >>> In fact, my problem is how to reference the first ZIP file in the
> >>> assembly.xml for the second ZIP file generation.
> >>>
> >>> Thanks for any help,
> >>>
> >>> Xavier
> >>>
> >>>
> >>
> >>
> >
> > --
> > Ron Wheeler
> > President
> > Artifact Software Inc
> > email: [email protected]
> > skype: ronaldmwheeler
> > phone: 866-970-2435, ext 102
> >
> >
> > ------------------------------**------------------------------**---------
> > To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org<
> [email protected]>
> > For additional commands, e-mail: [email protected]
> >
> >
>
>
> --
> Jeff MAURY
>
>
> "Legacy code" often differs from its suggested alternative by actually
> working and scaling.
>  - Bjarne Stroustrup
>
> http://www.jeffmaury.com
> http://riadiscuss.jeffmaury.com
> http://www.twitter.com/jeffmaury
>

Reply via email to