You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Christopher.Miller@gd-ms.com" <Ch...@gd-ms.com> on 2021/07/26 19:27:40 UTC

Questions on what xml tags to use for pom.xml file for downloading isos


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




Re: Questions on what xml tags to use for pom.xml file for downloading isos

Posted by Delany <de...@gmail.com>.
Did you try with this first?
https://github.com/maven-download-plugin/maven-download-plugin
Delany

On Mon, 26 Jul 2021 at 21:27, Christopher.Miller@gd-ms.com <
Christopher.Miller@gd-ms.com> 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
>
>
>
>

RE: Questions on what xml tags to use for pom.xml file for downloading isos

Posted by "Christopher.Miller@gd-ms.com" <Ch...@gd-ms.com>.

Sorry, forgot to include the mvn command I'm running to download all of the ISOs: 


mvn dependency:copy -f multi_iso_downloader_pom_modified.xml -s  ~/.m2/settings.xml 


Do you have an example I can reference artifacts that are defined in a top level <dependencies> tag? 

thanks



-----Original Message-----
From: Greg Chabala <gr...@gmail.com> 
Sent: Monday, July 26, 2021 5:56 PM
To: Maven Users List <us...@maven.apache.org>
Subject: Re: Questions on what xml tags to use for pom.xml file for downloading isos

----
External E-mail --- CAUTION: This email originated from outside GDMS. Do not click links or open attachments unless you recognize the sender and know the content is safe.

I agree with NIck's suggestion on fixing the property names.

Also, when I run this, the isos are ...
>

When you run what? Your exact command invocation would help. A pom.xml does not run like a script, it is shared configuration for any number of plugin invocations.

Your configuration of artifacts within the dependency plugin is unusual.
Typically, your artifacts would be defined in a top level <dependencies> tag.

Greg Chabala

On Mon, Jul 26, 2021 at 3:18 PM Nick Stolwijk <ni...@gmail.com>
wrote:

> Hi,
>
> I think you need to fix the parameter resolution: 
> ${depStagingArea/pcs} should be ${depStagingArea}/pcs
>
> Hth,
>
> Nick Stolwijk
>
> ~~~ Try to leave this world a little better than you found it and, 
> when your turn comes to die, you can die happy in feeling that at any 
> rate you have not wasted your time but have done your best ~~~
>
> Lord Baden-Powell
>
>
> On Mon, Jul 26, 2021 at 9:28 PM Christopher.Miller@gd-ms.com < 
> Christopher.Miller@gd-ms.com> 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
> >
> >
> >
> >
>

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


Re: Questions on what xml tags to use for pom.xml file for downloading isos

Posted by Greg Chabala <gr...@gmail.com>.
I agree with NIck's suggestion on fixing the property names.

Also, when I run this, the isos are ...
>

When you run what? Your exact command invocation would help. A pom.xml does
not run like a script, it is shared configuration for any number of plugin
invocations.

Your configuration of artifacts within the dependency plugin is unusual.
Typically, your artifacts would be defined in a top level <dependencies>
tag.

Greg Chabala

On Mon, Jul 26, 2021 at 3:18 PM Nick Stolwijk <ni...@gmail.com>
wrote:

> Hi,
>
> I think you need to fix the parameter resolution: ${depStagingArea/pcs}
> should be ${depStagingArea}/pcs
>
> Hth,
>
> Nick Stolwijk
>
> ~~~ Try to leave this world a little better than you found it and, when
> your turn comes to die, you can die happy in feeling that at any rate you
> have not wasted your time but have done your best ~~~
>
> Lord Baden-Powell
>
>
> On Mon, Jul 26, 2021 at 9:28 PM Christopher.Miller@gd-ms.com <
> Christopher.Miller@gd-ms.com> 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
> >
> >
> >
> >
>

Re: Questions on what xml tags to use for pom.xml file for downloading isos

Posted by Greg Chabala <gr...@gmail.com>.
I had the advantage of learning Maven in the company of other developers
where it was already in heavy use, but I recommend reading the beginners
guides:

https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html
https://maven.apache.org/guides/getting-started/

Also, the Sonatype Maven book may be a bit dated, but sometimes it has
additional context: https://books.sonatype.com/mvnref-book/reference/

Greg Chabala

On Wed, Jul 28, 2021 at 7:03 AM Christopher.Miller@gd-ms.com <
Christopher.Miller@gd-ms.com> wrote:

