soa 12c Maven mvn compile issue - maven

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

Related

Maven Build Failure releated to com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin

I am facing an issue during the Maven build. The issue on my
terminal is: [ERROR] Failed to execute goal
com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin:2.12.0:usage-analytics
(default) on project demo-generator-application: Execution default
of goal
com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin:2.12.0:usage-analytics
failed: Plugin
com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin:2.12.0 or one of its
dependencies could not be resolved: Failed to collect dependencies
at com.sap.cloud.s4hana.plugins:s4sdk-maven-plugin:jar:2.12.0 ->
com.sap.cloud.s4hana.plugins:usage-analytics:jar:2.12.1-M1: Failed
to read artifact descriptor for
com.sap.cloud.s4hana.plugins:usage-analytics:jar:2.12.1-M1: Failure
to find com.sap.cloud.s4hana:sdk-modules-bom:pom:2.12.1-M1 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 1]
The maven project I used can be found here:
https://github.com/SAP/cloud-s4-sdk-examples/blob/master/VDMGenerator/application
The document can be found:
https://blogs.sap.com/2018/04/30/deep-dive-10-with-sap-s4hana-cloud-sdk-generating-java-vdm-for-s4hana-custom-odata-service/
Please try to run mvn clean install -U to force an update of dependencies.

Error: Failed to execute goal on project xxxx inside jenkins build

when i run the build in jenkins i got below error when i am trying to run in local its building fine.
[ERROR] Failed to execute goal on project xxx: Could not resolve dependencies for project xxx:xxx-bin:pom:10-2.1.0-test: The following artifacts could not be resolved: xxx-alerts:alerts-loader:jar:xxx:3-95210ce313-2.1.0-test, xxx-alerts:alerts-loader:zip:resources:3-95210ce313-2.1.0-test: Failure to find xxx-alerts:alerts-loader:jar:deps:3-95210ce313-2.1.0-test in http://xxx:8080/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]
[ERROR]
Delete ~.m2\repository and this should work for you.
Also, make sure u run the mvn command with clean before install

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

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

maven error "The POM for ... is missing" - right after maven downloads the pom

So maven downloads the pom then declares that it is missing. Then it proceeds to download the jars.
Heres the log
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for http://bits.netbeans.org/maven2/
Downloading: http://bits.netbeans.org/maven2/org/netbeans/api/org-openide-text/RELEASE71/org-openide-text-RELEASE71.pom
Downloaded: http://bits.netbeans.org/maven2/org/netbeans/api/org-openide-text/RELEASE71/org-openide-text-RELEASE71.pom (2 KB at 3.5 KB/sec)
[DEBUG] Reading resolution tracking file /home/homeu1/.m2/repository/org/netbeans/api/org-openide-text/RELEASE71/org-openide-text-RELEASE71.pom.lastUpdated
[DEBUG] Writing resolution tracking file /home/homeu1/.m2/repository/org/netbeans/api/org-openide-text/RELEASE71/org-openide-text-RELEASE71.pom.lastUpdated
[WARNING] The POM for org-openide-text:org-netbeans-api:jar:RELEASE71 is missing, no dependency information available
...
then the end error
[ERROR] Failed to execute goal on project jalopy2-netbeans: Could not resolve dependencies for project com.notzippy:jalopy2-netbeans:nbm:0.0.1-SNAPSHOT: Failure to find org-openide-text:org-netbeans-api:jar:RELEASE71 in http://bits.netbeans.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of netbeans has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project jalopy2-netbeans: Could not resolve dependencies for project com.notzippy:jalopy2-netbeans:nbm:0.0.1-SNAPSHOT: Failure to find org-openide-text:org-netbeans-api:jar:RELEASE71 in http://bits.netbeans.org/maven2/ was cached in the local repository, resolution will not be reattempted until the update interval of netbeans has elapsed or updates are forced
I dont get it, if I look into mavens repository the pom and jar are downloaded, the sha1 is fine. Every other dependency seems to resolve fine and if I try to remove that dependency I get.
Project uses classes from transitive module org.netbeans.api:org-openide-text:jar:RELEASE71 which will not be accessible at runtime.
Ideas or thoughts would be appreciated.
Had artifactId and groupId swapped. D'oh

Resources