Failure to find com.oracle.state-management:state-management-parent:pom:1.0.0-SNAPSHOT - oracle

I can't remember what I did to cause this problem. When I try to run mvn clean install, I get the following output:
mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building search Maven Webapp 1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.slf4j:slf4j-api:jar:12.1.2 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.895 s
[INFO] Finished at: 2014-05-29T21:55:34+02:00
[INFO] Final Memory: 6M/154M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project search: Could not resolve dependencies for project com.ws:search:war:1.0: Failed to collect dependencies at com.oracle.weblogic:weblogic-server-pom:pom:12.1.2-0-0 -> com.oracle.weblogic:com.oracle.state-management.e
xecutor-internal-api_12.1.2:jar:12.1.2: Failed to read artifact descriptor for com.oracle.weblogic:com.oracle.state-management.executor-internal-api_12.1.2:jar:12.1.2: Failure to find com.oracle.state-management:state-management-parent:pom:1.0.0-SNAPSHOT in http://10.68
.20.32:8081/artifactory/libs-snapshot was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
The attempt to find com.oracle.state-management.executor-internal-api_12.1.2:jar:12.1.2 (Note the version: 12.1.2) fails because it originates from the dependency com.oracle.state-management.executor-internal-api_12.1.2 (version 12.1.2 too) while this dependency's pom has the following portion:
<parent>
<artifactId>state-management-parent</artifactId>
<groupId>com.oracle.state-management</groupId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
What surprises me is that there is another version for this dependency (com.oracle.state-management.executor-internal-api_12.1.2) which is 12.1.2-0-0, I believe that this is the right version to refer to, not 12.1.2
What I think supports my assumption is that the output mentions that it failed to find sfl4j dependency with the version 12.1.2 !!
[WARNING] The POM for org.slf4j:slf4j-api:jar:12.1.2 is missing, no dependency information available
I refer to weblogic's dependency this way
<dependency>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-server-pom</artifactId>
<version>12.1.2-0-0</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
How can I fix that ?

For some unearthly reason, weblogic's dependency
<dependency>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic-server-pom</artifactId>
<version>12.1.2-0-0</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
had the following version for it's dependencies
<dependency>
<groupId>com.oracle.weblogic</groupId>
<artifactId>weblogic</artifactId>
<version>[12.1.2,12.1.3)</version>
</dependency>
To resolve this, I replaced all [12.1.2,12.1.3) occurrences with 12.1.2-0-0 and now I can install my project again.
I would really appreciate it if someone tells me why was the POM generated this way ?!

Related

google cloud shell not able to get maven dependency for spring-cloud-gcp-starter-secretmanager

