Maven not using configured repositories to resolve all dependencies - maven

Hello I am trying to build a jar using maven behind a corporate proxy with our own artifactory server.
We are building using docker gitlab runners and I am using the maven:3-jdk-8 image which is running Apache Maven 3.5.4.
The build starts fine by downloading the dependencies from our artifactory but when the maven-assembly-plugin tries to package our output into a jar I get the following error in debug mode:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2.1:single (package-jar-with-dependencies) on project <my-project>: Failed to create assembly: Unable to resolve dependencies for assembly 'jar-with-dependencies': Failed to resolve dependencies for assembly: Unable to get dependency information for org.hibernate.validator:hibernate-validator:jar:6.0.13.Final: Failed to process POM for org.hibernate.validator:hibernate-validator:jar:6.0.13.Final: Non-resolvable import POM: Could not transfer artifact org.jboss.shrinkwrap:shrinkwrap-bom:pom:1.2.3 from/to central (https://repo.maven.apache.org/maven2): repo.maven.apache.org: Name or service not known
[ERROR] org.hibernate.validator:hibernate-validator:jar:6.0.13.Final
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (https://artifactory.corp.net/, releases=true, snapshots=false)
[ERROR] Path to dependency:
[ERROR] 1) <my-project>
[ERROR] 2) org.springframework.boot:spring-boot-starter-web:jar:2.1.0.RELEASE: Unknown host repo.maven.apache.org: Name or service not known
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2.1:single (package-jar-with-dependencies) on project <my-project>: Failed to create assembly: Unable to resolve dependencies for assembly 'jar-with-dependencies'
The glaring issue would seem to be that maven is trying to retrieve hibernate-validator from repo.maven.apache.org rather than my local corporate artifactory.
I have verified that the jar in question does indeed exist in my artifactory. I have built the project locally (outside of docker maven version 3.6.1 bundled with Intellij) with identical settings and didn't have any problems.
Any ideas what I'm doing wrong?
Some possibly useful files
The effective settings generated by help:effective-settings
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd">
<localRepository>path-to-my-repo</localRepository>
<servers>
<server>
<username>username</username>
<password>***</password>
<id>central</id>
</server>
<server>
<username>username</username>
<password>***</password>
<id>snapshots</id>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Artifactory</name>
<url>https://artifactory.corp.net/</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>Artifactory</name>
<url>https://artifactory.corp.net/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Artifactory</name>
<url>https://artifactory.corp.net/</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>Artifactory</name>
<url>https://artifactory.corp.net/</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
<pluginGroups>
<pluginGroup>org.apache.maven.plugins</pluginGroup>
<pluginGroup>org.codehaus.mojo</pluginGroup>
</pluginGroups>
</settings>
The plugin configuration from the pom file
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>package-jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>the.main.class</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>

It is very likely that this is the result of a missing mirror configuration in the settings.xml.
If you want to send every request to your artifactory, you need to specify it as a mirror. Otherwise, repository definitions from POMs may be used as well.

Related

mule maven dependency issue

