You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by deckrider <de...@gmail.com> on 2008/03/14 21:07:24 UTC
dependencyManagement, pluginManagement, artifactManagement?
Hi,
I have the following two snippets in my pom.xml, but what I really
want to do is define the version of my-artifact in something like
'dependencyManagement' or similar inside 'godfather-parent' so that it
can be inherited. Is there a way to do this?
Thanks,
pom.xml snippets follow:
<parent>
<groupId>my.godfather</groupId>
<artifactId>godfather-parent</artifactId>
<version>4.5.6</version>
</parent>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<artifactItems>
<artifactItem>
<groupId>my.group.id</groupId>
<artifactId>my-artifact</artifactId>
<version>1.2.3</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/unpack</outputDirectory>
</artifactItem>
</artifactItems>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
</execution>
</executions>
</plugin>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: dependencyManagement, pluginManagement, artifactManagement?
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
Yes. Put it inside a dependencyManagment section and then don't specify
a version where you use it. If you do specify a version, it will use
that one...the depMgt is only used if no version is declared elsewhere.
-----Original Message-----
From: deckrider [mailto:deckrider@gmail.com]
Sent: Friday, March 14, 2008 4:07 PM
To: Maven Users List
Subject: dependencyManagement, pluginManagement, artifactManagement?
Hi,
I have the following two snippets in my pom.xml, but what I really
want to do is define the version of my-artifact in something like
'dependencyManagement' or similar inside 'godfather-parent' so that it
can be inherited. Is there a way to do this?
Thanks,
pom.xml snippets follow:
<parent>
<groupId>my.godfather</groupId>
<artifactId>godfather-parent</artifactId>
<version>4.5.6</version>
</parent>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<artifactItems>
<artifactItem>
<groupId>my.group.id</groupId>
<artifactId>my-artifact</artifactId>
<version>1.2.3</version>
<type>zip</type>
<overWrite>false</overWrite>
<outputDirectory>${project.build.directory}/unpack</outputDirectory>
</artifactItem>
</artifactItems>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
</execution>
</executions>
</plugin>
---------------------------------------------------------------------
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
Re: dependencyManagement, pluginManagement, artifactManagement?
Posted by deckrider <de...@gmail.com>.
I'm guessing that would work ... was just thinking I should do it the
same as dependencyManagement or something.
On Fri, Mar 14, 2008 at 2:14 PM, simon <si...@chello.at> wrote:
> I expect you can define a property in a parent pom and reference it from
> a child:
> <properties>
> <myArtifactVersion>1.2.3</myArtifactVersion>
> </properties>
>
> then later
>
> <version>${myArtifactVersion}</version>
>
> Is this not enough?
>
> Regards, Simon
>
>
>
> On Fri, 2008-03-14 at 14:07 -0600, deckrider wrote:
> > Hi,
> >
> > I have the following two snippets in my pom.xml, but what I really
> > want to do is define the version of my-artifact in something like
> > 'dependencyManagement' or similar inside 'godfather-parent' so that it
> > can be inherited. Is there a way to do this?
> >
> > Thanks,
> > pom.xml snippets follow:
> >
> > <parent>
> > <groupId>my.godfather</groupId>
> > <artifactId>godfather-parent</artifactId>
> > <version>4.5.6</version>
> > </parent>
> >
> > ...
> >
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-dependency-plugin</artifactId>
> > <configuration>
> > <artifactItems>
> > <artifactItem>
> > <groupId>my.group.id</groupId>
> > <artifactId>my-artifact</artifactId>
> > <version>1.2.3</version>
> > <type>zip</type>
> > <overWrite>false</overWrite>
> > <outputDirectory>${project.build.directory}/unpack</outputDirectory>
> > </artifactItem>
> > </artifactItems>
> > <overWriteReleases>false</overWriteReleases>
> > <overWriteSnapshots>true</overWriteSnapshots>
> > </configuration>
> > <executions>
> > <execution>
> > <phase>generate-sources</phase>
> > <goals>
> > <goal>unpack</goal>
> > </goals>
> > </execution>
> > </executions>
> > </plugin>
> >
> > ---------------------------------------------------------------------
> > 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
>
>
--
ASCII ribbon campaign:
() against HTML email
/\ against Microsoft attachments
Information: http://www.expita.com/nomime.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: dependencyManagement, pluginManagement, artifactManagement?
Posted by deckrider <de...@gmail.com>.
Oops, I spoke too soon, even though there was "?" it still used the
correct version. Thanks.
On Sat, Mar 15, 2008 at 7:21 AM, deckrider <de...@gmail.com> wrote:
> dependencyManagement doesn't work for this scenario. I get this:
>
> [INFO] [dependency:unpack {execution: default}]
> [INFO] Configured Artifact: my.group.id:my-artifact:?:zip
>
> I should have seen this:
>
> [INFO] [dependency:unpack {execution: default}]
> [INFO] Configured Artifact: my.group.id:my-artifact:1.2.3:zip
>
>
>
>
> On Fri, Mar 14, 2008 at 6:14 PM, Brian E. Fox <br...@reply.infinity.nu> wrote:
> > DepMgt is the right way...
> >
> >
> > -----Original Message-----
> > From: simon [mailto:simon.kitching@chello.at]
> > Sent: Friday, March 14, 2008 4:14 PM
> > To: Maven Users List
> >
> >
> > Subject: Re: dependencyManagement, pluginManagement, artifactManagement?
> >
> > I expect you can define a property in a parent pom and reference it from
> > a child:
> > <properties>
> > <myArtifactVersion>1.2.3</myArtifactVersion>
> > </properties>
> >
> > then later
> >
> > <version>${myArtifactVersion}</version>
> >
> > Is this not enough?
> >
> > Regards, Simon
> >
> > On Fri, 2008-03-14 at 14:07 -0600, deckrider wrote:
> > > Hi,
> > >
> > > I have the following two snippets in my pom.xml, but what I really
> > > want to do is define the version of my-artifact in something like
> > > 'dependencyManagement' or similar inside 'godfather-parent' so that it
> > > can be inherited. Is there a way to do this?
> > >
> > > Thanks,
> > > pom.xml snippets follow:
> > >
> > > <parent>
> > > <groupId>my.godfather</groupId>
> > > <artifactId>godfather-parent</artifactId>
> > > <version>4.5.6</version>
> > > </parent>
> > >
> > > ...
> > >
> > > <plugin>
> > > <groupId>org.apache.maven.plugins</groupId>
> > > <artifactId>maven-dependency-plugin</artifactId>
> > > <configuration>
> > > <artifactItems>
> > > <artifactItem>
> > > <groupId>my.group.id</groupId>
> > > <artifactId>my-artifact</artifactId>
> > > <version>1.2.3</version>
> > > <type>zip</type>
> > > <overWrite>false</overWrite>
> > >
> > <outputDirectory>${project.build.directory}/unpack</outputDirectory>
> > > </artifactItem>
> > > </artifactItems>
> > > <overWriteReleases>false</overWriteReleases>
> > > <overWriteSnapshots>true</overWriteSnapshots>
> > > </configuration>
> > > <executions>
> > > <execution>
> > > <phase>generate-sources</phase>
> > > <goals>
> > > <goal>unpack</goal>
> > > </goals>
> > > </execution>
> > > </executions>
> > > </plugin>
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
>
>
>
> --
> ASCII ribbon campaign:
> () against HTML email
> /\ against Microsoft attachments
> Information: http://www.expita.com/nomime.html
>
--
ASCII ribbon campaign:
() against HTML email
/\ against Microsoft attachments
Information: http://www.expita.com/nomime.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: dependencyManagement, pluginManagement, artifactManagement?
Posted by deckrider <de...@gmail.com>.
dependencyManagement doesn't work for this scenario. I get this:
[INFO] [dependency:unpack {execution: default}]
[INFO] Configured Artifact: my.group.id:my-artifact:?:zip
I should have seen this:
[INFO] [dependency:unpack {execution: default}]
[INFO] Configured Artifact: my.group.id:my-artifact:1.2.3:zip
On Fri, Mar 14, 2008 at 6:14 PM, Brian E. Fox <br...@reply.infinity.nu> wrote:
> DepMgt is the right way...
>
>
> -----Original Message-----
> From: simon [mailto:simon.kitching@chello.at]
> Sent: Friday, March 14, 2008 4:14 PM
> To: Maven Users List
>
>
> Subject: Re: dependencyManagement, pluginManagement, artifactManagement?
>
> I expect you can define a property in a parent pom and reference it from
> a child:
> <properties>
> <myArtifactVersion>1.2.3</myArtifactVersion>
> </properties>
>
> then later
>
> <version>${myArtifactVersion}</version>
>
> Is this not enough?
>
> Regards, Simon
>
> On Fri, 2008-03-14 at 14:07 -0600, deckrider wrote:
> > Hi,
> >
> > I have the following two snippets in my pom.xml, but what I really
> > want to do is define the version of my-artifact in something like
> > 'dependencyManagement' or similar inside 'godfather-parent' so that it
> > can be inherited. Is there a way to do this?
> >
> > Thanks,
> > pom.xml snippets follow:
> >
> > <parent>
> > <groupId>my.godfather</groupId>
> > <artifactId>godfather-parent</artifactId>
> > <version>4.5.6</version>
> > </parent>
> >
> > ...
> >
> > <plugin>
> > <groupId>org.apache.maven.plugins</groupId>
> > <artifactId>maven-dependency-plugin</artifactId>
> > <configuration>
> > <artifactItems>
> > <artifactItem>
> > <groupId>my.group.id</groupId>
> > <artifactId>my-artifact</artifactId>
> > <version>1.2.3</version>
> > <type>zip</type>
> > <overWrite>false</overWrite>
> >
> <outputDirectory>${project.build.directory}/unpack</outputDirectory>
> > </artifactItem>
> > </artifactItems>
> > <overWriteReleases>false</overWriteReleases>
> > <overWriteSnapshots>true</overWriteSnapshots>
> > </configuration>
> > <executions>
> > <execution>
> > <phase>generate-sources</phase>
> > <goals>
> > <goal>unpack</goal>
> > </goals>
> > </execution>
> > </executions>
> > </plugin>
> >
> > ---------------------------------------------------------------------
> > 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
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
ASCII ribbon campaign:
() against HTML email
/\ against Microsoft attachments
Information: http://www.expita.com/nomime.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: dependencyManagement, pluginManagement, artifactManagement?
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
DepMgt is the right way...
-----Original Message-----
From: simon [mailto:simon.kitching@chello.at]
Sent: Friday, March 14, 2008 4:14 PM
To: Maven Users List
Subject: Re: dependencyManagement, pluginManagement, artifactManagement?
I expect you can define a property in a parent pom and reference it from
a child:
<properties>
<myArtifactVersion>1.2.3</myArtifactVersion>
</properties>
then later
<version>${myArtifactVersion}</version>
Is this not enough?
Regards, Simon
On Fri, 2008-03-14 at 14:07 -0600, deckrider wrote:
> Hi,
>
> I have the following two snippets in my pom.xml, but what I really
> want to do is define the version of my-artifact in something like
> 'dependencyManagement' or similar inside 'godfather-parent' so that it
> can be inherited. Is there a way to do this?
>
> Thanks,
> pom.xml snippets follow:
>
> <parent>
> <groupId>my.godfather</groupId>
> <artifactId>godfather-parent</artifactId>
> <version>4.5.6</version>
> </parent>
>
> ...
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-dependency-plugin</artifactId>
> <configuration>
> <artifactItems>
> <artifactItem>
> <groupId>my.group.id</groupId>
> <artifactId>my-artifact</artifactId>
> <version>1.2.3</version>
> <type>zip</type>
> <overWrite>false</overWrite>
>
<outputDirectory>${project.build.directory}/unpack</outputDirectory>
> </artifactItem>
> </artifactItems>
> <overWriteReleases>false</overWriteReleases>
> <overWriteSnapshots>true</overWriteSnapshots>
> </configuration>
> <executions>
> <execution>
> <phase>generate-sources</phase>
> <goals>
> <goal>unpack</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: dependencyManagement, pluginManagement, artifactManagement?
Posted by simon <si...@chello.at>.
I expect you can define a property in a parent pom and reference it from
a child:
<properties>
<myArtifactVersion>1.2.3</myArtifactVersion>
</properties>
then later
<version>${myArtifactVersion}</version>
Is this not enough?
Regards, Simon
On Fri, 2008-03-14 at 14:07 -0600, deckrider wrote:
> Hi,
>
> I have the following two snippets in my pom.xml, but what I really
> want to do is define the version of my-artifact in something like
> 'dependencyManagement' or similar inside 'godfather-parent' so that it
> can be inherited. Is there a way to do this?
>
> Thanks,
> pom.xml snippets follow:
>
> <parent>
> <groupId>my.godfather</groupId>
> <artifactId>godfather-parent</artifactId>
> <version>4.5.6</version>
> </parent>
>
> ...
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-dependency-plugin</artifactId>
> <configuration>
> <artifactItems>
> <artifactItem>
> <groupId>my.group.id</groupId>
> <artifactId>my-artifact</artifactId>
> <version>1.2.3</version>
> <type>zip</type>
> <overWrite>false</overWrite>
> <outputDirectory>${project.build.directory}/unpack</outputDirectory>
> </artifactItem>
> </artifactItems>
> <overWriteReleases>false</overWriteReleases>
> <overWriteSnapshots>true</overWriteSnapshots>
> </configuration>
> <executions>
> <execution>
> <phase>generate-sources</phase>
> <goals>
> <goal>unpack</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
>
> ---------------------------------------------------------------------
> 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