Build WSO2 Governance Registry from source coce - maven

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

Related

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 : was cached in the local repository

I am trying to build the multi module maven project but getting the error as below.
Unresolveable build extension: Plugin com.day.jcr.vault:content-package-maven-plugin:0.0.24 or one of its dependencies could not be resolved: Failure to find com.day.jcr.vault:content-package-maven-plugin:jar:0.0.24 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 -> [Help 2]
Unknown packaging: content-package # com.prj.prj.aem:aem-parent.ui.apps:[unknown-version], C:\latest\prj\ui.apps\pom.xml, line 34, column 16
I have the jar file content-package-maven-plugin-0.0.24.jar at C:\Users\user.m2\repository\com\day\jcr\vault\content-package-maven-plugin\0.0.24 location
You can do this.
mvn clean package -DskipTests -U -e
Notice that -U means to reload the jars from maven, that ignore the cache jars in your local file system.
Do you have the Adobe profile in your settings?
https://docs.adobe.com/docs/en/aem/6-2/develop/dev-tools/vlt-mavenplugin.html
(section "Obtaining the Content Package Maven Plugin")
I had the same issue as you, and resolved it by setting the activeByDefault to true in .m2/settings.xml
I faced a similar issue while using IntelliJ IDEA. Problem was that Idea has set a different maven home as I need to.
When you have this problem also with Idea, check your Settings -> Maven -> Maven home directory setting, if it is set as you need to.

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.

Building Valkyrie RCP

I'm trying to build Valkyrie RCP from the 1.2 release. According to their instructions, it should be easy: "Just clone the repository, and then use a mvn install command."
However, when I try the command, I get the following error:
[ERROR] Failed to execute goal on project valkyrie-rcp-core: Could not
resolve dependencies for project dk.navicon:valkyrie-rcp-core:jar:1.2:
Failure to find com.l2fprod:l2fprod-common-all:jar:7.3 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]
I can see that l2fprod-common-all-7.3.jar is included in the dependencies folder but Maven seems to be unaware of that. How should I resolve this problem?
Actually, it's now possible to build it using Gradle, which doesn't have the dependency issues . Also, there's a dependencies folder with batch scripts to install the missing dependencies if you still wish to use Maven.
As of 2.0 Valkyrie RCP will use Gradle.
The problem is that the given version of that dependency does not exist in Maven Central only older versions.
They would probably suggest you do a mvn install first on the file in the dependencies folder, then.
Try go down in deps and do a
mvn install -DgroupId=com.l2fprod -DartifactId=l2fprod-common-all -Dversion=7.3 -Dpackaging=jar -Dfile=l2fprod-common-all-7.3.jar
That would get you past that point locally.
After that re-execute your project build with a -Uoption.
Long term is to find the artifact and include it in a repository that is searchable from your maven settings or project profile.

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