OpenAM With Maven - java

I am trying to download OpenAM through Maven dependencies as stated on this website:
https://wikis.forgerock.org/confluence/display/openam/Using+Maven+and+OpenAM
Below is Maven pom.xml file:
<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/xsd/maven 4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>OpenAMExample</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>OpenAMExample</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<openam.version>10.1.0-Xpress</openam.version>
</properties>
<dependencies>
<dependency>
<groupId>org.forgerock.openam</groupId>
<artifactId>openam-core</artifactId>
<version>${openam.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.forgerock.openam</groupId>
<artifactId>openam-shared</artifactId>
<version>${openam.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.forgerock.openam</groupId>
<artifactId>openam-federation-library</artifactId>
<version>${openam.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.forgerock.openam</groupId>
<artifactId>openam-clientsdk</artifactId>
<version>${openam.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>forgerock</id>
<url>http://maven.forgerock.org/repo/releases</url>
</repository>
</repositories>
</project>
I cannot download this, there seems to be problems. It mentions missing artifact for each artifact within OpenAM.
Having researched on Google no one seems to have any problems.
Any ideas why?
EDIT
BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.305s
[INFO] Finished at: Mon Aug 05 16:01:44 BST 2013
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project OpenAMExample: Could not resolve dependencies for project com.webchannel.example:OpenAMExample:jar:0.0.1-SNAPSHOT: The following artifacts could not be resolved: org.forgerock.openam:openam-core:jar:10.1.0-Xpress, org.forgerock.openam:openam-shared:jar:10.1.0-Xpress, org.forgerock.openam:openam-federation-library:jar:10.1.0-Xpress, org.forgerock.openam:openam-clientsdk:jar:10.1.0-Xpress: Failure to find org.forgerock.openam:openam-core:jar:10.1.0-Xpress in http://nexus.example.private:8081/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]
[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
EDIT 2:
[INFO] ------------------------------------------------------------------------
[INFO] Building OpenAMExample 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.sun.web.ui:cc_zh_HK:jar:2008-08-08 is missing, no dependency information available
Downloading: http://nexus.example.private:8081/content/groups/public/com/sun/web/ui/cc_zh_TW/2008-08-08/cc_zh_TW-2008-08-08.pom
[WARNING] The POM for com.sun.web.ui:cc_zh_TW:jar:2008-08-08 is missing, no dependency information available
Downloading: http://nexus.example.private:8081/content/groups/public/external/esapiport/2009-26-07/esapiport-2009-26-07.pom
[WARNING] The POM for external:esapiport:jar:2009-26-07 is missing, no dependency information available
Downloading: http://nexus.example.private:8081/content/groups/public/external/sleepycat-je/2011-04-07/sleepycat-je-2011-04-07.pom
[WARNING] The POM for external:webservices-rt:jar:2009-29-07 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42.038s
[INFO] Finished at: Mon Aug 05 16:31:52 BST 2013
[INFO] Final Memory: 5M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project OpenAMExample: Could not resolve dependencies for project com.webchannel.example:OpenAMExample:jar:0.0.1-SNAPSHOT: Failed to collect dependencies for [org.forgerock.openam:openam-core:jar:10.1.0-Xpress (compile), org.forgerock.openam:openam-shared:jar:10.1.0-Xpress (compile), org.forgerock.openam:openam-federation-library:jar:10.1.0-Xpress (compile), org.forgerock.openam:openam-clientsdk:jar:10.1.0-Xpress (compile), junit:junit:jar:3.8.1 (test)]: Failed to read artifact descriptor for org.forgerock.opendj:opendj-server:jar:2.4.6: Could not find artifact org.forgerock.opendj:opendj-project:pom:3.0.0-SNAPSHOT in nexus (http://nexus.example.private:8081/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/DependencyResolutionException

it says was cached in the local repository
Go to $HOME/.m2/repository/org/ and remove forgerock directory and try again
you might had a connection error or something like that
another way is to try right click > maven > maven update if you use m2e and check force updating release

the dependency
of OpenSSOclientsdk, at the moment, is not found in any maven repository. Therefore,
you must include in your local repository:
{dir maven repo}/com/sun/identity/OpenSSOclientsdk/8.0/OpenSSOclientsdk-8.0.jar.
Then, you can execute
$ mvn install
And the provider will be located in
{dir maven repo}/com/sun/identity/provider/springsecurity/0.1/springsecurity-0.1.jar
to be used in maven projects. (See more details in http://maven.apache.org)

Related

i didn't find "import org.springframework.jbdc.core.JsbcTemplate" [duplicate]

This question already has answers here:
Problems using Maven and SSL behind proxy
(25 answers)
Closed 4 years ago.
i was searching for an hour to find a solution to my problem and i i'm using maven to pom.xml to find the library of this import org.springframework.jdbc.core.JdbcTemplate
my pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.sample</groupId>
<artifactId>test1</artifactId>
<name> Spring boots test</name>
<version>0.0.2-SNAPSHOT</version>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>2.0.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>3.2.1.RELEASE</version>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<java.version>1.8</java.version>
</properties>
</project>
the result was :-
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< org.sample:test1 >--------------------------
[INFO] Building Spring boots test 0.0.2-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/spring-jdbc/3.2.1.RELEASE/spring-jdbc-3.2.1.RELEASE.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.626 s
[INFO] Finished at: 2018-10-21T08:41:16+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project test1: Could not resolve dependencies for project org.sample:test1:jar:0.0.2-SNAPSHOT: Failed to collect dependencies at org.springframework:spring-jdbc:jar:3.2.1.RELEASE: Failed to read artifact descriptor for org.springframework:spring-jdbc:jar:3.2.1.RELEASE: Could not transfer artifact org.springframework:spring-jdbc:pom:3.2.1.RELEASE from/to central (https://repo.maven.apache.org/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [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
Mate, There are multiple things that you can do.
Check the maven repository for the jar of spring-boot-starter under org > springframework > boot
Sometimes the download might be interrupted or may be due to failure it would not have downloaded correctly, in that case delete the spring-boot-starter under org > springframework > boot and build again
You can clean and verify the maven project again (I would suggest to do this from the console, to do this go to the folder where your pom.xml exist and execute mvn clean verify)

sonarqube: scan a project from maven: get StringUtils error

I've installed sonarqube on localhost (via docker) and try to scan my maven project with the command below :
mvn sonar:sonar -Dsonar.host.url=http://localhost:32768 -Dsonar.login=27948f763e39322e99a8508c38a28385c22b57f8 -e
But it failed after few seconds :
[INFO] Scanning for projects...
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.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
[INFO]
[INFO] --------------------------< com.example:demo >--------------------------
[INFO] Building demo 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.eclipse.m2e:lifecycle-mapping:jar:1.0.0 is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.eclipse.m2e:lifecycle-mapping:1.0.0: Plugin org.eclipse.m2e:lifecycle-mapping:1.0.0 or one of its dependencies could not be resolved: Failure to find org.eclipse.m2e:lifecycle-mapping:jar:1.0.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
[INFO]
[INFO] --- sonar-maven-plugin:3.4.0.905:sonar (default-cli) # demo ---
[INFO] User cache: /Users/johann/.sonar/cache
[INFO] SonarQube version: 7.1.0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.620 s
[INFO] Finished at: 2018-05-10T10:20:30+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project demo: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar: org/apache/commons/lang/StringUtils
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.codehaus.mojo:sonar-maven-plugin:3.4.0.905
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/johann/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.4.0.905/sonar-maven-plugin-3.4.0.905.jar
[ERROR] urls[1] = file:/Users/johann/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[2] = file:/Users/johann/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[3] = file:/Users/johann/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
[ERROR] urls[4] = file:/Users/johann/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.10.0.1189/sonar-scanner-api-2.10.0.1189.jar
[ERROR] urls[5] = file:/Users/johann/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : org.apache.commons.lang.StringUtils
[ERROR] -> [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/PluginContainerException
My Java project is working well and sonarqube seems also to be ok.
I will appreciate your help...
Thanks
--
edit
As requested, here is my pom.xml :
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
I tried to add the profile object as suggested by A J, bu tag is Unrecognised.
And y the way, I'm using intelliJ as IDE.
Thanks
Add dependency for "lifecycle-mapping:jar:1.0.0" in pom.xml
the error states that ":lifecycle-mapping:jar:1.0.0 is missing, no dependency information available"

Build failure while building a project using ElasticSearch-Hadoop

I am unable to build a Java project which uses ElasticSearch-Hadoop.
This is the error that I am seeing, when I try to build my project:
Scanning for projects...
------------------------------------------------------------------------
Building testES 1.0-SNAPSHOT
------------------------------------------------------------------------
The POM for cascading:cascading-local:jar:2.5.5 is missing, no dependency information available
The POM for cascading:cascading-hadoop:jar:2.5.5 is missing, no dependency information available
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 6.499s
Finished at: Mon Sep 08 11:29:08 IST 2014
Final Memory: 8M/19M
------------------------------------------------------------------------
Failed to execute goal on project testES: Could not resolve dependencies for
project org.edge:testES:jar:1.0-SNAPSHOT: The following artifacts could not
be resolved: cascading:cascading-local:jar:2.5.5, cascading:cascading-
hadoop:jar:2.5.5: Failure to find cascading:cascading-local:jar:2.5.5 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]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read
the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Below are the dependencies in the POM file for the project:-
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.elasticsearch</groupId>
<artifactId>elasticsearch-hadoop</artifactId>
<version>2.1.0.Beta1</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-core</artifactId>
<version>1.2.1</version>
<type>jar</type>
</dependency>
</dependencies>
Am I missing something?
looks like you are blocking maven to look at spring-source repository, to make it work add following snippet in your pom.xml
<project>
...
<repositories>
<repository>
<id>spring-milestones</id>
<url>http://repo.springsource.org/libs-milestone/</url>
</repository>
</repositories>
...
</project>

maven build fails after adding jar to artifatory .m2/repository do not contain the jar file

I tried to add jasperreports.jar file to the artifactory under libs-release-local:net/sf/jasperreports/jasperreports/5.0.1/jasperreports-5.0.1.jar and the deployment was successful.
pom.xml dependency
<dependency>
<groupId>jasperreports-htmlcomponent</groupId>
<artifactId>jasperreports-htmlcomponent</artifactId>
<version>5.0.1</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<!--version>5.1.0</version-->
<version>5.0.1</version>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
<exclusion>
<artifactId>commons-collections</artifactId>
<groupId>commons-collections</groupId>
</exclusion>
</exclusions>
</dependency>
But when I try to run the application from Intellij, I get the error path to dependency
Both the jar files are present in the artifactory but is not getting recognized.
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.864 s
[INFO] Finished at: 2014-08-25T15:51:47-05:00
[INFO] Final Memory: 16M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.grails:grails-maven-plugin:2.3.4:run-app (default-cli) on project MPF-SalesQuote: Failed to create classpath for Grails execution. Could not transfer artifact com.lowagie:itext:jar:2.1.7.js1 from/to metasystems-snapshots (http://javaguru.metasystems.com:8081/artifactory/metasystems-snapshot): Failed to transfer file: http://javaguru.metasystems.com:8081/artifactory/metasystems-snapshot/com/lowagie/itext/2.1.7.js1/itext-2.1.7.js1.jar. Return code is: 409, ReasonPhrase: The repository 'metasystems-snapshot' rejected the artifact 'metasystems-snapshot:com/lowagie/itext/2.1.7.js1/itext-2.1.7.js1.jar' due to its snapshot/release handling policy..
[ERROR] com.lowagie:itext:jar:2.1.7.js1
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] metasystems-snapshots (http://javaguru.metasystems.com:8081/artifactory/metasystems-snapshot, releases=true, snapshots=true),
[ERROR] metasystems-release (http://javaguru.metasystems.com:8081/artifactory/metasystems-release, releases=true, snapshots=true),
[ERROR] local-releases (http://javaguru.metasystems.com:8081/artifactory/libs-release-local, releases=true, snapshots=true),
[ERROR] grails (http://repo.grails.org/grails/core, releases=true, snapshots=true),
[ERROR] grails-plugins (http://repo.grails.org/grails/plugins, releases=true, snapshots=true),
[ERROR] Metasystems Inc. (http://javaguru.metasystems.com:8081/artifactory/libs-release-local, releases=true, snapshots=true),
[ERROR] central-mirror (http://javaguru.metasystems.com:8081/artifactory/remote-repos, releases=true, snapshots=false)
[ERROR] Path to dependency:
[ERROR] 1) com.metasystems:MPF-SalesQuote:grails-app:1.0-SNAPSHOT
[ERROR] 2) net.sf.jasperreports:jasperreports:jar:5.0.1
[ERROR] 3) com.lowagie:itext:jar:2.1.7.js1
[ERROR] -> [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/MojoEx
ecutionException
Return code is: 409, ReasonPhrase: The repository 'metasystems-snapshot' rejected the artifact 'metasystems-snapshot:com/lowagie/itext/2.1.7.js1/itext-2.1.7.js1.jar' due to its snapshot/release handling policy..
As Error Code 409 suggests, you are trying to deploy a snapshot version into a release only repository. Hence the conflict. Select a snapshot repository instead of a release one in your pom.xml or select a release library rather than the snapshot library for your release version.
This solution worked for me , BTW it made deploy slower due to downloading extra repositories.
Jasper Library download forbidden when running maven: mvn package
Sorry Can i post some one answer from other question ( here is the solution )
Please add below repository in your pom.xml,
<repositories>
<repository>
<id>jasperreports</id>
<url>http://jasperreports.sourceforge.net/maven2</url>
</repository>
<repository>
<id>jaspersoft-third-party</id>
<url>http://jaspersoft.artifactoryonline.com/jaspersoft/t‌​hird-party-ce-artifa‌​cts/</url>
</repository>
</repositories>

Missing dependancy information for jdbc.artifact.groupid:jdbc-driver:jar:1.0

I am trying to use hbm2java maven plugins for hibernate. For mvn hibernate3:hbm2cfgxml goal I am facing following error.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my-app-hadoop 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> hibernate3-maven-plugin:2.2:hbm2cfgxml (default-cli) # my-app-hadoop >>>
[INFO]
[INFO] <<< hibernate3-maven-plugin:2.2:hbm2cfgxml (default-cli) # my-app-hadoop <<<
[INFO]
[INFO] --- hibernate3-maven-plugin:2.2:hbm2cfgxml (default-cli) # my-app-hadoop ---
[WARNING] The POM for jdbc.artifact.groupid:jdbc-driver:jar:1.0 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.454s
[INFO] Finished at: Tue Aug 28 11:14:20 IST 2012
[INFO] Final Memory: 3M/6M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:hibernate3-maven- plugin:2.2:hbm2cfgxml (default-cli) on project my-app-hadoop: Ex
ecution default-cli of goal org.codehaus.mojo:hibernate3-maven-plugin:2.2:hbm2cfgxml failed: Plugin org.codehaus.mojo:hibernate3-m
aven-plugin:2.2 or one of its dependencies could not be resolved: Failure to find jdbc.artifact.groupid:jdbc-driver:jar:1.0 in htt
p://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]
[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/PluginResolutionException
I have added following plugin configuration in POM.xml to use hbm2java capabilities.
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<components>
<component>
<name>hbm2ddl</name>
<implementation>jdbcconfiguration</implementation>
</component>
<component>
<name>hbm2hbmxml</name>
<outputDirectory>src/main/resources</outputDirectory>
</component>
</components>
<componentProperties>
<drop>true</drop>
<configurationfile>/src/main/resources/hibernate.cfg.xml</configurationfile>
</componentProperties>
</configuration>
<dependencies>
<dependency>
<groupId>jdbc.artifact.groupid</groupId>
<artifactId>jdbc-driver</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
Where would I find jdbc.artifact.groupid and what is missing in my pom.xml?
You must replace jdbc.artifact.groupid:jdbc-driver:1.0 by a real vendor artifact. For instance
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.2.8</version>
</dependency>
if you use hsqldb.
EDIT
As you mention you use Oracle in your comment... The jdbc jar for Oracle db is provided with your Oracle distribution. You can also download it here.Once downloaded you will have to put it manually in your local maven repo (you can also store it in the thirparty repo of you Maven Repo Manager if you have one (Nexus, Archiva...). An other way is to add the dependency by using the systemPath declaration :
<dependency>
<groupId>com.oracle.jdbc</groupId>
<artifactId>ojdbc6_g</artifactId>
<version>11.2.0.2.0</version>
<systemPath>"C:/ThirpartyJars/Oracle/ojdbc6_g.jar"</systemPath>
</dependency>
Replace your dependency
<dependency>
<groupId>jdbc.artifact.groupid</groupId>
<artifactId>jdbc-driver</artifactId>
<version>1.0</version>
</dependency>
to
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0</version>
</dependency>

Categories