You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jim Garrison <ji...@nwea.org> on 2014/01/20 21:28:49 UTC

maven-deploy-plugin: exclude specific project artifact(s)?

I have a simple project that uses the assembly plugin to build a jar-with-dependencies and then a zip file containing the jar-with-dependencies and a shell script.  When I run "mvn deploy" it deploys all three artifacts (the original jar, the jwd and the zip file) to Nexus.  

Is there a way to prevent deployment of the jar and jwd, and only upload the zip file to Nexus?  I've read the maven-deploy-plugin documentation page but there doesn't seem to be a way to prevent those artifacts from being deployed. 

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


Re: maven-deploy-plugin: exclude specific project artifact(s)?

Posted by Gordon Cody <go...@zafin.com>.
Hello

We use this to prevent deploying ears/wars into our repo. Everything is
built but not everything gets deployed.
Newer versions of the deploy plugin allow you to skip deployment so within
a few specific poms you can add.

              <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.1</version>
                <configuration>
                  <skip>true</skip>
                </configuration>
              </plugin>

This should work as long as you assemble each piece separately (each has
its own pom.xml) so divide and conquer.
Hope this helps.

-- 
Best Regards, Gord Cody

Release Manager  Zafin Labs Americas Inc.
179 Colonnade Road-Suite 100, Ottawa ON, Canada
Phone: +1 (613) 216-2504  Fax: +1 (613) 688-1374  Mobile: +1 613-601-2734
Web: http://zafin.com  Email: gordon.cody@zafin.com

-- 
Zafin - Canada

-- 
http://zafin.com

<http://zafin.com/>

------------------------------

Connect with us

 <http://www.youtube.com/user/ZafinGlobal> <http://www.linkedin.com/company/Zafin>
  <http://twitter.com/Zafin>

News and Events

Zafin among Top 10 FinTech Companies to Watch in 2014: American Banker<http://zafin.com/zafin-among-top-10-fintech-companies-to-watch-in-2014-american-banker/>

RE: maven-deploy-plugin: exclude specific project artifact(s)?

Posted by Jim Garrison <ji...@nwea.org>.
> Op Mon, 20 Jan 2014 21:28:49 +0100 schreef Jim Garrison
> > I have a simple project that uses the assembly plugin to build a
> > jar-with-dependencies and then a zip file containing the
> > jar-with-dependencies and a shell script.  When I run "mvn deploy" it
> > deploys all three artifacts (the original jar, the jwd and the zip
> > file) to Nexus.
> >
> > Is there a way to prevent deployment of the jar and jwd, and only
> > upload the zip file to Nexus?  I've read the maven-deploy-plugin
> > documentation page but there doesn't seem to be a way to prevent those
> > artifacts from being deployed.
>
> From: Robert Scholte
> Sent: Monday, January 20, 2014 2:00 PM
> To: Maven Users List
> Subject: Re: maven-deploy-plugin: exclude specific project artifact(s)?
> 
> Make sure it is not attached to the project.
> For assembly-plugin, see
> http://maven.apache.org/plugins/maven-assembly-plugin/single-
> mojo.html#attach
> Set this value to false.

I can do that for the jar-with-dependencies but I don't see a way to "unattach" the primary jar from the project.

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


Re: maven-deploy-plugin: exclude specific project artifact(s)?

Posted by Robert Scholte <rf...@apache.org>.
Hi,

Make sure it is not attached to the project.
For assembly-plugin, see  
http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html#attach
Set this value to false.

Robert

Op Mon, 20 Jan 2014 21:28:49 +0100 schreef Jim Garrison  
<ji...@nwea.org>:

> I have a simple project that uses the assembly plugin to build a  
> jar-with-dependencies and then a zip file containing the  
> jar-with-dependencies and a shell script.  When I run "mvn deploy" it  
> deploys all three artifacts (the original jar, the jwd and the zip file)  
> to Nexus.
>
> Is there a way to prevent deployment of the jar and jwd, and only upload  
> the zip file to Nexus?  I've read the maven-deploy-plugin documentation  
> page but there doesn't seem to be a way to prevent those artifacts from  
> being deployed.
>
> ---------------------------------------------------------------------
> 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