>
> Okay, so I'll stay with what I have.
>
> Do you have any recommendations on where to get more up to speed on
> Maven?   Like I said earlier, I've been watching some videos on youtube,
> still not getting some of the concepts being put forth.
>
> Thanks
>
>
>
> -----Original Message-----
> From: Greg Chabala <gr...@gmail.com>
> Sent: Tuesday, July 27, 2021 4:10 PM
> To: Maven Users List <us...@maven.apache.org>
> Subject: Re: Questions on what xml tags to use for pom.xml file for
> downloading isos
>
> ----
> External E-mail --- CAUTION: This email originated from outside GDMS. Do
> not click links or open attachments unless you recognize the sender and
> know the content is safe.
>
> If it works, it works. It sounds like you're not really using Maven to
> build software in this case, you're only using (or abusing) it to download
> binaries.
>
> If the binaries you were downloading were actually libraries that Maven
> was using to compile software against, it would be more conventional for
> them to be in the dependency section.
>
> On Tue, Jul 27, 2021 at 2:53 PM Christopher.Miller@gd-ms.com <
> Christopher.Miller@gd-ms.com> wrote:
>
> >
> > Thanks for the write up.
> >
> > I'm watching a few videos on youtube, trying to understand the pros of
> > using Dependencies and I'm still not understanding, Vs what I have
> > currently mark up tags that pertain to the ISOs that I want to
> > download under <build> and <plugin> tags.
> >
> >
> >
> > -----Original Message-----
> > From: Greg Chabala <gr...@gmail.com>
> > Sent: Tuesday, July 27, 2021 1:31 PM
> > To: Maven Users List <us...@maven.apache.org>
> > Subject: Re: Questions on what xml tags to use for pom.xml file for
> > downloading isos
> >
> > ----
> > External E-mail --- CAUTION: This email originated from outside GDMS.
> > Do not click links or open attachments unless you recognize the sender
> > and know the content is safe.
> >
> > Sounds like you're all set, but as you asked for an example with the
> > dependencies tag:
> >
> > <?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">
> >
> >     <modelVersion>4.0.0</modelVersion>
> >
> >     <groupId>Software_Release_Here</groupId>
> >     <artifactId>Software_Program_Here</artifactId>
> >     <version>Version_Number_Here</version>
> >
> >     <properties>
> >         <depStagingArea>/dropbox/foo</depStagingArea>
> >         <outputDirectory>${depStagingArea}</outputDirectory>
> >     </properties>
> >
> >     <build>
> >         <plugins>
> >             <plugin>
> >                 <groupId>org.apache.maven.plugins</groupId>
> >                 <artifactId>maven-dependency-plugin</artifactId>
> >                 <version>3.1.1</version>
> >             </plugin>
> >         </plugins>
> >     </build>
> >
> >     <dependencies>
> >         <dependency>
> >             <groupId>${project.groupId}</groupId>
> >             <artifactId>1st_ISO_here.iso</artifactId>
> >             <version>${project.version}</version>
> >             <type>iso</type>
> >         </dependency>
> >         <dependency>
> >             <groupId>${project.groupId}</groupId>
> >             <artifactId>2nd_ISO_here.iso</artifactId>
> >             <version>${project.version}</version>
> >             <type>iso</type>
> >         </dependency>
> >     </dependencies>
> > </project>
> >
> > You would call this with mvn dependency:copy-dependencies instead of
> > mvn dependency:copy
> >
> > Greg Chabala
> >
> > On Tue, Jul 27, 2021 at 10:32 AM Christopher.Miller@gd-ms.com <
> > Christopher.Miller@gd-ms.com> wrote:
> >
> > >
> > >
> > > Thanks for the help on this as it was very helpful.
> > >
> > > All I needed was the following tag:
> > > <outputDirectory>${depStagingArea}</outputDirectory>
> > >
> > > This places the multiple ISOs under the correct directory in RHEL OS
> > > where it was defined under the following tag:
> > > <depStagingArea>/dropbox/foo</depStagingArea>
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Nick Stolwijk <ni...@gmail.com>
> > > Sent: Monday, July 26, 2021 4:18 PM
> > > To: Maven Users List <us...@maven.apache.org>
> > > Subject: Re: Questions on what xml tags to use for pom.xml file for
> > > downloading isos
> > >
> > > ----
> > > External E-mail --- CAUTION: This email originated from outside GDMS.
> > > Do not click links or open attachments unless you recognize the
> > > sender and know the content is safe.
> > >
> > > Hi,
> > >
> > > I think you need to fix the parameter resolution:
> > > ${depStagingArea/pcs} should be ${depStagingArea}/pcs
> > >
> > > Hth,
> > >
> > > Nick Stolwijk
> > >
> > > ~~~ Try to leave this world a little better than you found it and,
> > > when your turn comes to die, you can die happy in feeling that at
> > > any rate you have not wasted your time but have done your best ~~~
> > >
> > > Lord Baden-Powell
> > >
> > >
> > > On Mon, Jul 26, 2021 at 9:28 PM Christopher.Miller@gd-ms.com <
> > > Christopher.Miller@gd-ms.com> 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/mav
> > > > en
> > > > -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
> > > >
> > > >
> > > >
> > > >
> > >
> > > --------------------------------------------------------------------
> > > - 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: Questions on what xml tags to use for pom.xml file for downloading isos

