Looks like I can use the following command to determine the version number of 
Maven plugings:  mvn dependency:tree -Dverbose 


--- maven-dependency-plugin:2.8:tree (default-cli) @ --- 


Probably would be wise to install the latest Dependency Plugin 3.2.0

Thanks



-----Original Message-----
From: Greg Chabala <[email protected]> 
Sent: Tuesday, August 3, 2021 3:57 PM
To: Maven Users List <[email protected]>
Subject: Re: Unable to resolve artifact error when trying to transfer ISO using 
pom.xml

----
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.

Ah, I missed your inline question about plugin versions. In general they are 
independent of the maven version, and you should feel free to upgrade to the 
latest version for any plugin.

https://maven.apache.org/plugins/maven-dependency-plugin/ is at 3.2.0.

https://www.mojohaus.org/versions-maven-plugin/ has a display-plugin-updates 
goal, along with other similar goals that can help you check if your project 
plugins are up to date.

On Tue, Aug 3, 2021 at 2:09 PM Greg Chabala <[email protected]> wrote:

> For reference: https://maven.apache.org/pom.html
>
> You want your Nexus configured in the top level repositories tag, not 
> in distributionManagement.
>
> On Tue, Aug 3, 2021 at 2:00 PM [email protected] < 
> [email protected]> wrote:
>
>>
>> Sorry, I forgot to include the Nexus repo in the pom.xml
>>
>> <distributionManagement>
>>   <repository>
>>     <uniqueVersion>false</uniqueVersion>
>>     <id>ID_GOES_HERE</id>
>>     <name>ID_GOES_HERE</name>
>>     <url>Nexus_repo_url_copied_here></url>
>>     <layout>default</layout>
>>   </repository>
>> </distributionManagement>
>>
>>
>> I'm copying the URL directly from the Nexus repo directly into the 
>> <url> tags.
>>
>> thanks
>>
>>
>> -----Original Message-----
>> From: Greg Chabala <[email protected]>
>> Sent: Tuesday, August 3, 2021 2:41 PM
>> To: Maven Users List <[email protected]>
>> Subject: Re: Unable to resolve artifact error when trying to transfer 
>> ISO using pom.xml
>>
>> ----
>> 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.
>>
>> Your ISO will not be in Central. If it is, you can tell us the 
>> coordinates.
>>
>> You need your Nexus repository configured in the pom.xml so that 
>> Maven can find the artifacts.
>>
>> On Tue, Aug 3, 2021 at 1:25 PM [email protected] < 
>> [email protected]> wrote:
>>
>> >
>> > I was able to get a working pom.xml in our development environment, 
>> > however when I transferred this pom to an production, air-gapped 
>> > environment, it continues to output the following error:  unable to 
>> > resolve artifact
>> >
>> > I am not a software developer, I'm a system engineer and a lot of 
>> > the pom.xml files that I've inherited aren't uniform between each 
>> > other, so please bear with me as I've been trying to figure this 
>> > out for
>> months.
>> >
>> > Environment:
>> > RHEL 8.2 OS
>> > Apache Maven 3.5.4 (currently installed) Java Version:  1.8.0_222 
>> > (currently installed and added java path to my .bashrc file under 
>> > my home directory and output of $JAVA_HOME shows 
>> > /etc/alternatives/jre_1.8.0_openjdk.  Not sure if this is the Java 
>> > that I'm supposed to use, however I don't get any type of Java 
>> > errors when trying to run this.)
>> >
>> >
>> > When I execute the pom with the following command:  mvn 
>> > dependency:copy -f pom.xml -s ~/.m2/settings.xml
>> >
>> > This is some of the output that I'm getting, the download part is 
>> > odd, as it has the group ID, artifact ID and version ID along with 
>> > the name of the ISO I'm trying to download from a Nexus repo.
>> >
>> > "Downloading from central:  https://repo.maven.apache.org/maven2/
>> > <groupID>/<artifactID>/<versionID><release_number>/<name<
>> > https://repo.maven.apache.org/maven2/%3cgroupID%3e/%3cartifactID%3e
>> > /%3 cversionID%3e%3crelease_number%3e/%3cname>
>> > of ISO here>
>> >
>> > Error failed to execute goal
>> > org.apache.maven.plugins:maven-dependency-plugin:2.8copy 
>> > (default-cli) on Project <artifactID here>: Unable to resolve 
>> > artifact Could not transfer artifact 
>> > <groupid>:<artifactid>:iso:<version_number>
>> > from/to central
>> > (https://repo.maven.apache.org/maven2):
>> > repo.maven.apache.org: Name or service not known"
>> >
>> >
>> > Here is my pom.xml.  I've modeled this after the best practice put 
>> > out by apache/maven for using dependency:copy
>> >
>> >
>> > https://maven.apache.org/plugins/maven-dependency-plugin/examples/c
>> > opy
>> > ing-artifacts.html
>> >
>> > <modeVersion>4.0.0</modeVersion>
>> >
>> > <groupId>group_ID_here</groupId>
>> > <artifactId>artifact_ID_here</artifactId>
>> > <version>version_of_iso</version>
>> >
>> > <properties>
>> >   <depStagingArea>/dropbox/</depStagingArea>
>> > </properties>
>> >
>> > <build>
>> >   <plugins>
>> >      <plugin>
>> >         <groupId>org.apache.maven.plugins</groupId>
>> >         <artifactId>maven-dependency-plugin</artifactId>
>> >         <version>2.8</version>
>> >  <------------------------------------------------How do I know 
>> > what version number this is suppose to be and will work correctly 
>> > with the version of Maven that I have?
>> >            <configuration>
>> >              <artifactItems>
>> >                <artifactItem>
>> >                  <groupId>${project.groupId}</groupId>
>> >                  <artifactId>artifact_ID_goes_here</artifactId>
>> >                  <version>${project.version</version>
>> >                  <type>iso</type>
>> >                  <overWrite>false</overWrite>
>> >                  <outputDirectory>${depStagingArea}</outputDirectory>
>> >                  <destFileName>${downloadFilename}</destFileName>
>> >                </artifactItem>
>> >              </artifactItems>
>> >            </configuration>
>> >          </plugin>
>> >        </plugins>
>> >      </build>
>> >
>> >
>> > This is my settings.xml file
>> >
>> > <settings xmlns = >
>> > <servers>
>> >   <server>
>> >     <id>ID_goes_here</id>
>> >     <username>username_goes_here</username>
>> >     <password>password_goes_here</password>
>> >     <filePermissions>664</filePermissions>
>> >     <directoryPermission>775</directoryPermission>
>> >   </server>
>> > </servers>
>> >
>> > <profiles>
>> >   <profile>
>> >     <id>nexus</id>
>> >      <repositories>
>> >      <repository>
>> >        <id>ID_goes_here</ID>
>> >        <URL>URL_goes_here</URL>
>> >        <releases><enabled>true</enabled></releases>
>> >     </repository>
>> >     </repositories>
>> >   </profile>
>> >   </profiles>
>> > </settings>
>> >
>> >
>> > Thanks
>> >
>> > Chris
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to