sun.security.validator.ValidatorException dependency failing - maven

I get the following Exception when i use the Primefaces Maven Repository
mvn clean spring-boot:run
[ERROR] Failed to execute goal on project Passwortmanager: Could not resolve dependencies for project org.dominik:Passwortmanager:jar:2.0.3: Failed to collect dependencies at org.primefaces.themes:all-themes:jar:1.0.10: Failed to read artifact descriptor for org.primefaces.themes:all-themes:jar:1.0.10: Could not transfer artifact org.primefaces.themes:all-themes:pom:1.0.10 from/to prime-repo (https://repository.primefaces.org): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]
My POM.xml
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
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>org.dominik</groupId>
<artifactId>Passwortmanager</artifactId>
<packaging>jar</packaging>
<version>2.0.3</version>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>https://repository.primefaces.org</url>
<layout>default</layout>
</repository>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/libs-snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>all-themes</artifactId>
<version>${primefaces.theme.version}</version>
</dependency>
</dependencies>
<finalName>Passwortmanager</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
The official Primefaces Showcase doesn't work too: https://github.com/primefaces/showcase

On Mac and Windows, update your JDK from Oracle, for sure java full version "1.8.0_131-XXX" works on the Mac and Windows. Mac and Windows versions of the JDK generally do not use the system certificate stores instead they have their own.
For Linux, apt-get ca-certificates which will in turn update the Java certificates if you had the ca-certificates-java installed.
The new certificates will work with repository.primefaces.org

Add pom.xml:
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>all-themes</artifactId>
<version>1.0.10</version>
</dependency>
<repositories>
<repository>
<id>primefaces-maven-repository</id>
<name>PrimeFaces Maven Repository</name>
<url>https://repository.primefaces.org</url>
</repository>
</repositories>
Run Maven -> Update Project (check Force Update)
Alternative solution:
Remove repository PrimeFaces (https://repository.primefaces.org) pom.xml
Download JAR Theme: https://repository.primefaces.org/org/primefaces/themes/all-themes/1.0.10/all-themes-1.0.10.jar
Run command (command-line or IDE): mvn install:install-file -Dfile=all-themes-1.0.10.jar -DgroupId=org.primefaces.themes -DartifactId=all-themes -Dversion=1.0.10 -Dpackaging=jar
Maven - Update Project

To make it simple, websites/services which are providing their services through a secure channel (secure http/https), need to have their certification added so their clients can trust them.
The repository "https://repository.primefaces.org" uses let's encrypt certification. The funny thing is that usually, you can open the link in a browser but java throws security exceptions, that is because it stores its certificates in a separate place (this is the case for me: Windows7, Oracle java 1.8.0_92). It stores certifications in the {jre_PATH}/lib/security.
However, you should note that there are two jre directories and since we use JDK at build time, therefore we should add the new certificate to jre in the jdk directory.
To add the new certification open "https://repository.primefaces.org" in a browser (firefox) and export certification. (I chose X.509 certification with chain), Then you need to add it in keystore:
keytool -keystore cacerts -importcert -file [NAME_OF_CERT_FILE]
Then enter the pass (default pass is "changeit")
That is it :)

Related

sonar-maven-plugin 3.7.0.1746

I am getting below error while using the plugin (sonar-maven-plugin 3.7.0.1746):
ERROR:
Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.7.0.1746:sonar (default-cli) on project kcc-xbu-saprfc-services-sys-api: Unexpected internal error near index 1
I have added below in pom.xml file in respective sections:
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.7.0.1746</version>
</plugin>
<dependency>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.7.0.1746</version>
</dependency>
<repository>
<id>org.sonarsource.scanner.maven</id>
<name>sonar-maven-plugin</name>
<url>https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin</url>
<layout>default</layout>
</repository>
<pluginRepository>
<id>org.sonarsource.scanner.maven</id>
<name>sonar-maven-plugin</name>
<layout>default</layout>
<url>https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
Versions currently being used:
SonarQube version: 7.9.1
MULE_EE with version 4.2.2
JDK: 1.8.0_251 (mixed mode)
Maven Version : 3.173.0
However maven is getting executed from "C:\Program Files\Maven\apache-maven-3.6.2\bin\mvn.cmd".
I am executing the build using azure pipeline.
Please let me know how to resolve this issue. Thank you.
If you are going to submit your code for SonarQube platform, normally the pom file doesn't need to have those dependencies, instead of it you can decouple that in changing the settings.xml of the maven (if you have a dedicated server, it should be inside .m2 folder for Windows).
Maven's settings.xml should have this profile:
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
<properties>
<sonar.login>*your-user-here*</sonar.login>
<sonar.password>*your-pwd-here*</sonar.password>
<sonar.host.url>*url-of-your-sonar-platform*</sonar.host.url>
</properties>
</activation>
<profile>
After that, you can setup you pipeline to run the following command for your project:
mvn sonar:sonar
Good luck!

How to resolve a maven dependency in a bitbucket pipeline that exists in another repo

I'm setting up a deployment pipeline for my companys mulesoft APIs using bitbucket-pipelines. This technology is attractive to us because of the built in integrations with Jira. The problem is that we are using a domain project. All of the other dependencies get downloaded from anypoint exchange, but the domain project cannot be hosted there, so I get this error:
[ERROR] Failed to execute goal on project sourceControlDemo: Could not resolve dependencies for project com.mycompany:sourceControlDemo:mule-application:1.0.0-SNAPSHOT: Could not find artifact com.mycompany:[mycompany]-domain:jar:mule-domain:1.0.0 in anypoint-exchange (https://maven.anypoint.mulesoft.com/api/v1/maven) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project sourceControlDemo: Could not resolve dependencies for project com.mycompany:sourceControlDemo:mule-application:1.0.0-SNAPSHOT: Could not find artifact com.mycompany:[mycompany]-domain:jar:mule-domain:1.0.0 in anypoint-exchange (https://maven.anypoint.mulesoft.com/api/v1/maven)
In our current process, which involves building the projects locally, the domain project is included in the workspace and this error does not occur.
It seems as though there are a few strategies here:
* Create a custom docker image with the dependency included
- This options seems overkill, and presents the biggest skill gap for me, as I have never used docker.
* Host the domain project on a private maven repo to be referenced in the dependent project pom.xml
- This seems like the "normal" way to do it. However, it again seems like overkill for one dependency.
* Clone the domain project repo in the pipeline file, install the project in the local repository automatically
- this is the option I'd really like to go with. I've managed to clone the repo and run mvn install in its root, but upon running mule deploy in the next step, it still cannot find the dependency. I'm not sure what the file structure really looks like in the pipeline, and can't figure out how to configure the pom to look in the right place.
My bitbucket-pipelines.yml file
image: maven:3.6.1-jdk-8
pipelines:
branches:
DEV:
- step:
name: install domain project
trigger: automatic
caches:
- maven
script:
- apt-get update -y
- apt-get install -y git
- cd ..
- git clone git#bitbucket.org:[mycompany]/[mycompany]-domain.git
- cd [mycompany]-domain
- mvn install
- cd ../build
- step:
name: Build and Deploy
trigger: automatic
caches:
- maven
deployment: DEV
script:
- mvn deploy -e -DmuleDeploy
My pom.xml file for the non domain project
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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.mycompany</groupId>
<artifactId>sourceControlDemo</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>mule-application</packaging>
<name>sourceControlDemo</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<app.runtime>4.1.5</app.runtime>
<mule.maven.plugin.version>3.2.7</mule.maven.plugin.version>
</properties>
<build>
<finalName>${artifactId}-${BITBUCKET_BUILD_NUMBER}</finalName>
<plugins>
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-maven-plugin</artifactId>
<version>${mule.maven.plugin.version}</version>
<extensions>true</extensions>
<configuration>
<armDeployment>
<uri>https://anypoint.mulesoft.com</uri>
<target>${target}</target>
<targetType>${target_type}</targetType>
<username>${username}</username>
<password>${password}</password>
<environment>${environment}</environment>
<muleVersion>4.1.5</muleVersion>
</armDeployment>
</configuration>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>[mycompany]-domain</artifactId>
<version>1.0.0</version>
<classifier>mule-domain</classifier>
<scope>provided</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>anypoint-exchange</id>
<name>Anypoint Exchange</name>
<url>https://maven.anypoint.mulesoft.com/api/v1/maven</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Releases Repository</name>
<url>https://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mulesoft-releases</id>
<name>mulesoft release repository</name>
<layout>default</layout>
<url>https://repository.mulesoft.org/releases/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
I've also tried this in the pom:
<dependency>
<groupId>com.mycompany</groupId>
<artifactId>[mycompany]-domain</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<type>jar</type>
<classifier>mule-domain</classifier>
<systemPath>${basepath}/.m2/repository</systemPath>
</dependency>
and got this error
[ERROR] Failed to execute goal on project sourceControlDemo: Could not resolve dependencies for project com.mycompany:sourceControlDemo:mule-application:1.0.0-SNAPSHOT: Could not find artifact com.mycompany:[mycompany]-domain:jar:mule-domain:1.0.0 at specified path /root/.m2/repository -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project sourceControlDemo: Could not resolve dependencies for project com.mycompany:sourceControlDemo:mule-application:1.0.0-SNAPSHOT: Could not find artifact com.mycompany:[mycompany]-domain:jar:mule-domain:1.0.0 at specified path /root/.m2/repository
In case it's not clear, I've censored my company's name.
The expected result is for the project to successfully build and deploy.
You can follow this article, to achieve it.
cloud-repo-and-bitbucket-example
Here is one way to do it. Works for me:
Add the settings.xml file and change your cloud repo user and password for bitbucket secure variables.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
https://maven.apache.org/xsd/settings-1.0.0.xsd"
<!-- Complete Documentation for the settings.xml file can be found at https://maven.apache.org/settings.html -->
<activeProfiles>
<activeProfile>example</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>example</id>
<repositories>
<repository>
<id>${private_repo_id}</id>
<name>Example Java Repository</name>
<url>${private_repo_url}</url>
</repository>
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>io.cloudrepo</id>
<username>${prived_user_repo}</username>
<password>${prived_password_repo}</password>
</server>
</servers>
</settings>
Add those variables on your bitbucket pipeline
Add to your bitbucket-pipelines.yml the maven step including the setting.xml
image: maven:3.6.1
pipelines:
default:
- step:
caches:
- maven
script:
- mvn -s settings.xml -B verify
This following works when an external repository is not the preferred approach.
Create a key pair in the repository which should consume the other dependency (the main project): https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/
Add the public key as access key to the projects which is the dependency (the dependency): https://confluence.atlassian.com/bitbucket/use-access-keys-294486051.html
Configure the build pipeline based on the maven Docker image (adjust to the latest version provided by Bit Bucket). Pay attention to the first step, which is not executed in parallel building the necessary dependency before the main project is built.
image: maven:3.6.3
pipelines:
default:
- step:
name: Build Local Dependencies
caches:
- maven
script:
- git clone git#bitbucket.org:<user>/<project>.git
- cd <project>
- mvn clean install
- cd ..
- parallel:
- step:
name: Build and Test
caches:
- maven
script:
- mvn -B verify --file pom.xml
after-script:
# Collect checkstyle results, if any, and convert to Bitbucket Code Insights.
- pipe: atlassian/checkstyle-report:0.3.0
- step:
name: Security Scan
script:
# Run a security scan for sensitive data.
# See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&category=security
- pipe: atlassian/git-secrets-scan:0.5.1
I fixed mine by using
mule.maven.plugin.version 3.8.3
setting the image in the pipeline to: image: maven:3.8.4-openjdk-8
I read in a different blog that jdk is the issue, moving from default maven image maven:3.8.4 to maven:3.8.4-openjdk-8, it fixed my issue.

Missing Paho dependency in IBM iot-java github Maven project

I've been using release version of this github IoT java client: https://github.com/ibm-messaging/iot-java
I'd like to build the source but when I import it into my Eclipse I get a missing dependency error for:
<dependency>
<groupId>org.eclipse.paho</groupId>
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
<version>1.0.3-SNAPSHOT</version>
</dependency>
I have tried the snapshot modification in settings.xml:
<profiles>
<profile>
<id>allow-snapshots</id>
<activation><activeByDefault>true</activeByDefault></activation>
<repositories>
<repository>
<id>snapshots-repo</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<releases><enabled>false</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
</profile>
</profiles>
But that won't solve the problem. Also, using this settings using Eclipse Maven settings.xml editor as linked from the dependency error message won't make the dependency be found. (BTW, I can't use Paho 1.0.2)
Also, I have seen that in bottom of pom.xml of the project it references RELEASE, not SNAPSHOT, and tried also changing it.
May this is because you are using
https://repo.eclipse.org/content/repositories/paho-releases/
not
https://repo.eclipse.org/content/repositories/paho-snapshots
so Please use this repository instead of yours
<repositories>
<!-- Dependency of the Paho mqqt snapshot is here -->
<repository>
<id>Eclipse Paho Snapshots Repo</id>
<url>https://repo.eclipse.org/content/repositories/paho-snapshots/</url>
</repository>
</repositories>

Non-resolvable parent POM

I am trying to develop a custom connector for mule by following http://www.mulesoft.org/documentation/display/current/Creating+a+Connector+Project tutorial.
As shown in the tutorial, I am creating the project through command line by executing
mvn archetype:generate
-DarchetypeGroupId=org.mule.tools.devkit
-DarchetypeArtifactId=mule-devkit-archetype-cloud-connector
-DarchetypeVersion=3.4.3
-DgroupId=org.hello
-DartifactId=hello-connector
-Dversion=1.0-SNAPSHOT
-DmuleConnectorName=Hello
-Dpackage=org.hello
-DarchetypeRepository=http://repository.mulesoft.org/releases
After importing the project to mule studio I am getting following error in my pom.xml file near the parent tag.
Project build error: Non-resolvable parent POM:
Could not transfer artifact
org.mule.tools.devkit:mule-devkit-parent:pom:3.4.3 from/to
mulesoft-releases (http://repository.mulesoft.org/releases/):
connection timed out to
http://repository.mulesoft.org/releases/org/mule/tools/devkit/mule-devkit-parent/3.4.3/mule-devkit-parent-3.4.3.pom
and 'parent.relativePath' points at wrong local POM.
Here is my pom.xml file.
<?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>org.hello</groupId>
<artifactId>hello-connector</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>mule-module</packaging>
<name>Hello Connector</name>
<parent>
<groupId>org.mule.tools.devkit</groupId>
<artifactId>mule-devkit-parent</artifactId>
<version>3.4.3</version>
</parent>
<properties>
<junit.version>4.9</junit.version>
<mockito.version>1.8.2</mockito.version>
<jdk.version>1.7</jdk.version>
<category>Community</category>
<licensePath>LICENSE.md</licensePath>
<devkit.studio.package.skip>false</devkit.studio.package.skip>
</properties>
<scm>
<connection>scm:git:git://github.com:mulesoft/hello-connector.git</connection>
<developerConnection>scm:git:git#github.com:mulesoft/hello-connector.git</developerConnection>
<url>http://github.com/mulesoft/hello-connector</url>
</scm>
<repositories>
<repository>
<id>mulesoft-releases</id>
<name>MuleSoft Releases Repository</name>
<url>http://repository.mulesoft.org/releases/</url>
<layout>default</layout>
</repository>
<repository>
<id>mulesoft-snapshots</id>
<name>MuleSoft Snapshots Repository</name>
<url>http://repository.mulesoft.org/snapshots/</url>
<layout>default</layout>
</repository>
</repositories>
</project>
I have changed the jdk version to 1.7. it was 1.6 in the auto generated pom.
ignore any error in the heading, some formatting issue.
I have tried various solutions mentioned on here but am not able to resolve the issue.
There is probably a firewall between your computer and the internet. You either have to configure Java to use this proxy.
Or you must download the parent POM manually and install it yourself into the local m2 repo. See this question how to do that: How to manually install an artifact in Maven 2?
Since you only need to install a POM, you need to trick mvn install:install-file:
mvn install:install-file -Dfile=<path-to-pomfile> -Dpackaging=pom -DpomFile=<path-to-pomfile>
This command will just install the POM itself.

Could not find metadata in local

Locally on the machine i have an Artifactory installed with maven repositories, and i have a very simple .pom file for my project which points to it:
<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>MYGROUP</groupId>
<artifactId>NAME</artifactId>
<packaging>jar</packaging>
<version>VERSION</version>
<build>
<sourceDirectory>SRCFOLDER</sourceDirectory>
<testSourceDirectory>TESTFOLDER</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>local-artifactory</id>
<name>Artifactory</name>
<url>http://localhost:8081/artifactory/repo</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>local-artifactory-plugins</id>
<name>Artifactory Plugins</name>
<url>http://localhost:8081/artifactory/repo</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>MYGROUP</groupId>
<artifactId>DEPENDENCY1</artifactId>
<version>bla-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>MYGROUP</groupId>
<artifactId>DEPENDENCY2</artifactId>
<version>bla-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project>
So i have local-artifactory repository declared with the intention that it will reload everything every time. Also i have couple of dependencies which are SNAPSHOTS.
Now i'm using maven 3.0.5, and when i'm compiling it it works fine, but it's not refreshing snapshots at all. Never. Ever. Log file looks like this:
[DEBUG] Could not find metadata MYGROUP:DEPENDENCY1:bla-SNAPSHOT/maven-metadata.xml in local (/opt/myuser/.m2/repository)
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://localhost:8081/artifactory/repo
Downloading: http://localhost:8081/artifactory/repo/MYGROUP/DEPENDENCY1/bla-SNAPSHOT/maven-metadata.xml
Downloaded: http://localhost:8081/artifactory/repo/MYGROUP/DEPENDENCY1/bla-SNAPSHOT/maven-metadata.xml (314 B at 13.9 KB/sec)
[DEBUG] Writing resolution tracking file /opt/myuser/.m2/repository/MYGROUP/DEPENDENCY1/bla-SNAPSHOT/resolver-status.properties
[DEBUG] Could not find metadata MYGROUP:DEPENDENCY1:bla-SNAPSHOT/maven-metadata.xml in local (/opt/myuser/.m2/repository)
[DEBUG] Skipped remote update check for MYGROUP:DEPENDENCY1:bla-SNAPSHOT/maven-metadata.xml, already updated during this session.
So it constantly complains that it can't find local maven-medatada.xml and of course he's completely right - it's not there. And fails to do ANYTHING with it.
So i've tried to use dependency:purge-local-repository to purge local inventory and guess what? Apparently it can't purge it because there is no maven-metadata.xml in each artifact, what an amazing functionality!
Each .m2 artifact directory apart of .jar and .pom contains maven-metadata-local-artifactory.xml(with the correct copy of maven-metadata.xml from the artifactory, current), _mave.repositories and resolver-status.properties.
Maven is just out of the box, there is no configuration in .m2 and the configuration in the /conf folder is default without any single change.
UPDATE: I've just manually downloaded maven-metadata.xml from the artifactory and placed it as maven-metadata.xml inside .m2 for a dependency - no effect, it is still "missing" it. So i don't have any idea what it wants from me anymore. It just can't update dependencies because "already updated during this session". Well i don't know what it updated exactly, but apparently something else.
UPDATE2: Contents of maven-metadata.xml on the server:
<metadata>
<groupId>MYGROUP</groupId>
<artifactId>DEPENDENCY1</artifactId>
<version>bla-SNAPSHOT</version>
<versioning>
<snapshot>
<buildNumber>1</buildNumber>
</snapshot>
<lastUpdated>20130322155759</lastUpdated>
</versioning>
</metadata>
My maven complained that it can not find metadata in local, blah blah... and basically, what happened is that i managed to unplug my power cable in mid-maven-build and its metadata in the relevant local .m2 subdirectory got corrupted. I went in, deleted the artifacts in question from from their .m2 location and re-tried the build. All worked fine. Just wanted to leave this message for those that have a similar problem to mine, but stumbled upon your question.
From the maven metadata xml file it looks like you are using non-unique snapshot in your repository. Maven 3 does not supports non-unique, only snapshot pom file with TIMESTAMP-BUILDNUMBER instead of SNAPSHOT. Do you have:
http://localhost:8081/artifactory/repo/MYGROUP/DEPENDENCY1/bla-SNAPSHOT/DEPENDENCY1-bla-XXXXX-Y.pom
file?

Resources