Posted by "Christopher.Miller@gd-ms.com" <Ch...@gd-ms.com>.
Okay, so I'll stay with what I have. 

Do you have any recommendations on where to get more up to speed on Maven?   Like I said earlier, I've been watching some videos on youtube, still not getting some of the concepts being put forth. 

Thanks



-----Original Message-----
From: Greg Chabala <gr...@gmail.com> 
Sent: Tuesday, July 27, 2021 4:10 PM
To: Maven Users List <us...@maven.apache.org>
Subject: Re: Questions on what xml tags to use for pom.xml file for downloading isos

----
External E-mail --- CAUTION: This email originated from outside GDMS. Do not click links or open attachments unless you recognize the sender and know the content is safe.

If it works, it works. It sounds like you're not really using Maven to build software in this case, you're only using (or abusing) it to download binaries.

If the binaries you were downloading were actually libraries that Maven was using to compile software against, it would be more conventional for them to be in the dependency section.

On Tue, Jul 27, 2021 at 2:53 PM Christopher.Miller@gd-ms.com < Christopher.Miller@gd-ms.com> wrote:

>
> Thanks for the write up.
>
> I'm watching a few videos on youtube, trying to understand the pros of 
> using Dependencies and I'm still not understanding, Vs what I have 
> currently mark up tags that pertain to the ISOs that I want to 
> download under <build> and <plugin> tags.
>
>
>
> -----Original Message-----
> From: Greg Chabala <gr...@gmail.com>
> Sent: Tuesday, July 27, 2021 1:31 PM
> To: Maven Users List <us...@maven.apache.org>
> Subject: Re: Questions on what xml tags to use for pom.xml file for 
> downloading isos
>
> ----
> External E-mail --- CAUTION: This email originated from outside GDMS. 
> Do not click links or open attachments unless you recognize the sender 
> and know the content is safe.
>
> Sounds like you're all set, but as you asked for an example with the 
> dependencies tag:
>
> <?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">
>
>     <modelVersion>4.0.0</modelVersion>
>
>     <groupId>Software_Release_Here</groupId>
>     <artifactId>Software_Program_Here</artifactId>
>     <version>Version_Number_Here</version>
>
>     <properties>
>         <depStagingArea>/dropbox/foo</depStagingArea>
>         <outputDirectory>${depStagingArea}</outputDirectory>
>     </properties>
>
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-dependency-plugin</artifactId>
>                 <version>3.1.1</version>
>             </plugin>
>         </plugins>
>     </build>
>
>     <dependencies>
>         <dependency>
>             <groupId>${project.groupId}</groupId>
>             <artifactId>1st_ISO_here.iso</artifactId>
>             <version>${project.version}</version>
>             <type>iso</type>
>         </dependency>
>         <dependency>
>             <groupId>${project.groupId}</groupId>
>             <artifactId>2nd_ISO_here.iso</artifactId>
>             <version>${project.version}</version>
>             <type>iso</type>
>         </dependency>
>     </dependencies>
> </project>
>
> You would call this with mvn dependency:copy-dependencies instead of 
> mvn dependency:copy
>
> Greg Chabala
>
> On Tue, Jul 27, 2021 at 10:32 AM Christopher.Miller@gd-ms.com < 
> Christopher.Miller@gd-ms.com> wrote:
>
> >
> >
> > Thanks for the help on this as it was very helpful.
> >
> > All I needed was the following tag:
> > <outputDirectory>${depStagingArea}</outputDirectory>
> >
> > This places the multiple ISOs under the correct directory in RHEL OS 
> > where it was defined under the following tag:
> > <depStagingArea>/dropbox/foo</depStagingArea>
> >
> >
> >
> >
> > -----Original Message-----
> > From: Nick Stolwijk <ni...@gmail.com>
> > Sent: Monday, July 26, 2021 4:18 PM
> > To: Maven Users List <us...@maven.apache.org>
> > Subject: Re: Questions on what xml tags to use for pom.xml file for 
> > downloading isos
> >
> > ----
> > External E-mail --- CAUTION: This email originated from outside GDMS.
> > Do not click links or open attachments unless you recognize the 
> > sender and know the content is safe.
> >
> > Hi,
> >
> > I think you need to fix the parameter resolution:
> > ${depStagingArea/pcs} should be ${depStagingArea}/pcs
> >
> > Hth,
> >
> > Nick Stolwijk
> >
> > ~~~ Try to leave this world a little better than you found it and, 
> > when your turn comes to die, you can die happy in feeling that at 
> > any rate you have not wasted your time but have done your best ~~~
> >
> > Lord Baden-Powell
> >
> >
> > On Mon, Jul 26, 2021 at 9:28 PM Christopher.Miller@gd-ms.com < 
> > Christopher.Miller@gd-ms.com> 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/mav
> > > en
> > > -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
> > >
> > >
> > >
> > >
> >
> > --------------------------------------------------------------------
> > - 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: Questions on what xml tags to use for pom.xml file for downloading isos

