You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Zanzerkia, Robert" <Ro...@fmr.com> on 2013/03/19 17:10:33 UTC

Nexus deployment of a ZIP file...

Hi,
 I am trying to deploy a zip file built using Maven to the Nexus repository (internal to our company).
 When I use mvn deploy it connects to repository and deploys the snapshot except with the default jar file NOT with the zip file I am building as explained below.
 "uCMDB-PatternDev-0.0.1-20130319.143249-1.jar" instead of the ZIP I created in target folder : uCMDB-PatternDev-0.0.1-SNAPSHOT-packages.zip

 I experimented with maven-deploy-plugin which didn't work.
 Also I rather NOT define file, just want it to copy the output of assembly plugin...

Thanks,
--------------------------------------------------------------------------------------------------------

 My project builds a ZIP file using following plugin. (this part works fine).
                                <plugin>
                                        <artifactId>maven-assembly-plugin</artifactId>
                                        <version>2.4</version>
                                        <configuration>
                                                <descriptors>
                                                        <descriptor>distribution.xml</descriptor>
                                                </descriptors>
                                        </configuration>
                                </plugin>

Distribution.xml
<assembly
        xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
        <id>packages</id>
        <formats>
                <format>zip</format>
        </formats>
        <repositories>
                <repository>
                        <outputDirectory>repository</outputDirectory>
                </repository>
        </repositories>
        <fileSets>
                <fileSet>
                        <directory>./dist</directory>
                        <includes>
                                <include>**</include>
                        </includes>
                        <excludes>
                                <exclude>./target</exclude>
                                <exclude>./repository</exclude>
                        </excludes>
                </fileSet>
        </fileSets>

</assembly>

My repository connections are defined as follows in the pom.xml: (commented out URL).
        <distributionManagement>

                <repository>
                        <id>nexuspro-prod-release</id>
                        <url>https://nexuspro...</url>
                </repository>
                <snapshotRepository>
                        <id>nexuspro-prod-snapshot</id>
                        <url>https://nexuspro...</url>
                </snapshotRepository>
        </distributionManagement>

Robert Zanzerkia




RE: Re: Nexus deployment of a ZIP file...

Posted by "Zanzerkia, Robert" <Ro...@fmr.com>.
Yes, I tried the -DpomFile approach but if I don't supply groupID,version etc. it still complained. 


Robert Zanzerkia
Fidelity Investments
FTG-OPS
Two Contra Way
Merrimack, NH 03054
 
Work: 603-791-3477
Blackberry: 603-320-9682
 

-----Original Message-----
From: thorsten.heit@vkb.de [mailto:thorsten.heit@vkb.de] 
Sent: Thursday, March 21, 2013 9:16 AM
To: Maven Users List
Subject: Re: Re: Nexus deployment of a ZIP file...

Hi,

> Yup, this is a surprising repetition, agreed, but that's "normal".
> Please file an enhancement request about that, I guess this might be
> something fixable.

I haven't used deploy:deploy-file from the command line for a longer time, 
but can't you omit groupId, artifactId etc. when you specify a pom.xml as 
a parameter (-DpomFile=....)?
See 
https://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html 



HTH

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


Re: Re: Nexus deployment of a ZIP file...

Posted by th...@vkb.de.
Hi,

> Yup, this is a surprising repetition, agreed, but that's "normal".
> Please file an enhancement request about that, I guess this might be
> something fixable.

I haven't used deploy:deploy-file from the command line for a longer time, 
but can't you omit groupId, artifactId etc. when you specify a pom.xml as 
a parameter (-DpomFile=....)?
See 
https://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html 



HTH

Thorsten

Re: Nexus deployment of a ZIP file...

Posted by Baptiste MATHUS <bm...@batmat.net>.
Yup, this is a surprising repetition, agreed, but that's "normal".
Please file an enhancement request about that, I guess this might be
something fixable.

But as deploy-file is supposed to be used quite exceptionnally, I guess not
a lot of people complained.
Btw, if you use Nexus and that deploy very occasionnally, you might want to
use its UI to do that graphically instead.

Cheers


2013/3/21 Zanzerkia, Robert <Ro...@fmr.com>

