OpenDaylight netconf build issue - maven

I've tried to build the netconf module following the instructions in the "Getting Started" sections of the ODL wiki.
Possible answers I've found:
Use correct 'settings.xml'.
Try to use different maven commands like:
mvn -Pq clean install;
mvn install -DskipTests
Unfortunately, all these variants didn't work for me.
So, I installed all necessary features like maven, got correct 'settings.xml', pulled netconf project from git and tried to build it using mvn clean install.
After that I got a lot of errors:
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.opendaylight.netconf:netconf-auth:1.4.2-SNAPSHOT: Failure to find org.opendaylight.odlparent:odlparent-bundle:pom:3.1.0 in https://nexus.opendaylight.org/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of opendaylight-mirror has elapsed or updates are forced and 'parent.relativePath' points at no local POM # line 11, column 13
...
[ERROR] The project org.opendaylight.netconf:netconf-auth:1.4.2-SNAPSHOT (/home/ssavchen/netconf/netconf/netconf-auth/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.opendaylight.netconf:netconf-auth:1.4.2-SNAPSHOT: Failure to find org.opendaylight.odlparent:odlparent-bundle:pom:3.1.0 in https://nexus.opendaylight.org/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of opendaylight-mirror has elapsed or updates are forced and 'parent.relativePath' points at no local POM # line 11, column 13 -> [Help 2]
org.apache.maven.model.resolution.UnresolvableModelException: Failure to find org.opendaylight.odlparent:odlparent-bundle:pom:3.1.0 in https://nexus.opendaylight.org/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of opendaylight-mirror has elapsed or updates are forced
...
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to find org.opendaylight.odlparent:odlparent-bundle:pom:3.1.0 in https://nexus.opendaylight.org/content/repositories/public/ was cached in the local repository, resolution will not be reattempted until the update interval of opendaylight-mirror has elapsed or updates are forced
I've got that the issue is in 'odlparent-bundle', but I have no idea what to do with it. Does anyone have any ideas?

Your Maven repository still “remembers” that it failed to download the OpenDaylight artifacts which the build needs. To fix that, you can force updates with -U:
mvn -U clean install
You also need the full JDK rather than the JRE to build, so install that:
sudo apt install openjdk-8-jdk

Related

soa 12c Maven mvn compile issue

I had created soa project with below archetype
mvn archetype:generate -DarchetypeGroupId=com.oracle.soa.archetype -DarchetypeArtifactId=oracle-soa-application -DarchetypeVersion=12.2.1-3-0 -DgroupId=com.abcd -DartifactId=my-soa-app -Dversion=1.0 -DprojectName=my-project
I also had created empty bpel and tried to compile ...
Error :: The project com.bh.stc:my-project:1.0 (C:\Oracle\Middleware_Devops\Oracle_Home\Devops_Jdev\my-soa-app\my-project\pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for com.oracle.soa:sar-common:12.2.1-3-0: Failure to find com.oracle.maven:oracle-common:pom:12.2.1-3-0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced # com.oracle.soa:sar-common:12.2.1-3-0, C:\Users\Lenovo\.m2\repository\com\oracle\soa\sar-common\12.2.1-3-0\sar-common-12.2.1-3-0.pom, line 8, column 11 -> [Help 2]
I fixed this issue is oracle-maven-sync:12.2.1-3-0 does not exists and i have updated the same with below command and it working now
mvn com.oracle.maven:oracle-maven-sync:12.2.1-3-0:push -DoracleHome=$Oracle_Home overwriteParent=true

How to force Jenkins' Maven to update Maven dependencies after they had been cached with errors

I'm having a problem where I tried to run a Maven job on Jenkins, but during the execution, the firewall was blocking access to the mvn repositories; this caused an error when Maven was updating the dependencies, and it cached those errors.
Now, even after the firewall issue was resolved, the job keeps displaying this error:
[FATAL] Non-resolvable parent POM: Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.0.2.RELEASE from http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.2.RELEASE from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org: unknown error and 'parent.relativePath' points at no local POM # line 14, column 10
I do know that if I was using the command line, it would be possible to use mvn clean install -U to force the update, but how would I do that on Jenkins?
As per Jens' suggestion, adding -U to the to the goals/options field solves the issue.

Cannot download & install old OpenDayLight versions

I need to download an old ODL version for testing (Helium release in this case), but when I tried to build ODL with maven, it failed to download opendaylight.odlparent:odlparent:pom:1.4.7-SNAPSHOT from nexus repository (it seems old versions <3.0.4 were purged) and stopped.
Where can I download Helium ODL and run successfully?
Step to reproduce error:
git clone -b stable/helium https://github.com/opendaylight/controller.git
cd controller/
mvn clean install
[ERROR] The project org.opendaylight.controller:opendaylight-karaf-resources:[unknown-version] (/[...]/controller/opendaylight/distribution/opendaylight-karaf-resources/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.opendaylight.controller:commons.opendaylight:1.4.7-SNAPSHOT: Failure to find org.opendaylight.odlparent:odlparent:pom:1.4.7-SNAPSHOT in http://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/ was cached in the local repository, resolution will not be reattempted until the update interval of opendaylight-snapshot has elapsed or updates are forced and 'parent.relativePath' points at no local POM # org.opendaylight.controller:commons.opendaylight:1.4.7-SNAPSHOT, /[...]/controller/opendaylight/commons/opendaylight/pom.xml, line 4, column 11 -> [Help 2]
EDIT: This answer said SNAPSHOT releases had short lives, so for older versions one need to build all dependencies himself, how can I do it?
You need to do "git clone -b stable/helium ..." and build every project that the controller project depends on. For Helium I believe it's only odlparent and yangtools.

Maven build is not working for STS spring-tool-suite-3.7.2.RELEASE-e4.5.1-win32.zip

I just created a simple test maven quick start project in my Windows 7 PC.
getting
CoreException: Could not get the value for parameter compilerId for
plugin execution default-compile: PluginResolutionException: Plugin
org.apache.maven.plugins:maven-compiler-plugin:3.1 or one of its
dependencies could not be resolved: Failure to transfer
org.apache.maven:maven-plugin-api:jar:2.0.9 from
https://repo.maven.apache.org/maven2 was cached in the local
repository, resolution will not be reattempted until the update
interval of central has elapsed or updates are forced. Original error:
Could not transfer artifact
org.apache.maven:maven-plugin-api:jar:2.0.9 from/to central
(https://repo.maven.apache.org/maven2): connect timed out
I have mapped manual maven home from local machine thought embedded version has the problem
mvn clean install -U
This will make a clean install and update the dependencies

Update interval of Maven Central Repo

Having zero experience with Maven, I am running a mvn clean install on a project and this is the error I get:
[ERROR] Failed to execute goal on project dnasequencing.CompaNY.com: Could not resolve dependencies for project com.CompaNY.dnasequencing:dnasequencing.
CompaNY.com:war:1.0-SNAPSHOT: The following artifacts could not be resolved: dsr-kepler:dsr-kepler:jar:0.0.1-SNAPSHOT, dsr-parser:dsr-parser:jar:0.0.1-
SNAPSHOT: Failure to find dsr-kepler:dsr-kepler:jar:0.0.1-SNAPSHOT in http://repo1.maven.org/maven2/ was cached in the local repository, resolution
will not be reattempted until the update interval of Maven_Central_Repo has elapsed or updates are forced -> [Help 1]
Based on these error messages, what is an startingpoint I should take a look for finding what is going wrong?
You can force Maven to update snapshots with the -U flag.
As far as what is going wrong, you can always check out the actual Maven website with your browser and see if the dependency actually exists.
http://search.maven.org/
If the dependency is not hosted in Maven central, then it seems it is a local dependency that you have to install in your local cache (run mvn clean install from that project).

Resources