Posted by Greg Chabala <gr...@gmail.com>.
If it works, it works. It sounds like you're not really using Maven to
build software in this case, you're only using (or abusing) it to download
binaries.

If the binaries you were downloading were actually libraries that Maven was
using to compile software against, it would be more conventional for them
to be in the dependency section.

On Tue, Jul 27, 2021 at 2:53 PM Christopher.Miller@gd-ms.com <
Christopher.Miller@gd-ms.com> wrote:

>
> Thanks for the write up.
>
> I'm watching a few videos on youtube, trying to understand the pros of
> using Dependencies and I'm still not understanding, Vs what I have
> currently mark up tags that pertain to the ISOs that I want to download
> under <build> and <plugin> tags.
>
>
>
> -----Original Message-----
> From: Greg Chabala <gr...@gmail.com>
> Sent: Tuesday, July 27, 2021 1:31 PM
> To: Maven Users List <us...@maven.apache.org>
> Subject: Re: Questions on what xml tags to use for pom.xml file for
> downloading isos
>
> ----
> External E-mail --- CAUTION: This email originated from outside GDMS. Do
> not click links or open attachments unless you recognize the sender and
> know the content is safe.
>
> Sounds like you're all set, but as you asked for an example with the
> dependencies tag:
>
> <?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">
>
>     <modelVersion>4.0.0</modelVersion>
>
>     <groupId>Software_Release_Here</groupId>
>     <artifactId>Software_Program_Here</artifactId>
>     <version>Version_Number_Here</version>
>
>     <properties>
>         <depStagingArea>/dropbox/foo</depStagingArea>
>         <outputDirectory>${depStagingArea}</outputDirectory>
>     </properties>
>
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-dependency-plugin</artifactId>
>                 <version>3.1.1</version>
>             </plugin>
>         </plugins>
>     </build>
>
>     <dependencies>
>         <dependency>
>             <groupId>${project.groupId}</groupId>
>             <artifactId>1st_ISO_here.iso</artifactId>
>             <version>${project.version}</version>
>             <type>iso</type>
>         </dependency>
>         <dependency>
>             <groupId>${project.groupId}</groupId>
>             <artifactId>2nd_ISO_here.iso</artifactId>
>             <version>${project.version}</version>
>             <type>iso</type>
>         </dependency>
>     </dependencies>
> </project>
>
> You would call this with mvn dependency:copy-dependencies instead of mvn
> dependency:copy
>
> Greg Chabala
>
> On Tue, Jul 27, 2021 at 10:32 AM Christopher.Miller@gd-ms.com <
> Christopher.Miller@gd-ms.com> wrote:
>
> >
> >
> > Thanks for the help on this as it was very helpful.
> >
> > All I needed was the following tag:
> > <outputDirectory>${depStagingArea}</outputDirectory>
> >
> > This places the multiple ISOs under the correct directory in RHEL OS
> > where it was defined under the following tag:
> > <depStagingArea>/dropbox/foo</depStagingArea>
> >
> >
> >
> >
> > -----Original Message-----
> > From: Nick Stolwijk <ni...@gmail.com>
> > Sent: Monday, July 26, 2021 4:18 PM
> > To: Maven Users List <us...@maven.apache.org>
> > Subject: Re: Questions on what xml tags to use for pom.xml file for
> > downloading isos
> >
> > ----
> > External E-mail --- CAUTION: This email originated from outside GDMS.
> > Do not click links or open attachments unless you recognize the sender
> > and know the content is safe.
> >
> > Hi,
> >
> > I think you need to fix the parameter resolution:
> > ${depStagingArea/pcs} should be ${depStagingArea}/pcs
> >
> > Hth,
> >
> > Nick Stolwijk
> >
> > ~~~ Try to leave this world a little better than you found it and,
> > when your turn comes to die, you can die happy in feeling that at any
> > rate you have not wasted your time but have done your best ~~~
> >
> > Lord Baden-Powell
> >
> >
> > On Mon, Jul 26, 2021 at 9:28 PM Christopher.Miller@gd-ms.com <
> > Christopher.Miller@gd-ms.com> 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
> > >
> > >
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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: Questions on what xml tags to use for pom.xml file for downloading isos

