Did you try with this first?
https://github.com/maven-download-plugin/maven-download-plugin
Delany

On Mon, 26 Jul 2021 at 21:27, [email protected] <
[email protected]> wrote:

>
>
> Hi, first post here.  I'm new to Maven and its been quite some time since
> I've used XML.
>
> We are trying to using Maven to either upload and download artifacts from
> a Nexus repository Vs doing it manually.
>
> I've been trying various things, until I got the following to finally work
> for a multi iso download from a Nexus repo that we have inhouse:
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns=http://maven.apache.org/POM/4.0.0
>          xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
>          xsi:schemaLocation=http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd<
> http://maven.apache.org/POM/4.0.0%20http:/maven.apache.org/xsd/maven-4.0.0.xsd
> >>
>
>   <modelVersion>4.0.0</modelVersion>
>
>   <groupId>Software_Release_Here</groupId>
>   <artifactId>Software_Program_Here</artifactId>
>   <version>Version_Number_Here</version>
>
> <properties>
>
>     <depStagingArea>/dropbox/</depStagingArea>
>     <downloadFilename1>1st_ISO_here.iso</downloadFilename1>
>     <downloadFilename2>2nd_ISO_here.iso</downloadFilename2>
>
> </properties>
>
>   <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-dependency-plugin</artifactId>
>         <version>2.8</version>
>           <configuration>
>             <artifactItems>
>               <artifactItem>
>               <groupId>${project.groupId}</groupId>
>               <artifactId>1st_ISO_here.iso</artifactId>
>               <version>${project.version}</version>
>               <type>iso</type>
>               <overWrite>iso</overWrite>
>               <outputDirectory>${depStagingArea/pcs}</outputDirectory>
>               <destFileName>${downloadFilename1}</destFileName>
>               </artifactItem>
>               <artifactItem>
>               <groupId>${project.groupId}</groupId>
>               <artifactId>2nd_ISO_here.iso</artifactId>
>               <version>${project.version}</version>
>               <type>iso</type>
>               <overWrite>iso</overWrite>
>               <outputDirectory>${depStagingArea/pcs}</outputDirectory>
>               <destFileName>${downloadFilename2}</destFileName>
>               </artifactItem>
>             </artifactItems>
>           </configuration>
>       </plugin>
>     </plugins>
>   </build>
>
>   <repositories>
>
>
>
> Also, when I run this, the isos are downloaded to ~/software/xml/poms,
> when I've specified markup tags for
> <depStagingArea>/dropbox/</depStagingArea>.  Not sure why its working like
> this.
>
> Thanks
>
>
>
>

Reply via email to