You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Julien HENRY <he...@yahoo.fr> on 2009/06/04 15:28:58 UTC
Re : Maven collect JAR files into one ZIP
Hi,
No need for the dependency plugin. The assembly plugin alone will do the job:
in pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-3</version>
<configuration>
<descriptors>
<descriptor>src/main/assembly/bundle.xml</descriptor>
</descriptors>
</configuration>
</plugin>
bundle.xml
<assembly>
<id>bundle</id>
<formats>
<format>zip</format>
</formats>
<dependencySets>
<dependencySet>
<unpack>false</unpack>
<scope>runtime</scope>
<useProjectArtifact>true</useProjectArtifact>
</dependencySet>
</dependencySets>
</assembly>
Regards,
Julien
________________________________
De : Krabi <im...@hot.ee>
À : users@maven.apache.org
Envoyé le : Jeudi, 4 Juin 2009, 15h13mn 30s
Objet : Re: Maven collect JAR files into one ZIP
Thanks!
This solution is good enough :)
Nick Stolwijk-4 wrote:
>
> I think the combination of dependency:copy-dependencies [1] and the
> assembly plugin will do what you want.
>
> [1]
> http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
>
> Hth,
>
> Nick Stolwijk
> ~Java Developer~
>
> Iprofs BV.
> Claus Sluterweg 125
> 2012 WS Haarlem
> www.iprofs.nl
>
>
>
> On Thu, Jun 4, 2009 at 7:59 AM, Krabi <im...@hot.ee> wrote:
>>
>> Yes I know that.
>> Jar-with-deps is taking out all class files from all dep. JAR files and
>> put
>> them into one single JAR file. I don't need that. Is nice to have one ZIP
>> where JARs are collected together.As same way how WAR files are built
>> with
>> maven. Inside WAR are also dep. jar files located.
>> As I understand there isn't such a plug-in for that?
>>
>> If I need develop it by my self, is it hard do develop? What
>> libraries/APIs
>> I must to know? Is there POM parser and some Maven APIs for getting for
>> project(for POM) list of all JARs(recursively resolved) with full path
>> from
>> local repository(like C:\Repo\org\some\lib\1.0\x-1.0.jar)? I know basic
>> of
>> making plug-ins but I don't know much about Maven APIs - how to get list
>> of
>> files and how to get maven context info(repository location, etc) and how
>> to
>> get plug-in configuration? Does I need to parse POM and toher XML files
>> by
>> my self or that functionality is supported by some Maven API? Any
>> suggestion
>> to read, search?
>>
>>
>> Wayne Fay wrote:
>>>
>>>> I think that better is to have plug-in that resolves deps(from POM) and
>>>> adds
>>>> into one ZIP.
>>>> Jar with deps is not nice solution - long build proccess and I cant
>>>> send
>>>> send ~50MB files.
>>>
>>> You realize that the Jar file format is essentially "zip plus some
>>> text files", right? What do you think would be magically different in
>>> this proposed Zip vs what Jar with deps is producing?
>>>
>>> Wayne
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Maven-collect-JAR-files-into-one-ZIP-tp23849432p23864206.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
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Maven-collect-JAR-files-into-one-ZIP-tp23849432p23869693.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