> I found the goal deploy:deploy-file that works to deploy specific file to
> Nexus.
> mvn deploy:deploy-file -Durl=$REPO_URL -DrepositoryId=$REPO_ID
> -DgroupId=org.myorg -DartifactId=myproj -Dversion=1.2.3 -Dpackaging=zip
> -Dfile=myproj.zip
>
>  What I don't understand is why do I have to supply url, repositoryID,
> groupID, artifactID, version on command line if it's already in pom.xml ?
>
> Thanks,
>
> Robert Zanzerkia
> Fidelity Investments
> FTG-OPS
> Two Contra Way
> Merrimack, NH 03054
>
> Work: 603-791-3477
> Blackberry: 603-320-9682
>
>
> -----Original Message-----
> From: Zanzerkia, Robert
> Sent: Tuesday, March 19, 2013 12:11 PM
> To: users@maven.apache.org
> Subject: Nexus deployment of a ZIP file...
>
> Hi,
>  I am trying to deploy a zip file built using Maven to the Nexus
> repository (internal to our company).
>  When I use mvn deploy it connects to repository and deploys the snapshot
> except with the default jar file NOT with the zip file I am building as
> explained below.
>  "uCMDB-PatternDev-0.0.1-20130319.143249-1.jar" instead of the ZIP I
> created in target folder : uCMDB-PatternDev-0.0.1-SNAPSHOT-packages.zip
>
>  I experimented with maven-deploy-plugin which didn't work.
>  Also I rather NOT define file, just want it to copy the output of
> assembly plugin...
>
> Thanks,
>
> --------------------------------------------------------------------------------------------------------
>
>  My project builds a ZIP file using following plugin. (this part works
> fine).
>                                 <plugin>
>
> <artifactId>maven-assembly-plugin</artifactId>
>                                         <version>2.4</version>
>                                         <configuration>
>                                                 <descriptors>
>
> <descriptor>distribution.xml</descriptor>
>                                                 </descriptors>
>                                         </configuration>
>                                 </plugin>
>
> Distribution.xml
> <assembly
>         xmlns="
> http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>         xsi:schemaLocation="
> http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
> http://maven.apache.org/xsd/assembly-1.1.2.xsd">
>         <id>packages</id>
>         <formats>
>                 <format>zip</format>
>         </formats>
>         <repositories>
>                 <repository>
>                         <outputDirectory>repository</outputDirectory>
>                 </repository>
>         </repositories>
>         <fileSets>
>                 <fileSet>
>                         <directory>./dist</directory>
>                         <includes>
>                                 <include>**</include>
>                         </includes>
>                         <excludes>
>                                 <exclude>./target</exclude>
>                                 <exclude>./repository</exclude>
>                         </excludes>
>                 </fileSet>
>         </fileSets>
>
> </assembly>
>
> My repository connections are defined as follows in the pom.xml:
> (commented out URL).
>         <distributionManagement>
>
>                 <repository>
>                         <id>nexuspro-prod-release</id>
>                         <url>https://nexuspro...</url>
>                 </repository>
>                 <snapshotRepository>
>                         <id>nexuspro-prod-snapshot</id>
>                         <url>https://nexuspro...</url>
>                 </snapshotRepository>
>         </distributionManagement>
>
> Robert Zanzerkia
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

RE: Nexus deployment of a ZIP file...

Posted by "Zanzerkia, Robert" <Ro...@fmr.com>.
I found the goal deploy:deploy-file that works to deploy specific file to Nexus.
mvn deploy:deploy-file -Durl=$REPO_URL -DrepositoryId=$REPO_ID -DgroupId=org.myorg -DartifactId=myproj -Dversion=1.2.3 -Dpackaging=zip -Dfile=myproj.zip

 What I don't understand is why do I have to supply url, repositoryID, groupID, artifactID, version on command line if it's already in pom.xml ?

Thanks,

Robert Zanzerkia
Fidelity Investments
FTG-OPS
Two Contra Way
Merrimack, NH 03054
 
Work: 603-791-3477
Blackberry: 603-320-9682
 

-----Original Message-----
From: Zanzerkia, Robert 
Sent: Tuesday, March 19, 2013 12:11 PM
To: users@maven.apache.org
Subject: Nexus deployment of a ZIP file...

Hi,
 I am trying to deploy a zip file built using Maven to the Nexus repository (internal to our company).
 When I use mvn deploy it connects to repository and deploys the snapshot except with the default jar file NOT with the zip file I am building as explained below.
 "uCMDB-PatternDev-0.0.1-20130319.143249-1.jar" instead of the ZIP I created in target folder : uCMDB-PatternDev-0.0.1-SNAPSHOT-packages.zip

 I experimented with maven-deploy-plugin which didn't work.
 Also I rather NOT define file, just want it to copy the output of assembly plugin...

Thanks,
--------------------------------------------------------------------------------------------------------

 My project builds a ZIP file using following plugin. (this part works fine).
                                <plugin>
                                        <artifactId>maven-assembly-plugin</artifactId>
                                        <version>2.4</version>
                                        <configuration>
                                                <descriptors>
                                                        <descriptor>distribution.xml</descriptor>
                                                </descriptors>
                                        </configuration>
                                </plugin>