I am trying to add secrets to spring boot app.
so added to pom.xml
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-secretmanager</artifactId>
<version>3.4.0</version>
</dependency>
Maven version is
xyz_pqr#cloudshell:~/projects/spring-petclinic (xyzprj)$ ./mvnw --version
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f) Maven home:
/home/xyz_pqr/.m2/wrapper/dists/apache-maven-3.8.2-bin/1um3pu5poco57pibs3g92d6vrf/apache-maven-3.8.2
Java version: 17.0.4, vendor: Debian, runtime:
/usr/lib/jvm/java-17-openjdk-amd64 Default locale: en_US, platform
encoding: ANSI_X3.4-1968 OS name: "linux", version: "5.15.65+", arch:
"amd64", family: "unix" xyz_pqr#cloudshell:~/projects/spring-petclinic
(xyzprj)$
It gives the issue
Failed to execute goal on project spring-petclinic: Could not resolve dependencies for project org.springframework.samples:spring-petclinic:jar:3.0.0-SNAPSHOT: Could not find artifact org.springframework.cloud:spring-cloud-gcp-starter-secretmanager:jar:3.4.0 in spring-snapshots (https://repo.spring.io/snapshot)
The complete error is
[INFO] ------------< org.springframework.samples:spring-petclinic
------------ [INFO] Building petclinic 3.0.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- Downloading from spring-snapshots:
https://repo.spring.io/snapshot/org/springframework/cloud/spring-cloud-gcp-starter-secretmanager/3.4.0/spring-cloud-gcp-starter-secretmanager-3.4.0.pom
Downloading from spring-milestones:
https://repo.spring.io/milestone/org/springframework/cloud/spring-cloud-gcp-starter-secretmanager/3.4.0/spring-cloud-gcp-starter-secretmanager-3.4.0.pom
Downloading from central:
https://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-gcp-starter-secretmanager/3.4.0/spring-cloud-gcp-starter-secretmanager-3.4.0.pom
[WARNING] The POM for
org.springframework.cloud:spring-cloud-gcp-starter-secretmanager:jar:3.4.0
is missing, no dependency information available Downloading from
spring-snapshots:
https://repo.spring.io/snapshot/org/springframework/cloud/spring-cloud-gcp-starter-secretmanager/3.4.0/spring-cloud-gcp-starter-secretmanager-3.4.0.jar
Downloading from spring-milestones:
https://repo.spring.io/milestone/org/springframework/cloud/spring-cloud-gcp-starter-secretmanager/3.4.0/spring-cloud-gcp-starter-secretmanager-3.4.0.jar
Downloading from central:
https://repo.maven.apache.org/maven2/org/springframework/cloud/spring-cloud-gcp-starter-secretmanager/3.4.0/spring-cloud-gcp-starter-secretmanager-3.4.0.jar
[INFO]
------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
------------------------------------------------------------------------ [INFO] Total time: 3.274 s [INFO] Finished at: 2023-01-14T23:34:50Z
[INFO]
------------------------------------------------------------------------ [ERROR] Failed to execute goal on project spring-petclinic: Could not
resolve dependencies for project
org.springframework.samples:spring-petclinic:jar:3.0.0-SNAPSHOT: Could
not find artifact
org.springframework.cloud:spring-cloud-gcp-starter-secretmanager:jar:3.4.0
in spring-snapshots (https://repo.spring.io/snapshot) -> [Help 1]
[ERROR] [ERROR] To see the full stack trace of the errors, re-run
Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to
enable full debug logging. [ERROR] [ERROR] For more information about
the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
xyz_pqr#cloudshell:~/projects/spring-petclinic (xyzprj)$
The issue is with document at Secret Management
it says
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-secretmanager</artifactId>
</dependency>
but should be
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-secretmanager</artifactId>
</dependency>
so replace org.springframework.cloud with com.google.cloud

maven dependency versionioning issue

I am trying to add the dependency as below to use the version mentioned or the latest.I am expecting maven to take the dependencies with version >= 0.0.1 but maven is failing to resolve the dependencies.If i mention the exact version the dependencies are getting downloaded.
Iam using maven 3.5
<dependency>
<groupId>com.company.esb.fuse</groupId>
<artifactId>common</artifactId>
<version>[0.0.1,)</version>
<scope>provided</scope>
</dependency>
maven logs:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building source out Write 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.401 s
[INFO] Finished at: 2018-01-22T17:26:21+01:00
[INFO] Final Memory: 14M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project source: Could not resolve dependencies for project com.company.esb.source.out:source:war:0.0.1-SNAPSHOT: Failed to collect dependencies at com.company.esb.fuse:common:jar:[0.0.1,): No versions available for com.company.esb.fuse:common:jar:[0.0.1,) within specified range -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Above details are not sufficient to determine the exact problem. But according to your maven logs,
No versions available for com.company.esb.fuse:common:jar:[0.0.1,)
Note that it says com.company, not com.compant as you typed in this question.
check your pom.xml first and put correct groupId.
If you are still getting the same error, check your local .m2 folder and confirm that you have at least one artifact with a version which is in the declared range.
UPDATE : the error may be in the maven-metadata file. check maven-metadata-local.xml file placed inside .m2/repository/com/company/esb/fuse/common. All versions should be there under <versions> tag.

sonar:sonar not working in jenkins maven build

I have a jenkins build, how should call the sonar plugin. But every time i get the error:
Downloaded: http://xxxx:8081/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar (165 KB at 20577.1 KB/sec)
[INFO] SonarQube version: 5.6.1
Downloading: http://talas:8081/nexus/content/groups/public/org/codehaus/sonar/sonar-maven3-plugin/5.6.1/sonar-maven3-plugin-5.6.1.pom
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/sonar/sonar-maven3-plugin/5.6.1/sonar-maven3-plugin-5.6.1.pom
[WARNING] The POM for org.codehaus.sonar:sonar-maven3-plugin:jar:5.6.1 is missing, no dependency information available
Downloading: http://xxxx:8081/nexus/content/groups/public/org/codehaus/sonar/sonar-maven3-plugin/5.6.1/sonar-maven3-plugin-5.6.1.jar
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/sonar/sonar-maven3-plugin/5.6.1/sonar-maven3-plugin-5.6.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 07:53 min
[INFO] Finished at: 2016-09-13T12:42:59+02:00
[INFO] Final Memory: 58M/1705M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.2:sonar (default-cli) on project Core: Can not execute SonarQube analysis: Plugin org.codehaus.sonar:sonar-maven3-plugin:5.6.1 or one of its dependencies could not be resolved: Could not find artifact org.codehaus.sonar:sonar-maven3-plugin:jar:5.6.1 in server0001 (http://xxx:8081/nexus/content/groups/public/) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
in my pom.xml i use the dependency:
<plugin>
<groupId>org.codehaus.sonar</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>5.1</version>
</plugin>
I do not understand, why maven uses an other plugin than this which is included as dependency.
The Jenkins Job calls the following Targets:
clean
compile
sonar:sonar
-Dsonar.jdbc.url=jdbc:oracle:thin:#oracle11db:1521/orcl
-Dsonar.host.url=http://192.168.0.100:9000
I use Jenkins Version 2.21.
SonarQube scanner 2.6.1 is configured in global configuration
I also tried to call
org.codehaus.mojo:sonar-maven-plugin:2.3:sonar
directly. but it needs java8 and my Project was build with Java7
have you tried using the plugin from org.codehaus.mojo?
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>2.3</version>
</plugin>
Source:
http://docs.sonarqube.org/display/HOME/Frequently+Asked+Questions

Dependencies are resolved only on my mac machine and not on the Windows one for the same project

I have a couple of dependencies that resolve when I use IntelliJ Idea with my mac machine but for some strange reason they cannot be resolved when I am running the same project with IntelliJ Idea again on my windows machine.
Here are the two dependencies:
<dependencies>
<dependency>
<groupId>com.opengamma.platform</groupId>
<artifactId>og-client</artifactId>
<version>2.1.0</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.opengamma.platform</groupId>
<artifactId>og-server</artifactId>
<version>2.1.0</version>
<type>pom</type>
</dependency>
</dependencies>
I even tried to run mvn clean install on the project directory on the windows machine and the build stops with this error:
[WARNING] The POM for com.opengamma.platform:og-client:pom:2.1.0 is missing, no
dependency information available
Downloading: http://repo.maven.apache.org/maven2/com/opengamma/platform/og-serve
r/2.1.0/og-server-2.1.0.pom
[WARNING] The POM for com.opengamma.platform:og-server:pom:2.1.0 is missing, no
dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.611 s
[INFO] Finished at: 2014-07-26T22:03:08+02:00
[INFO] Final Memory: 8M/115M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project Project3: Could not resolve dependenci
es for project com.skiabox.apps:Project3:jar:1.0-SNAPSHOT: The following artifac
ts could not be resolved: com.opengamma.platform:og-client:pom:2.1.0, com.openga
mma.platform:og-server:pom:2.1.0: Failure to find com.opengamma.platform:og-clie
nt:pom:2.1.0 in http://repo.maven.apache.org/maven2 was cached in the local repo
sitory, resolution will not be reattempted until the update interval of central
has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso
lutionException
It appears to me that you are looking for the OG dependencies in
http://repo.maven.apache.org/maven2
However, OpenGamma currently does not put their dependencies there. Instead, try looking here:
http://maven.opengamma.com/nexus/content/groups/public/
I added this to my top-level pom.xml
<repositories>
<repository>
<id>maven-opengamma</id>
<name>Public online OpenGamma repository</name>
<url>http://maven.opengamma.com/nexus/content/groups/public/</url>
</repository>
</repositories>
Hope this helps.
Eric

maven can't find archetype in my repository

I'm trying to create my own maven archetype. For now, I'm going through this tutorial [here][1] without success. I'm able to build the archetype project okay, but when I try to generate a project from that archetype I get the error below. Maven can't seem to find the archetype I created. Can any one spot my problem? Is there some other recomended tutorial for createing a maven archetype? Thanks.
Maven version 3.0.3
Build Error:
AR3Y35-LAPTOP:EclipseWS Albert$ mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeGroupId=com.myarch.archetypes -DarchetypeArtifactId=component-archetype -DinteractiveMode=false
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> maven-archetype-plugin:2.0:generate (default-cli) # standalone-pom >>>
[INFO]
[INFO] <<< maven-archetype-plugin:2.0:generate (default-cli) # standalone-pom <<<
[INFO]
[INFO] --- maven-archetype-plugin:2.0:generate (default-cli) # standalone-pom ---
[INFO] Generating project in Batch mode
[WARNING] Specified archetype not found.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.389s
[INFO] Finished at: Fri Sep 23 02:33:55 PDT 2011
[INFO] Final Memory: 7M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.0:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.myarch.archetypes:component-archetype:1.0) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
AR3Y35-LAPTOP:EclipseWS Albert$
prototype pom.xml
<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>
<parent>
<groupId>com.myarch.templates</groupId>
<artifactId>component-template</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<name>${group}</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
archetype.xml
<archetype xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype/1.0.0 http://maven.apache.org/xsd/archetype-1.0.0.xsd">
<id>component-archetype</id>
<sources>
<source>src/main/java/App.java</source>
</sources>
<testSources>
<source>src/test/java/AppTest.java</source>
</testSources>
<allowPartial>true</allowPartial>
</archetype>
For using a customized archetype, there has to be an entry made in the archetype-catalog.xml file which resides in the .m2/repository/archetype-catalog.xml in your home directory. For doing so, you need to install the archetype by using the following command:
mvn install archetype:update-local-catalog
After that, you will be able to use your new archetype while creating a new Maven project with the mvn archetype:generate command.
I needed to include -DarchetypeVersion={my.archetype.version} in the mvn archetpe:generate command
In my case the problem was that:
- update-local-catalog goal created file ~/.m2/repository/archetype-catalog.xml
- generate goal searches for file ~/.m2/archetype-catalog.xml
copying the file was a workaround. Not sure how I've fixed this. Sure now with maven 3.5.4 everything is ok.
It's telling you :
[WARNING] Specified archetype not found.
Did you install your archetype with
mvn install
before trying to use it ?
Executing the mvn install resolves the problem, after executing that from idea the problem got resolved.
From my own experience, You have to search for your groupId is accessible in the below link or not
http://repo.maven.apache.org/maven2/archetype-catalog.xml
I found out I had typo error then I've got error.

Resources