Posted by "Christopher.Miller@gd-ms.com" <Ch...@gd-ms.com>.
Thanks for the write up.  

I'm watching a few videos on youtube, trying to understand the pros of using Dependencies and I'm still not understanding, Vs what I have currently mark up tags that pertain to the ISOs that I want to download under <build> and <plugin> tags. 



-----Original Message-----
From: Greg Chabala <gr...@gmail.com> 
Sent: Tuesday, July 27, 2021 1:31 PM
To: Maven Users List <us...@maven.apache.org>
Subject: Re: Questions on what xml tags to use for pom.xml file for downloading isos

----
External E-mail --- CAUTION: This email originated from outside GDMS. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Sounds like you're all set, but as you asked for an example with the dependencies tag:

<?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">

    <modelVersion>4.0.0</modelVersion>

    <groupId>Software_Release_Here</groupId>
    <artifactId>Software_Program_Here</artifactId>
    <version>Version_Number_Here</version>

    <properties>
        <depStagingArea>/dropbox/foo</depStagingArea>
        <outputDirectory>${depStagingArea}</outputDirectory>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.1.1</version>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>1st_ISO_here.iso</artifactId>
            <version>${project.version}</version>
            <type>iso</type>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>2nd_ISO_here.iso</artifactId>
            <version>${project.version}</version>
            <type>iso</type>
        </dependency>
    </dependencies>
</project>

You would call this with mvn dependency:copy-dependencies instead of mvn dependency:copy

Greg Chabala

On Tue, Jul 27, 2021 at 10:32 AM Christopher.Miller@gd-ms.com < Christopher.Miller@gd-ms.com> wrote:

>
>
> Thanks for the help on this as it was very helpful.
>
> All I needed was the following tag:
> <outputDirectory>${depStagingArea}</outputDirectory>
>
> This places the multiple ISOs under the correct directory in RHEL OS 
> where it was defined under the following tag:
> <depStagingArea>/dropbox/foo</depStagingArea>
>
>
>
>
> -----Original Message-----
> From: Nick Stolwijk <ni...@gmail.com>
> Sent: Monday, July 26, 2021 4:18 PM
> To: Maven Users List <us...@maven.apache.org>
> Subject: Re: Questions on what xml tags to use for pom.xml file for 
> downloading isos
>
> ----
> External E-mail --- CAUTION: This email originated from outside GDMS. 
> Do not click links or open attachments unless you recognize the sender 
> and know the content is safe.
>
> Hi,
>
> I think you need to fix the parameter resolution: 
> ${depStagingArea/pcs} should be ${depStagingArea}/pcs
>
> Hth,
>
> Nick Stolwijk
>
> ~~~ Try to leave this world a little better than you found it and, 
> when your turn comes to die, you can die happy in feeling that at any 
> rate you have not wasted your time but have done your best ~~~
>
> Lord Baden-Powell
>
>
> On Mon, Jul 26, 2021 at 9:28 PM Christopher.Miller@gd-ms.com < 
> Christopher.Miller@gd-ms.com> 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
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> 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: Questions on what xml tags to use for pom.xml file for downloading isos