Distribution.xml
<assembly
        xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
        <id>packages</id>
        <formats>
                <format>zip</format>
        </formats>
        <repositories>
                <repository>
                        <outputDirectory>repository</outputDirectory>
                </repository>
        </repositories>
        <fileSets>
                <fileSet>
                        <directory>./dist</directory>
                        <includes>
                                <include>**</include>
                        </includes>
                        <excludes>
                                <exclude>./target</exclude>
                                <exclude>./repository</exclude>
                        </excludes>
                </fileSet>
        </fileSets>

</assembly>

My repository connections are defined as follows in the pom.xml: (commented out URL).
        <distributionManagement>

                <repository>
                        <id>nexuspro-prod-release</id>
                        <url>https://nexuspro...</url>
                </repository>
                <snapshotRepository>
                        <id>nexuspro-prod-snapshot</id>
                        <url>https://nexuspro...</url>
                </snapshotRepository>
        </distributionManagement>

Robert Zanzerkia




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


RE: Nexus deployment of a ZIP file...

Posted by Jim McCaskey <ji...@pervasive.com>.
Hi there,

Your missing phases and goals.  Below should get you closer.   More information can be found here:

http://maven.apache.org/plugins/maven-assembly-plugin/usage.html

-Jim

<plugin>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>2.4</version>
    <executions>
        <execution>
            <phase>package</phase>
            <goals>
                <goal>single</goal>
            </goals>
            <configuration>
                <descriptors>
                    <descriptor>distribution.xml</descriptor>
                </descriptors>
            </configuration>
        </execution>
    </executions>
</plugin>


-----Original Message-----
From: Zanzerkia, Robert [mailto:Robert.Zanzerkia@fmr.com]
Sent: Tuesday, March 19, 2013 11:11 AM
To: users@maven.apache.org
Subject: Nexus deployment of a ZIP file...

Hi,
 I am trying to deploy a zip file built using Maven to the Nexus repository (internal to our company).
 When I use mvn deploy it connects to repository and deploys the snapshot except with the default jar file NOT with the zip file I am building as explained below.
 "uCMDB-PatternDev-0.0.1-20130319.143249-1.jar" instead of the ZIP I created in target folder : uCMDB-PatternDev-0.0.1-SNAPSHOT-packages.zip

 I experimented with maven-deploy-plugin which didn't work.
 Also I rather NOT define file, just want it to copy the output of assembly plugin...

Thanks,
--------------------------------------------------------------------------------------------------------

 My project builds a ZIP file using following plugin. (this part works fine).
                                <plugin>
                                        <artifactId>maven-assembly-plugin</artifactId>
                                        <version>2.4</version>
                                        <configuration>
                                                <descriptors>
                                                        <descriptor>distribution.xml</descriptor>
                                                </descriptors>
                                        </configuration>
                                </plugin>

Distribution.xml
<assembly
        xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
        <id>packages</id>
        <formats>
                <format>zip</format>
        </formats>
        <repositories>
                <repository>
                        <outputDirectory>repository</outputDirectory>
                </repository>
        </repositories>
        <fileSets>
                <fileSet>
                        <directory>./dist</directory>
                        <includes>
                                <include>**</include>
                        </includes>
                        <excludes>
                                <exclude>./target</exclude>
                                <exclude>./repository</exclude>
                        </excludes>
                </fileSet>
        </fileSets>

</assembly>

My repository connections are defined as follows in the pom.xml: (commented out URL).
        <distributionManagement>

                <repository>
                        <id>nexuspro-prod-release</id>
                        <url>https://nexuspro...</url>
                </repository>
                <snapshotRepository>
                        <id>nexuspro-prod-snapshot</id>
                        <url>https://nexuspro...</url>
                </snapshotRepository>
        </distributionManagement>

Robert Zanzerkia



NOTICE: All information in and attached to this email may be proprietary, confidential, privileged and otherwise protected from improper or erroneous disclosure. If you are not the sender's intended recipient, you are not authorized to intercept, read, print, retain, copy, forward, or disseminate this message.


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


Re: Nexus deployment of a ZIP file...

Posted by Jeffrey E Care <ca...@us.ibm.com>.
"Zanzerkia, Robert" <Ro...@fmr.com> wrote on 03/19/2013 
12:10:33 PM:

> From: "Zanzerkia, Robert" <Ro...@fmr.com>
> To: "users@maven.apache.org" <us...@maven.apache.org>, 
> Date: 03/19/2013 12:12 PM
> Subject: Nexus deployment of a ZIP file...
> 
> Hi,
>  I am trying to deploy a zip file built using Maven to the Nexus 
> repository (internal to our company).
>  When I use mvn deploy it connects to repository and deploys the 
> snapshot except with the default jar file NOT with the zip file I am
> building as explained below.

The assemby plugin has an option (attach) to deploy generated assemblies 
with classifiers.