I have an existing api which i need to work on . ( Mule 3 )
when I try and do a mvn clean install it fails with this error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-
plugin:2.10:unpack (unpack) on project xyz: Unable to resolve artifact.:
Could not transfer artifact ORGID:xyz:zip:fat-raml:1.0.2 from/to
springio (http://repo.spring.io/libs-release): Failed to transfer file:
http://repo.spring.io/libs-release/ORGID/xyz/1.0.2/xyz-1.0.2-fat-raml.zip.
Return code is: 308 , ReasonPhrase:Permanent Redirect.
[ERROR] ORGID:xyz:zip:1.0.2
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] MuleRepositoryEE (https://repository.mulesoft.org/nexus-
ee/content/repositories/releases-ee/, releases=true, snapshots=false),
[ERROR] MuleRepository
(https://repository.mulesoft.org/nexus/content/repositories/releases/, releases=true,
snapshots=false),
[ERROR] AnypointExchangeRepository
(https://maven.anypoint.mulesoft.com/api/v2/organizations/ORGID/maven, releases=true,
snapshots=true),
[ERROR] springio (http://repo.spring.io/libs-release, releases=true, snapshots=true),
[ERROR] Central (http://repo1.maven.org/maven2/, releases=true, snapshots=true),
[ERROR] mulesoft-releases (http://repository.mulesoft.org/releases/, releases=true,
snapshots=true),
[ERROR] mule-ee-releases (https://repository-
master.mulesoft.org/nexus/content/repositories/releases-ee/, releases=true,
snapshots=true),
[ERROR] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[ERROR] -> [Help 1]
The relevant plugin is :
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>unpack</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>ORGID</groupId>
<artifactId>xyz</artifactId>
<version>1.0.2</version>
<type>zip</type>
<classifier>fat-raml</classifier>
<overWrite>true</overWrite>
<outputDirectory>src/main/api/</outputDirectory>
<includes>**/*</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
The repository section in pom is :
<repositories>
<repository>
<id>springio</id>
<name>springio</name>
<url>http://repo.spring.io/libs-release</url>
<layout>default</layout>
</repository>
<repository>
<id>Central</id>
<name>Central</name>
<url>http://repo1.maven.org/maven2/</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Releases Repository</name>
<url>http://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
<repository>
<id>AnypointExchangeRepository</id>
<name>AnypointExchangeRepository</name>
<url>https://maven.anypoint.mulesoft.com/api/v2/organizations/ORGID/maven</url>
<layout>default</layout>
</repository>
<repository>
<id>mule-ee-releases</id>
<name>MuleEE Releases Repository</name>
<url>https://repository-master.mulesoft.org/nexus/content/repositories/releases-
ee/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mulesoft-release</id>
<name>mulesoft release repository</name>
<layout>default</layout>
<url>http://repository.mulesoft.org/releases/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<distributionManagement>
<repository>
<id>AnypointExchangeRepository</id>
<name>AnypointExchangeRepository</name>
<url>https://maven.anypoint.mulesoft.com/api/v1/organizations/ORGID/maven</url>
<layout>default</layout>
</repository>
</distributionManagement>
I am not sure why maven is trying to find raml in spring repository ? when it should find it in the ORGID repo ?
Does the order of the repositories need to change ?
The permanent redirect error may be caused because some of the repositories are being defined in you pom with HTTP URLs (ie http://...). Most repositories these days use HTTPS because of security reasons and redirect the HTTP requests. If Maven doesn't follow redirects it fails the build. Try using HTTPS URLs for all the repositories.

Deploy Artefact at nexus Server - error dependencies could not be resolved

I have setup a nexus server and afterwards I had the opinion to simple deploy an artefact to this nexus server. Therefore I created a simple Java project with this pom:
<project xmlns="...">
<modelVersion>4.0.0</modelVersion>
<groupId>MyProject</groupId>
<artifactId>MyProject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
My settings file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<settings ...>
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
</servers>
<mirrors>
<mirror>
<id>nexus</id>
<name>Nexus Public Mirror</name>
<mirrorOf>central</mirrorOf>
<url>http://it-nexus.domain:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
Then I have tried to deploy my artefact with:
mvn deploy
and I got this Error:
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-resources-plugin
:jar:2.6 in http://it-nexus.domain:8081/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of
nexus has elapsed or updates are forced -> [Help 1]
Actually I don't know what I am doing wrong!?
You've got a few things wrong (well, everything really).
First, you can remove profiles and everything under it, along with activeProfiles, from your server.xml file. Next, you need to add a servers entry, containing a server with the id, 'nexus' (assuming you're uploading to the same nexus instance you're using to mirror central), along with a username and password of some sort.
Then you have to have a distributionManagement section in your pom, referencing the same server you've specified in the settings.xml file, and configure the maven-deploy plugin. Documentation for that can be found here. You will also need an scm section.
The actual error you talk about is probably because your nexus server isn't actually configured to proxy/mirror central. Oh, and you should use * as the argument to mirrorOf.

Trying to access Oracle's Maven repository

I'm attempting to access Oracle's repository. Oracle doesn't make it easy. However, I'm attempting to follow the documentation that Oracle provided.
I've:
Approved the licensing agreement on my system (in case there's some sort of cookie that needs to be set).
Set both M2_HOME and MAVEN_HOME to /usr/share/apache-maven.
Created an Oracle account.
Added the Oracle Repository to my settings.xml file.
Downloaded wagon-http 2.8 and put it in my $M2_HOME/libs/ext directory.
Generated a master password and put it in $HOME/.m2/settings-security.xml
Generated an encrypted password.
Added the Oracle Maven Repository to my $HOME/.m2/settings.xml file as specified.
Configured HTTP Wagon and added that to my $HOME/.m2/settings.xml file.
My project POM looks like this:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.vegicorp</groupId>
<artifactId>testMe</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>testMe</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>process-resources</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>wls-api</artifactId>
<version>12.1.2</version>
</dependency>
</dependencies>
</project>
My settings.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<username>qazwart</username>
<password>swordfish</password>
<id>central</id>
</server>
<server>
<username>qazwart</username>
<password>swordfish</password>
<id>snapshots</id>
</server>
<server>
<id>maven.oracle.com</id>
<username>qazwart#foo.com</username>
<password>{swordfish=}</password>
<configuration>
<basicAuthScope>
<host>ANY</host>
<port>ANY</port>
<realm>OAM 11g</realm>
</basicAuthScope>
<httpConfiguration>
<all>
<params>
<property>
<name>http.protocol.allow-circular-redirects</name>
<value>%b,true</value>
</property>
</params>
</all>
</httpConfiguration>
</configuration>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<id>maven.oracle.com</id>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>https://maven.oracle.com</url>
<layout>default</layout>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>http://repo.vegicorp.net/artifactory/libs-release</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://repo.vegicorp.net/artifactory/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>maven.oracle.com</id>
<url>https://maven.oracle.com</url>
</pluginRepository>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>http://repo.vegicorp.net/artifactory/plugins-release</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>plugins-snapshot</name>
<url>http://repo.vegicorp.net/artifactory/plugins-snapshot</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>artifactory</activeProfile>
</activeProfiles>
</settings>
When I run Maven, I get this:
$ mvn clean package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building testMe 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: https://maven.oracle.com/commons-io/commons-io/2.4/commons-io-2.4.pom
Downloading: http://repo.vegicorp.net/artifactory/libs-release/commons-io/commons-io/2.4/commons-io-2.4.pom
Downloaded: http://repo.vegicorp.net/artifactory/libs-release/commons-io/commons-io/2.4/commons-io-2.4.pom (10 KB at 69.4 KB/sec)
Downloading: https://maven.oracle.com/com/oracle/wls-api/12.1.2/wls-api-12.1.2.pom
Downloading: http://repo.vegicorp.net/artifactory/libs-release/com/oracle/wls-api/12.1.2/wls-api-12.1.2.pom
Downloading: http://repo.vegicorp.net/artifactory/libs-snapshot/com/oracle/wls-api/12.1.2/wls-api-12.1.2.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.787 s
[INFO] Finished at: 2015-06-15T16:37:56-04:00
[INFO] Final Memory: 9M/156M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project testMe: Could not resolve dependencies for project com.vegicorp:testMe:jar:1.0-SNAPSHOT: Failed to collect dependencies at com.oracle:wls-api:jar:12.1.2: Failed to read artifact descriptor for com.oracle:wls-api:jar:12.1.2: Could not transfer artifact com.oracle:wls-api:pom:12.1.2 from/to maven.oracle.com (https://maven.oracle.com): Not authorized , ReasonPhrase:Unauthorized. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
It appears that I don't have access to the Oracle repository although I accepted the licensing agreement and am using the account I've created. Is there something I'm missing? If I remove the reference to wls-api.jar in my pom.xml, it works.
From your settings.xml I can see that you use Artifactory. Why won't you define Oracle's repository as a remote in Artifactory? That will make the access much easier. Here's a simple guide on how to do so.
And, of course, here's the official user guide on it.
I am with JFrog, the company behind Bintray and [artifactory], see my profile for details and links.
For anybody that has spent any time fighting with this ... make sure that the ID of the oracle repository in your POM is the same as the ID of the server defined in your Settings.xml.
This is not documented anywhere but it appears that maven just does not request authorization if these IDs do not match. It does not attempt it based upon the URL as other solutions appear to suggest.
I think you missed accepting the Oracle Maven repository terms and conditions. https://www.oracle.com/webapps/maven/register/license.html

Why Artifactory Maven and Oracle fail to communicate?

I hope an answer will be a universal guide on how to connect Maven, Oracle And Artifactory and will become most usefull webpage on the net. Most likely this question will be marked down, but I just give up on Maven, Artifactory and Oracle.
I am running windows 7-64 with maven installed as a part of Oracle jdev. Company has Artifactory setted up and running on vpn network.... but somethings are not right.
Following simple instructions on:
http://biemond.blogspot.co.uk/2013/07/maven-support-in-weblogic-jdeveloper.html
fails at first instruction:
Install the oracle maven sync plugin to your local repository
the command:
mvn deploy:deploy-file -DpomFile=oracle-maven-sync.12.1.2.pom -Dfile=oracle-maven-sync.12.1.2.jar
the error:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file (default-cli) on project standalone-pom: The parameters 'url' for goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file are missing or invalid -> [Help 1]
adding
-Durl=file://C:\Users\{user}\.m2
seems to install that artifact to my local .m2 repo
C:\Users\{user}\.m2\com\oracle\maven\oracle-maven-sync\12.1.2-0-0
but only seems, then I get to number 3 on that tutorial:
mvn com.oracle.maven:oracle-maven-sync:help
gives an error:
[ERROR] Error resolving version for plugin 'com.oracle.maven:oracle-maven-sync' from the repositories [local (C:\Users\{user}\.m2), central (http://repo.maven.apache.org/maven2)]: Plugin not found in any plugin repository -> [Help 1]
So the plugin failed to install?
Oracle Maven repository is password protected due to weird oracle thoughts, Artifactory has external Central and Oracle repositories why letting it mirror everything stops maven from even finding deploy module?
here is my settings.xml:
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<servers>
<server>
<username>user</username>
<password>xxx</password>
<id>central</id>
</server>
<server>
<username>user</username>
<password>xxx</password>
<id>snapshots</id>
</server>
</servers>
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release-local</name>
<url>http://art.host.ru:8081/artifactory/libs-release-local</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot-local</name>
<url>http://art.host.ru:8081/artifactory/libs-snapshot-local</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release-local</name>
<url>http://art.host.ru:8081/artifactory/plugins-release-local</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>plugins-snapshot-local</name>
<url>http://art.host.ru:8081/artifactory/plugins-snapshot-local</url>
</pluginRepository>
</pluginRepositories>
<id>artifactory</id>
</profile>
<profile>
<id>oracle-maven</id>
<properties>
<oracle-maven-sync.oracleHome>C:\Oracle\Middleware\Oracle_Home</oracle-maven-sync.oracleHome>
<oracle-maven-sync.testOnly>false</oracle-maven-sync.testOnly>
<oracle-maven-sync.failOnError>false</oracle-maven-sync.failOnError>
</properties>
</profile>
</profiles>
<activeProfiles>
<activeProfile>oracle-maven</activeProfile>
</activeProfiles>
</settings>
Well, I think you just follow the wrong guide. All this manual deployment of some random maven plugins is just wrong.
Just follow the simple and detailed instructions in the Artifactory User Guide and you're good to go.
The problem is with the -Dmaven.repo.local
Do not provide the argument.
Use http://jcenter.bintray.com for most of the artifacts
And for Oracle: oracle-maven-sync plugin
oracle instructions
$ORACLE_HOME = where jdev 12.1.2
$M2_HOME = $ORACLE_HOME/oracle_common/modules/org.apache.maven_3.0.4
$M2 = $M2_HOME/bin (add to $PATH)
artifactory->home->maven settings generate settings.xml put it in ~/.m2
create local repo in artifactory"oracle-local-12.1.2"
settings.xml add following code
<profiles>
<profile>
<properties>
<oracle-maven-sync.oracleHome>$ORACLE_HOME</oracle-maven-sync.oracleHome>
<oracle-maven-sync.testOnly>false</oracle-maven-sync.testOnly>
<oracle-maven-sync.failOnError>false</oracle-maven-sync.failOnError>
<oracle-maven-sync.serverId>oracle-local-12.1.2</oracle-maven-sync.serverId></properties>
artifactory -> username(top right corner) -> enter pass -> unlock -> забрать encrypted password(copy)
add aquired pass to settings.xml for all
go to $ORACLE_HOME/oracle_common/plugins/maven/com/oracle/maven/oracle-maven-sync/12.1.2 (use cmd/terminal)
mvn deploy:deploy-file -DpomFile=oracle-maven-sync-12.1.2.pom -Dfile=oracle-maven-sync-12.1.2.jar
test it: mvn com.oracle.maven:oracle-maven-sync:help
push artifacts oracle 12.1.2 mvn com.oracle.maven:oracle-maven-sync:push
long time wait (~3000 artifacts > 2 hours)
complete set up of repos and in settings.xml

Maven Build Error - Cannot determine host information

I'm new to maven.
When i try to run "mvn compile" i'm getting the following error
Failed to execute goal
de.smartics.maven.plugin:buildmetadata-maven-plugin:1.4.0:provide-buildmetadata (default)
on project xxxxx:
Cannot determine host information. SJP2S5-113053048D: SJP2S5-113053048D:
nodename nor servname provided, or not known -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Here is my settings.xml
<?xml version="1.0"?>
<settings 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/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://xxxx-xxxx.xxxxx.com/xxxx/content/xxxx/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<properties>
<repo-releases-url>http://xxx-xxxxxx.xxxx.com/xxxxx/content/repositories/releases/</repo-releases-url>
<repo-snapshots-url>http://xxx-xxxxx.xxxx.com/xxxxx/content/repositories/snapshots/</repo-snapshots-url>
</properties>
<!-- Enable snapshots for the built in central repo to direct -->
<!-- all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!-- make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
<pluginGroups>
<pluginGroup>com.webobjects.maven.plugins</pluginGroup>
<pluginGroup>org.mortbay.jetty</pluginGroup>
</pluginGroups>
<servers>
<server>
<id>snapshots</id>
<username>xxxx_engineer</username>
<password>xxxxx</password>
</server>
<server>
<id>thirdparty</id>
<username>xxxxx</username>
<password>xxxx</password>
</server>
</servers>
</settings>
I've tried mvn clean and mvn compile, mvn clean is successful, but mvn compile produces the error above, which I do not understand.
I've checked the link mentioned in the error, and it talks about proxy settings in the settings.xml.
I'm using
Maven 3.0.4
Jdk 1.7
MAC OS X
Below is the result for above command mvn --version
$ mvn --version
Apache Maven 3.0.4 (r1232337; 2012-01-17 14:14:56+0530)
Maven home: /Users/raghuramankumarasamy/Documents/raghu/maven/apache-maven-3.0.4
Java version: 1.7.0_75, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_75.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.10", arch: "x86_64", family: "mac"
I'm using mac os X
the below command hostname, gives the following result....
SJP2S5-113053048D:xxxxx raghuramankumarasamy$ hostname
SJP2S5-113053048D
Added part of pom.xml as per request
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>de.smartics.maven.plugin</groupId>
<artifactId>buildmetadata-maven-plugin</artifactId>
<versionRange>[0.0.0,)</versionRange>
<goals>
<goal>provide-buildmetadata</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>

Resources