Posted by Greg Chabala <gr...@gmail.com>.
Sounds like you're all set, but as you asked for an example with the
dependencies tag:

<?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">

    <modelVersion>4.0.0</modelVersion>

    <groupId>Software_Release_Here</groupId>
    <artifactId>Software_Program_Here</artifactId>
    <version>Version_Number_Here</version>

    <properties>
        <depStagingArea>/dropbox/foo</depStagingArea>
        <outputDirectory>${depStagingArea}</outputDirectory>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.1.1</version>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>1st_ISO_here.iso</artifactId>
            <version>${project.version}</version>
            <type>iso</type>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>2nd_ISO_here.iso</artifactId>
            <version>${project.version}</version>
            <type>iso</type>
        </dependency>
    </dependencies>
</project>

You would call this with mvn dependency:copy-dependencies instead of mvn
dependency:copy

Greg Chabala

On Tue, Jul 27, 2021 at 10:32 AM Christopher.Miller@gd-ms.com <
Christopher.Miller@gd-ms.com> wrote:

>
>
> Thanks for the help on this as it was very helpful.
>
> All I needed was the following tag:
> <outputDirectory>${depStagingArea}</outputDirectory>
>
> This places the multiple ISOs under the correct directory in RHEL OS where
> it was defined under the following tag:
> <depStagingArea>/dropbox/foo</depStagingArea>
>
>
>
>
> -----Original Message-----
> From: Nick Stolwijk <ni...@gmail.com>
> Sent: Monday, July 26, 2021 4:18 PM
> To: Maven Users List <us...@maven.apache.org>
> Subject: Re: Questions on what xml tags to use for pom.xml file for
> downloading isos
>
> ----
> External E-mail --- CAUTION: This email originated from outside GDMS. Do
> not click links or open attachments unless you recognize the sender and
> know the content is safe.
>
> Hi,
>
> I think you need to fix the parameter resolution: ${depStagingArea/pcs}
> should be ${depStagingArea}/pcs
>
> Hth,
>
> Nick Stolwijk
>
> ~~~ Try to leave this world a little better than you found it and, when
> your turn comes to die, you can die happy in feeling that at any rate you
> have not wasted your time but have done your best ~~~
>
> Lord Baden-Powell
>
>
> On Mon, Jul 26, 2021 at 9:28 PM Christopher.Miller@gd-ms.com <
> Christopher.Miller@gd-ms.com> 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
> >
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

RE: Questions on what xml tags to use for pom.xml file for downloading isos

Posted by "Christopher.Miller@gd-ms.com" <Ch...@gd-ms.com>.

Thanks for the help on this as it was very helpful.  

All I needed was the following tag:  <outputDirectory>${depStagingArea}</outputDirectory>

This places the multiple ISOs under the correct directory in RHEL OS where it was defined under the following tag:  <depStagingArea>/dropbox/foo</depStagingArea>




-----Original Message-----
From: Nick Stolwijk <ni...@gmail.com> 
Sent: Monday, July 26, 2021 4:18 PM
To: Maven Users List <us...@maven.apache.org>
Subject: Re: Questions on what xml tags to use for pom.xml file for downloading isos

----
External E-mail --- CAUTION: This email originated from outside GDMS. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Hi,

I think you need to fix the parameter resolution: ${depStagingArea/pcs} should be ${depStagingArea}/pcs

Hth,

Nick Stolwijk

~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any rate you have not wasted your time but have done your best ~~~

Lord Baden-Powell


On Mon, Jul 26, 2021 at 9:28 PM Christopher.Miller@gd-ms.com < Christopher.Miller@gd-ms.com> 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
>
>
>
>

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


Re: Questions on what xml tags to use for pom.xml file for downloading isos

Posted by Nick Stolwijk <ni...@gmail.com>.
Hi,

I think you need to fix the parameter resolution: ${depStagingArea/pcs}
should be ${depStagingArea}/pcs

Hth,

Nick Stolwijk

~~~ Try to leave this world a little better than you found it and, when
your turn comes to die, you can die happy in feeling that at any rate you
have not wasted your time but have done your best ~~~

Lord Baden-Powell


On Mon, Jul 26, 2021 at 9:28 PM Christopher.Miller@gd-ms.com <
Christopher.Miller@gd-ms.com> 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
>
>
>
>