You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Tommy Knowlton <To...@KE4KUG.net> on 2007/02/28 19:47:29 UTC

Install/Deploy an artifact with classifier

I'm trying to produce a POM for building several different artifacts
from the same sources.
In the <profiles> section, I have accomplished

1) configuring the build tools to do something different for each profile
2) activating the profiles
3) give the profile's artifact a unique name using classifier
configuration in the maven-war-plugin

but what I haven't been able to do is to support the install/deploy of
the profile's artifact.
It seems install and deploy expect a "base" artifact that I'm not
building (since each profile is building it's own "classified"
artifact).

I'm thinking others must have solved this problem, but I haven't yet
seen anything useful in Google.

Thanks,
--
Tommy

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


Re: Install/Deploy an artifact with classifier

Posted by mailming <ma...@gmail.com>.
My work around solution is in the end of install specify deploy:deploy-file
"mvn install deploy:deploy-file"

Then in the pom specify
                        <plugin>
                         <artifactId>maven-deploy-plugin</artifactId>
                                <version>2.3</version>
                                <configuration>
                                <groupId>${parent.groupId}</groupId>
                                <artifactId>deployment</artifactId>
                               
<file>target/deployment-0.7.0-SNAPSHOT-alpha.zip</file>
                                <version>0.7.0-SNAPSHOT</version>
                                <uniqueVersion>false</uniqueVersion>
                                <url>file:///repository/deployment</url>
                                <packaging>zip</packaging>
                                <classifier>alpha</classifier>
                                </configuration>
                        </plugin>
Not the perfect solution, but at least working for me until next deploy
release working out.

Please let me know if you have better ideas.


Jonathan Anstey wrote:
> 
> Yeah, this approach is a workaround at best. I searched for a way to 
> configure the normal install and deploy goals a while back but had no 
> luck :(
> 
> Cheers,
> Jon
> 
> Tommy Knowlton wrote:
>> On 2/28/07, Jonathan Anstey <ja...@iona.com> wrote:
>>> Tommy,
>>>
>>> If you are just worried about the installed/deployed name, use the
>>> classifier option of the install-file and deploy-file goals (see
>>> install/deploy plugins).
>>
>> so, you're saying, run the package goal to produce an artifact and
>> then "manually" install-file and deploy-file to put the artifacts
>> (with classifiers manually crafted) in the repo.
>>
>> I suppose this would be a workaround, I was wondering whether there's
>> a way to configure the normal install and deploy goals to do it. In
>> particular, the above approach is going to be difficult to use for
>> snapshot deploys - unless deploy-file munges the artifact name to add
>> timestamp when the version has '-SNAPSHOT'. Even if that works, it
>> still breaks e.g., Continuum.
>>
>>>
>>> Cheers,
>>> Jon
>>>
>>> Tommy Knowlton wrote:
>>> > I'm trying to produce a POM for building several different artifacts
>>> > from the same sources.
>>> > In the <profiles> section, I have accomplished
>>> >
>>> > 1) configuring the build tools to do something different for each 
>>> profile
>>> > 2) activating the profiles
>>> > 3) give the profile's artifact a unique name using classifier
>>> > configuration in the maven-war-plugin
>>> >
>>> > but what I haven't been able to do is to support the install/deploy of
>>> > the profile's artifact.
>>> > It seems install and deploy expect a "base" artifact that I'm not
>>> > building (since each profile is building it's own "classified"
>>> > artifact).
>>> >
>>> > I'm thinking others must have solved this problem, but I haven't yet
>>> > seen anything useful in Google.
>>> >
>>> > Thanks,
>>> > --
>>> > Tommy
>>> >
>>> > ---------------------------------------------------------------------
>>> > 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Install-Deploy-an-artifact-with-classifier-tf3321017s177.html#a13501000
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: Install/Deploy an artifact with classifier

Posted by Jonathan Anstey <ja...@iona.com>.
Yeah, this approach is a workaround at best. I searched for a way to 
configure the normal install and deploy goals a while back but had no 
luck :(

Cheers,
Jon

Tommy Knowlton wrote:
> On 2/28/07, Jonathan Anstey <ja...@iona.com> wrote:
>> Tommy,
>>
>> If you are just worried about the installed/deployed name, use the
>> classifier option of the install-file and deploy-file goals (see
>> install/deploy plugins).
>
> so, you're saying, run the package goal to produce an artifact and
> then "manually" install-file and deploy-file to put the artifacts
> (with classifiers manually crafted) in the repo.
>
> I suppose this would be a workaround, I was wondering whether there's
> a way to configure the normal install and deploy goals to do it. In
> particular, the above approach is going to be difficult to use for
> snapshot deploys - unless deploy-file munges the artifact name to add
> timestamp when the version has '-SNAPSHOT'. Even if that works, it
> still breaks e.g., Continuum.
>
>>
>> Cheers,
>> Jon
>>
>> Tommy Knowlton wrote:
>> > I'm trying to produce a POM for building several different artifacts
>> > from the same sources.
>> > In the <profiles> section, I have accomplished
>> >
>> > 1) configuring the build tools to do something different for each 
>> profile
>> > 2) activating the profiles
>> > 3) give the profile's artifact a unique name using classifier
>> > configuration in the maven-war-plugin
>> >
>> > but what I haven't been able to do is to support the install/deploy of
>> > the profile's artifact.
>> > It seems install and deploy expect a "base" artifact that I'm not
>> > building (since each profile is building it's own "classified"
>> > artifact).
>> >
>> > I'm thinking others must have solved this problem, but I haven't yet
>> > seen anything useful in Google.
>> >
>> > Thanks,
>> > --
>> > Tommy
>> >
>> > ---------------------------------------------------------------------
>> > 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: Install/Deploy an artifact with classifier

