You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by singh_rajeev <si...@gmail.com> on 2009/10/26 11:57:27 UTC

zipping the outputDirectory using Assembly plugin

Hi

I've the following lines of code in my assembly.xml
<moduleSet>
<sources>
	<includeModuleDirectory>false</includeModuleDirectory>
<fileSet>
   <directory>sql</directory>
       <outputDirectory>config/schemas</outputDirectory>
	<includes>
		<include>*.sql</include>
	</includes>
</fileSet>
</fileSets>
</sources>
</moduleSet>

This creates a folder schemas in config file when I package it using mvn
assembly plugin.

Instead of a folder I want to create a zip file containing the same folder
structure as specified in <outputDirectory>. I know how to do it in Ant but
don't know how to do it in Maven.
Any help will be appriciated.

Thanks,
Rajeev.
-- 
View this message in context: http://www.nabble.com/zipping-the-outputDirectory-using-Assembly-plugin-tp26057622p26057622.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: zipping the outputDirectory using Assembly plugin

Posted by David Weintraub <qa...@gmail.com>.
I had a similar issue. The easiest way to do this is with the <antrun>
plugin. This will allow you to zip up these files before Maven does the
package stage.

On Mon, Oct 26, 2009 at 6:57 AM, singh_rajeev <si...@gmail.com>wrote:

>
> Hi
>
> I've the following lines of code in my assembly.xml
> <moduleSet>
> <sources>
>        <includeModuleDirectory>false</includeModuleDirectory>
> <fileSet>
>   <directory>sql</directory>
>       <outputDirectory>config/schemas</outputDirectory>
>        <includes>
>                <include>*.sql</include>
>        </includes>
> </fileSet>
> </fileSets>
> </sources>
> </moduleSet>
>
> This creates a folder schemas in config file when I package it using mvn
> assembly plugin.
>
> Instead of a folder I want to create a zip file containing the same folder
> structure as specified in <outputDirectory>. I know how to do it in Ant but
> don't know how to do it in Maven.
> Any help will be appriciated.
>
> Thanks,
> Rajeev.
> --
> View this message in context:
> http://www.nabble.com/zipping-the-outputDirectory-using-Assembly-plugin-tp26057622p26057622.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
David Weintraub
qazwart@gmail.com

Re: zipping the outputDirectory using Assembly plugin

Posted by singh_rajeev <si...@gmail.com>.
One of the ideas that I've got is through book "Maven definitive guide" is to
write a plugin ZipMojo for the task. Is there any other option that can be
used?

singh_rajeev wrote:
> 
> Hi
> 
> I've the following lines of code in my assembly.xml
> <moduleSet>
> <sources>
> 	<includeModuleDirectory>false</includeModuleDirectory>
> <fileSet>
>    <directory>sql</directory>
>        <outputDirectory>config/schemas</outputDirectory>
> 	<includes>
> 		<include>*.sql</include>
> 	</includes>
> </fileSet>
> </fileSets>
> </sources>
> </moduleSet>
> 
> This creates a folder schemas in config file when I package it using mvn
> assembly plugin.
> 
> Instead of a folder I want to create a zip file containing the same folder
> structure as specified in <outputDirectory>. I know how to do it in Ant
> but don't know how to do it in Maven.
> Any help will be appriciated.
> 
> Thanks,
> Rajeev.
> 

-- 
View this message in context: http://www.nabble.com/zipping-the-outputDirectory-using-Assembly-plugin-tp26057622p26107221.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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