Cannot download & install old OpenDayLight versions - maven

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.

Related

OpenDaylight netconf build issue

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

Failure to find external:authapi:jar:2005-08-12

Compile openam checked out from svn, and get an error:
Failed to execute goal on project openam-auth-securid: Could not resolve dependencies for project org.forgerock.openam:openam-auth-securid:jar:13.0.0-SNAPSHOT: Failure to find external:authapi:jar:2005-08-12 in http://maven.forgerock.org/repo/releases was cached in the local repository, resolution will not be reattempted until the update interval of forgerock-staging-repo has elapsed or updates are forced -> [Help 1]
Is it a network problem? Did someone meet it before?
The authapi library has been removed from the Maven repository, as there were redistribution issues. In order to build older OpenAM releases you will need to download older OpenAM releases and install the authapi library manually to your local Maven repository.

Jenkins could not resolve dependencies

I have a problem with jenkins version 1.500. i am trying to build a project with a dependency to another project of mine.
The error is:
[ERROR] Failed to execute goal on project projectname: Could not resolve dependencies for project projectname:jar:1.0.0: Failure to find reference-project:jar:1.0.0 in 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 -> [Help 1]
If I build this project via console and Maven, the whole projects build succeed.
I checked the dependency jar file in the repository, it is there at the right place.
Does Maven have a own repository or did I miss something?
But under the Jenkins system settings, I chose "Default(~/.m2/repository)" and I did not check the checkbox "use own repository" at the project settings. Any ideas?
UPDATE
I created a extra job for the dependency in jenkins and called the Maven goal install and then everything works fine. Before this step I installed the dependency via Console and mvn install.
Why is there a difference? (i tried the given solution with delete and reinstall, but this did not help)
Simple solution delete the folder from the ~/.m2/repository which represents the artifact you've written about. ~/.m2/repository/${groupId}/... and rebuild. That happens sometimes if you have some problems during download of the artifact etc.
I too have similar problem and tried deleting the folder in ~/.m2/repository/
still its now downloading dependencies from remote repository location to local

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

Build WSO2 Governance Registry from source coce

i would like to build Governance Registry from source distribution.
I followed the instructions preented in the following link http://wso2.org/project/registry/4.1.1/docs/installation_guide.html,
especially the paragraph "Building WSO2 Governance Registry Using the Source Distribution".
I launched the maven comman "mvn clean install" that start to download dependencies but after some minutes the build process stop with an error.
Here is an example of the error:
[ERROR] Non-resolvable parent POM: Failure to find org.wso2.carbon:governance:
pom:3.2.0 in 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 and 'parent.relativePath' points at wrong local
POM # line 22, column 13 -> [Help 2]
Here is my configuration:
OS: Windows 7 64 bit
Maven: 3.0.4
JDK: 1.6.0.22
WSO2 Gov. Registry: 4.0.0
Somebody know why the installation instructions do not work?
Thanks in advance
Please use maven2 to build GReg 4.1.1 from the branch.
Use maven3, if you are build the carbon from trunk.
Hope this helps.
Thanks
Thilini

Resources