Posted by Tommy Knowlton <To...@KE4KUG.net>.
On 2/28/07, Jonathan Anstey <ja...@iona.com> wrote:
> Tommy,
>
> If you are just worried about the installed/deployed name, use the
> classifier option of the install-file and deploy-file goals (see
> install/deploy plugins).

so, you're saying, run the package goal to produce an artifact and
then "manually" install-file and deploy-file to put the artifacts
(with classifiers manually crafted) in the repo.

I suppose this would be a workaround, I was wondering whether there's
a way to configure the normal install and deploy goals to do it. In
particular, the above approach is going to be difficult to use for
snapshot deploys - unless deploy-file munges the artifact name to add
timestamp when the version has '-SNAPSHOT'. Even if that works, it
still breaks e.g., Continuum.

>
> Cheers,
> Jon
>
> Tommy Knowlton wrote:
> > I'm trying to produce a POM for building several different artifacts
> > from the same sources.
> > In the <profiles> section, I have accomplished
> >
> > 1) configuring the build tools to do something different for each profile
> > 2) activating the profiles
> > 3) give the profile's artifact a unique name using classifier
> > configuration in the maven-war-plugin
> >
> > but what I haven't been able to do is to support the install/deploy of
> > the profile's artifact.
> > It seems install and deploy expect a "base" artifact that I'm not
> > building (since each profile is building it's own "classified"
> > artifact).
> >
> > I'm thinking others must have solved this problem, but I haven't yet
> > seen anything useful in Google.
> >
> > Thanks,
> > --
> > Tommy
> >
> > ---------------------------------------------------------------------
> > 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
>
>


-- 
--
Tommy

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


Re: Install/Deploy an artifact with classifier

Posted by Jonathan Anstey <ja...@iona.com>.
Tommy,

If you are just worried about the installed/deployed name, use the 
classifier option of the install-file and deploy-file goals (see 
install/deploy plugins). If someone has a better solution, please 
respond - I'd like to know as well :)

Cheers,
Jon

Tommy Knowlton wrote:
> I'm trying to produce a POM for building several different artifacts
> from the same sources.
> In the <profiles> section, I have accomplished
>
> 1) configuring the build tools to do something different for each profile
> 2) activating the profiles
> 3) give the profile's artifact a unique name using classifier
> configuration in the maven-war-plugin
>
> but what I haven't been able to do is to support the install/deploy of
> the profile's artifact.
> It seems install and deploy expect a "base" artifact that I'm not
> building (since each profile is building it's own "classified"
> artifact).
>
> I'm thinking others must have solved this problem, but I haven't yet
> seen anything useful in Google.
>
> Thanks,
> -- 
> Tommy
>
> ---------------------------------------------------------------------
> 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: Install/Deploy an artifact with classifier

Posted by mailming <ma...@gmail.com>.
I revised the configuration, and turns out working perfect.
I can just do mvn deploy without "-d" any config string. my email is
mailming@gmail.com if any questions. 
			<plugin>
			 <artifactId>maven-deploy-plugin</artifactId>
			<executions> 
			<execution>         
			<id>deploy-delta-zip</id> 
			<phase>deploy</phase> 
			<goals> 
				<goal>deploy-file</goal> 
			</goals> 
			   <configuration> 
			<groupId>${parent.groupId}</groupId>
			<artifactId>deployment</artifactId>
			<file>target/${artifactId}-${version}-delta.zip</file>
			<version>${version}</version>
			<uniqueVersion>false</uniqueVersion>
			<url>file:///repository/deployment</url>
			<packaging>zip</packaging>
			<classifier>delta</classifier>
			</configuration>
			</execution> 
				<execution>         
				<id>deploy-alpha-zip</id> 
				<phase>deploy</phase> 
				<goals> 
					<goal>deploy-file</goal> 
				</goals> 
				   <configuration> 
				<groupId>${parent.groupId}</groupId>
				<artifactId>deployment</artifactId>
				<file>target/${artifactId}-${version}-alpha.zip</file>
				<version>${version}</version>
				<uniqueVersion>false</uniqueVersion>
				<url>file:///repository/deployment</url>
				<packaging>zip</packaging>
				<classifier>alpha</classifier>
				</configuration>
				</execution> 
				<execution>         
				<id>deploy-prod-zip</id> 
				<phase>deploy</phase> 
				<goals> 
					<goal>deploy-file</goal> 
				</goals> 
				<configuration> 
					<groupId>${parent.groupId}</groupId>
					<artifactId>deployment</artifactId>
					<file>target/${artifactId}-${version}-prod.zip</file>
					<version>${version}</version>
					<uniqueVersion>false</uniqueVersion>
					<url>file:///repository/deployment</url>
					<packaging>zip</packaging>
					<classifier>prod</classifier>
				</configuration>
				</execution> 
			</executions>
			</plugin>


Tommy Knowlton wrote:
> 
> I'm trying to produce a POM for building several different artifacts
> from the same sources.
> In the <profiles> section, I have accomplished
> 
> 1) configuring the build tools to do something different for each profile
> 2) activating the profiles
> 3) give the profile's artifact a unique name using classifier
> configuration in the maven-war-plugin
> 
> but what I haven't been able to do is to support the install/deploy of
> the profile's artifact.
> It seems install and deploy expect a "base" artifact that I'm not
> building (since each profile is building it's own "classified"
> artifact).
> 
> I'm thinking others must have solved this problem, but I haven't yet
> seen anything useful in Google.
> 
> Thanks,
> --
> Tommy
> 
> ---------------------------------------------------------------------
> 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/Install-Deploy-an-artifact-with-classifier-tf3321017s177.html#a13517023
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