You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mick Knutson <mi...@gmail.com> on 2007/01/06 19:08:20 UTC
adding dependant jar to assembly?
I have an assembly I am creating, and I need to add some jar dependencies
from my local repository into the assembly like acegi-1.0.2.jar etc...
How can I do this?
--
Thanks
DJ MICK
(Mick Knutson)
http://www.djmick.com
http://www.myspace.com/djmick_dot_com
http://www.thumpradio.com
Re: adding dependant jar to assembly?
Posted by Mick Knutson <mi...@gmail.com>.
I can't seem to find version 2.2, only 2.1 and this still does not work (the
dependancies are ignored it seems:
<!--
| This is the configuration file for Maven. It can be specified at two
levels:
|
| 1. User Level. This settings.xml file provides configuration for a
single user,
| and is normally provided in $HOME/.m2/settings.xml.
|
| NOTE: This location can be overridden with the system
property:
|
| -
Dorg.apache.maven.user-settings=/path/to/user/settings.xml
|
| 2. Global Level. This settings.xml file provides configuration for all
maven
| users on a machine (assuming they're all using the same
maven
| installation). It's normally provided in
| ${maven.home}/conf/settings.xml.
|
| NOTE: This location can be overridden with the system
property:
|
| -
Dorg.apache.maven.global-settings=/path/to/global/settings.xml
|
| The sections in this sample file are intended to give you a running start
at
| getting the most out of your Maven installation. Where appropriate, the
default
| values (values used when the setting is not specified) are provided.
|
|-->
<assembly>
<formats>
<format>tar</format>
</formats>
<!--<moduleSets>
<moduleSet>
<includes>
<include>org.delta.npi:ear</include>
</includes>
<binaries>
<outputDirectory>project-ear/${artifactId}</outputDirectory>
<includeDependencies>true</includeDependencies>
<unpack>false</unpack>
</binaries>
</moduleSet>
</moduleSets>-->
<dependencySets>
<dependencySet>
<outputDirectory></outputDirectory>
<outputFileNameMapping></outputFileNameMapping>
<unpack>false</unpack>
<scope>runtime</scope>
<includes>
<include>org.acegisecurity:acegi-security</include>
<include>aopalliance:aopalliance</include>
<include>aspectj:aspectj</include>
<include>org.springframework:spring</include>
<include>commons-lang:commons-lang-2.1</include>
<!--<include>aopalliance:aopalliance</include>
<include>aopalliance:aopalliance</include>-->
</includes>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>project-ear/target</directory>
<outputDirectory></outputDirectory>
<includes>
<include>*.ear</include>
</includes>
<excludes>
<exclude>xdocs/**</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${basedir}/src/main/resources/configs</directory>
<outputDirectory></outputDirectory>
<!--<fileMode>1</fileMode>
<directoryMode>0</directoryMode>-->
<includes>
<include>**/*.*</include>
</includes>
<excludes>
<exclude>assembly-descriptor.xml</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${basedir}/src/main/resources/opencms</directory>
<outputDirectory>/tomcat/webapps</outputDirectory>
<!--<fileMode>1</fileMode>
<directoryMode>0</directoryMode>-->
<includes>
<include>**/*.*</include>
</includes>
<excludes>
<exclude>assembly-descriptor.xml</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>
On 1/6/07, Mick Knutson <mi...@gmail.com> wrote:
>
> version 2.2 of what plugin?
>
> Yes, I am using multi-modules
>
>
> On 1/6/07, Patrick Schneider <pschneider@gmail.com > wrote:
> >
> > Is your project a standalone one or multi-module? Are you using
> > version 2.2of the plugin? It should ship with a predefined descriptor
> > for (what sounds
> > like) your situation -- the jar-with-dependencies descriptor... "can be
> > used for general assembly of a binary package with all the dependency
> > libraries included unpacked inside the archive".
> >
> > http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies
> >
> >
> >
> > Patrick
> >
> > On 1/6/07, Mick Knutson <mi...@gmail.com> wrote:
> > >
> > > That did not seem to work. I get all the conf files, but not the DEP.
> > here
> > > is my assembly descriptor:
> > >
> > >
> > > <!--
> > > | This is the configuration file for Maven. It can be specified at two
> > > levels:
> > > |
> > > | 1. User Level. This settings.xml file provides configuration for a
> > > single user,
> > > | and is normally provided in $HOME/.m2/settings.xml.
> > > |
> > > | NOTE: This location can be overridden with the
> > system
> > > property:
> > > |
> > > | -
> > > Dorg.apache.maven.user-settings=/path/to/user/settings.xml
> > > |
> > > | 2. Global Level. This settings.xml file provides configuration for
> > all
> > > maven
> > > | users on a machine (assuming they're all using the
> > same
> > > maven
> > > | installation). It's normally provided in
> > > | ${maven.home}/conf/settings.xml.
> > > |
> > > | NOTE: This location can be overridden with the
> > system
> > > property:
> > > |
> > > | -
> > > Dorg.apache.maven.global-settings=/path/to/global/settings.xml
> > > |
> > > | The sections in this sample file are intended to give you a running
> > > start
> > > at
> > > | getting the most out of your Maven installation. Where appropriate,
> > the
> > > default
> > > | values (values used when the setting is not specified) are provided.
> > > |
> > > |-->
> > >
> > > <assembly>
> > > <formats>
> > > <format>tar</format>
> > > </formats>
> > >
> > > <!--<moduleSets>
> > > <moduleSet>
> > > <includes>
> > > <include>org.delta.npi:ear</include>
> > > </includes>
> > > <binaries>
> > >
> > >
> > <outputDirectory>project-ear/${artifactId}</outputDirectory>
> > > <includeDependencies>true</includeDependencies>
> > > <unpack>false</unpack>
> > > </binaries>
> > > </moduleSet>
> > > </moduleSets>-->
> > >
> > > <fileSets>
> > > <fileSet>
> > > <directory>project-ear/target</directory>
> > > <outputDirectory></outputDirectory>
> > > <includes>
> > > <include>*.ear</include>
> > > </includes>
> > > <excludes>
> > > <exclude>xdocs/**</exclude>
> > > </excludes>
> > > </fileSet>
> > >
> > > <fileSet>
> > >
> > <directory>${basedir}/src/main/resources/configs</directory>
> > > <outputDirectory></outputDirectory>
> > > <!--<fileMode>1</fileMode>
> > > <directoryMode>0</directoryMode>-->
> > > <includes>
> > > <include>**/*.*</include>
> > > </includes>
> > > <excludes>
> > > <exclude>assembly-descriptor.xml</exclude>
> > > </excludes>
> > > </fileSet>
> > >
> > > <fileSet>
> > >
> > <directory>${basedir}/src/main/resources/opencms</directory>
> > > <outputDirectory>/tomcat/webapps</outputDirectory>
> > > <!--<fileMode>1</fileMode>
> > > <directoryMode>0</directoryMode>-->
> > > <includes>
> > > <include>**/*.*</include>
> > > <include>org.acegisecurity:acegi-security </include>
> > > <include>aopalliance:aopalliance</include>
> > > <include>aspectj:aspectj</include>
> > > <include>org.springframework:spring </include>
> > >
> > > </includes>
> > > <excludes>
> > > <exclude>assembly-descriptor.xml</exclude>
> > > </excludes>
> > > </fileSet>
> > >
> > > </fileSets>
> > >
> > > </assembly>
> > >
> > >
> > >
> > >
> > > On 1/6/07, Patrick Schneider <ps...@gmail.com> wrote:
> > > >
> > > > Are you using an assembly descriptor? You should be able to specify
> > > > things
> > > > like which dependencies to include from there.
> > > >
> > > > Have a look here:
> > > >
> > > >
> > > >
> > > http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/including-and-excluding-artifacts.html
> >
> > > >
> > > >
> > > > Patrick
> > > >
> > > > On 1/6/07, Mick Knutson <mi...@gmail.com> wrote:
> > > > >
> > > > > I have an assembly I am creating, and I need to add some jar
> > > > dependencies
> > > > > from my local repository into the assembly like acegi-1.0.2.jaretc...
> > > > >
> > > > > How can I do this?
> > > > >
> > > > > --
> > > > > Thanks
> > > > >
> > > > > DJ MICK
> > > > >
> > > > > (Mick Knutson)
> > > > > http://www.djmick.com
> > > > > http://www.myspace.com/djmick_dot_com
> > > > > http://www.thumpradio.com
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Thanks
> > >
> > > DJ MICK
> > >
> > > (Mick Knutson)
> > > http://www.djmick.com
> > > http://www.myspace.com/djmick_dot_com
> > > http://www.thumpradio.com
> > >
> > >
> >
> >
>
>
> --
> Thanks
>
> DJ MICK
>
> (Mick Knutson)
> http://www.djmick.com
> http://www.myspace.com/djmick_dot_com
> http://www.thumpradio.com
>
--
Thanks
DJ MICK
(Mick Knutson)
http://www.djmick.com
http://www.myspace.com/djmick_dot_com
http://www.thumpradio.com
Re: adding dependant jar to assembly?
Posted by Mick Knutson <mi...@gmail.com>.
version 2.2 of what plugin?
Yes, I am using multi-modules
On 1/6/07, Patrick Schneider <ps...@gmail.com> wrote:
>
> Is your project a standalone one or multi-module? Are you using
> version 2.2of the plugin? It should ship with a predefined descriptor
> for (what sounds
> like) your situation -- the jar-with-dependencies descriptor... "can be
> used for general assembly of a binary package with all the dependency
> libraries included unpacked inside the archive".
>
>
> http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies
>
>
> Patrick
>
> On 1/6/07, Mick Knutson <mi...@gmail.com> wrote:
> >
> > That did not seem to work. I get all the conf files, but not the DEP.
> here
> > is my assembly descriptor:
> >
> >
> > <!--
> > | This is the configuration file for Maven. It can be specified at two
> > levels:
> > |
> > | 1. User Level. This settings.xml file provides configuration for a
> > single user,
> > | and is normally provided in $HOME/.m2/settings.xml.
> > |
> > | NOTE: This location can be overridden with the system
> > property:
> > |
> > | -
> > Dorg.apache.maven.user-settings=/path/to/user/settings.xml
> > |
> > | 2. Global Level. This settings.xml file provides configuration for
> all
> > maven
> > | users on a machine (assuming they're all using the
> same
> > maven
> > | installation). It's normally provided in
> > | ${maven.home}/conf/settings.xml.
> > |
> > | NOTE: This location can be overridden with the system
> > property:
> > |
> > | -
> > Dorg.apache.maven.global-settings=/path/to/global/settings.xml
> > |
> > | The sections in this sample file are intended to give you a running
> > start
> > at
> > | getting the most out of your Maven installation. Where appropriate,
> the
> > default
> > | values (values used when the setting is not specified) are provided.
> > |
> > |-->
> >
> > <assembly>
> > <formats>
> > <format>tar</format>
> > </formats>
> >
> > <!--<moduleSets>
> > <moduleSet>
> > <includes>
> > <include>org.delta.npi:ear</include>
> > </includes>
> > <binaries>
> >
> >
> <outputDirectory>project-ear/${artifactId}</outputDirectory>
> > <includeDependencies>true</includeDependencies>
> > <unpack>false</unpack>
> > </binaries>
> > </moduleSet>
> > </moduleSets>-->
> >
> > <fileSets>
> > <fileSet>
> > <directory>project-ear/target</directory>
> > <outputDirectory></outputDirectory>
> > <includes>
> > <include>*.ear</include>
> > </includes>
> > <excludes>
> > <exclude>xdocs/**</exclude>
> > </excludes>
> > </fileSet>
> >
> > <fileSet>
> > <directory>${basedir}/src/main/resources/configs</directory>
> > <outputDirectory></outputDirectory>
> > <!--<fileMode>1</fileMode>
> > <directoryMode>0</directoryMode>-->
> > <includes>
> > <include>**/*.*</include>
> > </includes>
> > <excludes>
> > <exclude>assembly-descriptor.xml</exclude>
> > </excludes>
> > </fileSet>
> >
> > <fileSet>
> > <directory>${basedir}/src/main/resources/opencms</directory>
> > <outputDirectory>/tomcat/webapps</outputDirectory>
> > <!--<fileMode>1</fileMode>
> > <directoryMode>0</directoryMode>-->
> > <includes>
> > <include>**/*.*</include>
> > <include>org.acegisecurity:acegi-security</include>
> > <include>aopalliance:aopalliance</include>
> > <include>aspectj:aspectj</include>
> > <include>org.springframework:spring</include>
> >
> > </includes>
> > <excludes>
> > <exclude>assembly-descriptor.xml</exclude>
> > </excludes>
> > </fileSet>
> >
> > </fileSets>
> >
> > </assembly>
> >
> >
> >
> >
> > On 1/6/07, Patrick Schneider <ps...@gmail.com> wrote:
> > >
> > > Are you using an assembly descriptor? You should be able to specify
> > > things
> > > like which dependencies to include from there.
> > >
> > > Have a look here:
> > >
> > >
> > >
> >
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/including-and-excluding-artifacts.html
> > >
> > >
> > > Patrick
> > >
> > > On 1/6/07, Mick Knutson <mi...@gmail.com> wrote:
> > > >
> > > > I have an assembly I am creating, and I need to add some jar
> > > dependencies
> > > > from my local repository into the assembly like acegi-1.0.2.jaretc...
> > > >
> > > > How can I do this?
> > > >
> > > > --
> > > > Thanks
> > > >
> > > > DJ MICK
> > > >
> > > > (Mick Knutson)
> > > > http://www.djmick.com
> > > > http://www.myspace.com/djmick_dot_com
> > > > http://www.thumpradio.com
> > > >
> > > >
> > >
> > >
> >
> >
> > --
> > Thanks
> >
> > DJ MICK
> >
> > (Mick Knutson)
> > http://www.djmick.com
> > http://www.myspace.com/djmick_dot_com
> > http://www.thumpradio.com
> >
> >
>
>
--
Thanks
DJ MICK
(Mick Knutson)
http://www.djmick.com
http://www.myspace.com/djmick_dot_com
http://www.thumpradio.com
Re: adding dependant jar to assembly?
Posted by Patrick Schneider <ps...@gmail.com>.
Is your project a standalone one or multi-module? Are you using
version 2.2of the plugin? It should ship with a predefined descriptor
for (what sounds
like) your situation -- the jar-with-dependencies descriptor... "can be
used for general assembly of a binary package with all the dependency
libraries included unpacked inside the archive".
http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies
Patrick
On 1/6/07, Mick Knutson <mi...@gmail.com> wrote:
>
> That did not seem to work. I get all the conf files, but not the DEP. here
> is my assembly descriptor:
>
>
> <!--
> | This is the configuration file for Maven. It can be specified at two
> levels:
> |
> | 1. User Level. This settings.xml file provides configuration for a
> single user,
> | and is normally provided in $HOME/.m2/settings.xml.
> |
> | NOTE: This location can be overridden with the system
> property:
> |
> | -
> Dorg.apache.maven.user-settings=/path/to/user/settings.xml
> |
> | 2. Global Level. This settings.xml file provides configuration for all
> maven
> | users on a machine (assuming they're all using the same
> maven
> | installation). It's normally provided in
> | ${maven.home}/conf/settings.xml.
> |
> | NOTE: This location can be overridden with the system
> property:
> |
> | -
> Dorg.apache.maven.global-settings=/path/to/global/settings.xml
> |
> | The sections in this sample file are intended to give you a running
> start
> at
> | getting the most out of your Maven installation. Where appropriate, the
> default
> | values (values used when the setting is not specified) are provided.
> |
> |-->
>
> <assembly>
> <formats>
> <format>tar</format>
> </formats>
>
> <!--<moduleSets>
> <moduleSet>
> <includes>
> <include>org.delta.npi:ear</include>
> </includes>
> <binaries>
>
> <outputDirectory>project-ear/${artifactId}</outputDirectory>
> <includeDependencies>true</includeDependencies>
> <unpack>false</unpack>
> </binaries>
> </moduleSet>
> </moduleSets>-->
>
> <fileSets>
> <fileSet>
> <directory>project-ear/target</directory>
> <outputDirectory></outputDirectory>
> <includes>
> <include>*.ear</include>
> </includes>
> <excludes>
> <exclude>xdocs/**</exclude>
> </excludes>
> </fileSet>
>
> <fileSet>
> <directory>${basedir}/src/main/resources/configs</directory>
> <outputDirectory></outputDirectory>
> <!--<fileMode>1</fileMode>
> <directoryMode>0</directoryMode>-->
> <includes>
> <include>**/*.*</include>
> </includes>
> <excludes>
> <exclude>assembly-descriptor.xml</exclude>
> </excludes>
> </fileSet>
>
> <fileSet>
> <directory>${basedir}/src/main/resources/opencms</directory>
> <outputDirectory>/tomcat/webapps</outputDirectory>
> <!--<fileMode>1</fileMode>
> <directoryMode>0</directoryMode>-->
> <includes>
> <include>**/*.*</include>
> <include>org.acegisecurity:acegi-security</include>
> <include>aopalliance:aopalliance</include>
> <include>aspectj:aspectj</include>
> <include>org.springframework:spring</include>
>
> </includes>
> <excludes>
> <exclude>assembly-descriptor.xml</exclude>
> </excludes>
> </fileSet>
>
> </fileSets>
>
> </assembly>
>
>
>
>
> On 1/6/07, Patrick Schneider <ps...@gmail.com> wrote:
> >
> > Are you using an assembly descriptor? You should be able to specify
> > things
> > like which dependencies to include from there.
> >
> > Have a look here:
> >
> >
> >
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/including-and-excluding-artifacts.html
> >
> >
> > Patrick
> >
> > On 1/6/07, Mick Knutson <mi...@gmail.com> wrote:
> > >
> > > I have an assembly I am creating, and I need to add some jar
> > dependencies
> > > from my local repository into the assembly like acegi-1.0.2.jar etc...
> > >
> > > How can I do this?
> > >
> > > --
> > > Thanks
> > >
> > > DJ MICK
> > >
> > > (Mick Knutson)
> > > http://www.djmick.com
> > > http://www.myspace.com/djmick_dot_com
> > > http://www.thumpradio.com
> > >
> > >
> >
> >
>
>
> --
> Thanks
>
> DJ MICK
>
> (Mick Knutson)
> http://www.djmick.com
> http://www.myspace.com/djmick_dot_com
> http://www.thumpradio.com
>
>
Re: adding dependant jar to assembly?
Posted by Mick Knutson <mi...@gmail.com>.
That did not seem to work. I get all the conf files, but not the DEP. here
is my assembly descriptor:
<!--
| This is the configuration file for Maven. It can be specified at two
levels:
|
| 1. User Level. This settings.xml file provides configuration for a
single user,
| and is normally provided in $HOME/.m2/settings.xml.
|
| NOTE: This location can be overridden with the system
property:
|
| -
Dorg.apache.maven.user-settings=/path/to/user/settings.xml
|
| 2. Global Level. This settings.xml file provides configuration for all
maven
| users on a machine (assuming they're all using the same
maven
| installation). It's normally provided in
| ${maven.home}/conf/settings.xml.
|
| NOTE: This location can be overridden with the system
property:
|
| -
Dorg.apache.maven.global-settings=/path/to/global/settings.xml
|
| The sections in this sample file are intended to give you a running start
at
| getting the most out of your Maven installation. Where appropriate, the
default
| values (values used when the setting is not specified) are provided.
|
|-->
<assembly>
<formats>
<format>tar</format>
</formats>
<!--<moduleSets>
<moduleSet>
<includes>
<include>org.delta.npi:ear</include>
</includes>
<binaries>
<outputDirectory>project-ear/${artifactId}</outputDirectory>
<includeDependencies>true</includeDependencies>
<unpack>false</unpack>
</binaries>
</moduleSet>
</moduleSets>-->
<fileSets>
<fileSet>
<directory>project-ear/target</directory>
<outputDirectory></outputDirectory>
<includes>
<include>*.ear</include>
</includes>
<excludes>
<exclude>xdocs/**</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${basedir}/src/main/resources/configs</directory>
<outputDirectory></outputDirectory>
<!--<fileMode>1</fileMode>
<directoryMode>0</directoryMode>-->
<includes>
<include>**/*.*</include>
</includes>
<excludes>
<exclude>assembly-descriptor.xml</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>${basedir}/src/main/resources/opencms</directory>
<outputDirectory>/tomcat/webapps</outputDirectory>
<!--<fileMode>1</fileMode>
<directoryMode>0</directoryMode>-->
<includes>
<include>**/*.*</include>
<include>org.acegisecurity:acegi-security</include>
<include>aopalliance:aopalliance</include>
<include>aspectj:aspectj</include>
<include>org.springframework:spring</include>
</includes>
<excludes>
<exclude>assembly-descriptor.xml</exclude>
</excludes>
</fileSet>
</fileSets>
</assembly>
On 1/6/07, Patrick Schneider <ps...@gmail.com> wrote:
>
> Are you using an assembly descriptor? You should be able to specify
> things
> like which dependencies to include from there.
>
> Have a look here:
>
>
> http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/including-and-excluding-artifacts.html
>
>
> Patrick
>
> On 1/6/07, Mick Knutson <mi...@gmail.com> wrote:
> >
> > I have an assembly I am creating, and I need to add some jar
> dependencies
> > from my local repository into the assembly like acegi-1.0.2.jar etc...
> >
> > How can I do this?
> >
> > --
> > Thanks
> >
> > DJ MICK
> >
> > (Mick Knutson)
> > http://www.djmick.com
> > http://www.myspace.com/djmick_dot_com
> > http://www.thumpradio.com
> >
> >
>
>
--
Thanks
DJ MICK
(Mick Knutson)
http://www.djmick.com
http://www.myspace.com/djmick_dot_com
http://www.thumpradio.com
Re: adding dependant jar to assembly?
Posted by Patrick Schneider <ps...@gmail.com>.
Are you using an assembly descriptor? You should be able to specify things
like which dependencies to include from there.
Have a look here:
http://maven.apache.org/plugins/maven-assembly-plugin/examples/single/including-and-excluding-artifacts.html
Patrick
On 1/6/07, Mick Knutson <mi...@gmail.com> wrote:
>
> I have an assembly I am creating, and I need to add some jar dependencies
> from my local repository into the assembly like acegi-1.0.2.jar etc...
>
> How can I do this?
>
> --
> Thanks
>
> DJ MICK
>
> (Mick Knutson)
> http://www.djmick.com
> http://www.myspace.com/djmick_dot_com
> http://www.thumpradio.com
>
>