This is quite unexpected, I recently switched to a new machine and while setting up my dev environment, one of my services has been giving this error on running mvn clean install
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:35 min
[INFO] Finished at: 2020-11-21T22:27:09+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.coderplus.maven.plugins:copy-rename-maven-plugin:1.0:copy (copy-file) on project my-service: Execution copy-file of
goal com.coderplus.maven.plugins:copy-rename-maven-plugin:1.0:copy failed: A required class was missing while executing com.coderplus.maven.plugins:copy-renam
e-maven-plugin:1.0:copy: org/codehaus/plexus/util/Scanner
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>com.coderplus.maven.plugins:copy-rename-maven-plugin:1.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/userName/.m2/repository/com/coderplus/maven/plugins/copy-rename-maven-plugin/1.0/copy-rename-maven-plugin-1.0.jar
[ERROR] urls[1] = file:/C:/Users/userName/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[2] = file:/C:/Users/userName/.m2/repository/org/apache/maven/reporting/maven-reporting-api/2.0.9/maven-reporting-api-2.0.9.jar
[ERROR] urls[3] = file:/C:/Users/userName/.m2/repository/org/apache/maven/doxia/doxia-sink-api/1.0-alpha-10/doxia-sink-api-1.0-alpha-10.jar
[ERROR] urls[4] = file:/C:/Users/userName/.m2/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar
[ERROR] urls[5] = file:/C:/Users/userName/.m2/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar
[ERROR] urls[6] = file:/C:/Users/userName/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.8/plexus-utils-1.5.8.jar
[ERROR] urls[7] = file:/C:/Users/userName/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : org.codehaus.plexus.util.Scanner
My first guess would be that I have a dependency missing in my project(not sure which one), although it does BUILD SUCCESS on existing machines including the Jenkins instance.
None of the other services I run have an issue like this.
I've verified that the jars mentioned are not corrupt. Tried deleting the whole .m2 directory and starting again as well.
Are there any other possibilities I might be missing here?
Edit: Adding the <plugins> section of my pom.xml
I've been recommended using a newer plugin, but this may add help narrow down the issue further:
<plugins>
<!-- Docker Build Plugin START -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-filtering</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0</version>
</plugin>
<!-- Docker Build Plugin END -->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration><addResources>true</addResources></configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
</plugin>
</plugins>
I've removed the <execution> part from these to save some scrolling.
You could use the much newer Wagon Maven Plugin:
Use this plugin to view and transfer resources between repositories using Maven Wagon.
with its copy goal:
Copy artifacts from one Wagon repository to another Wagon repository.
instead of the old copy-rename-maven-plugin.
Don't get confused by Wagon repository. There are simply source/target URLs and fromDir/toDir directories. Wagon supports the file: protocol.
Re: one of your comments to your question: The maven-resources-plugin:2.7 has in its POM:
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.15</version>
</dependency>
and no copy-rename-maven-plugin, of course.
Related
I have an Eclipse Java project which has a class folder as dependency. This means that in order to run the app correctly I need to add that folder in the Java Build Path of the project.
In other words:
"Properties"->"Java Build Path"->"Libraries" -> "Add Class Folder"->folder with dependencies.
The Java project runs fine with this configuration either in Eclipse and in the exported runnable JAR file.
I rewrote the same project with Java Spring with the same configuration as above (the class folder dependency) and it still works fine inside the Eclipse IDE.
But, when I try to deploy the app with the command "mvn package", I got the following error:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/Users/User/git/project/src/main/java/core/Reasoner.java:[118,80] package uk.ac.manchester.cs.factplusplus.owlapiv3 does not exist
[INFO] 3 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.199 s
[INFO] Finished at: 2022-03-28T10:52:03+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project rest-service-complete: Compilation failure: Compilation failure:
[ERROR] /C:/Users/User/git/project/src/main/java/core/Reasoner.java:[118,80] package uk.ac.manchester.cs.factplusplus.owlapiv3 does not exist
[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/MojoFailureException
This is exactly the dependency located inside the aforementioned folder and this means that in some way, the mvn package command is unable to read this folder, but Eclipse can without problems.
Maybe due to a POM misconfiguration?
In this case, here my POM file build section:
<packaging>jar</packaging>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<fork>true</fork>
<mainClass>${start-class}</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
I also tried the following:
mvn clean package spring-boot:repackage
mvn install
but I got the same error message.
So, how to tell MVN to also "consider" that folder to build the project?
I have a Java project that uses Java 8. I want to use JUnit 5. I'm using Eclispe. If I add the JUnit 5 library in the project's Build Path, the build is successful inside Eclipse. However, when I build with Maven at command line it fails.
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Program Files\apache-maven-3.6.3\bin\..
Java version: 1.8.0_241, vendor: Oracle Corporation, runtime: C:\Program
Files\Java\jdk1.8.0_241\jre
Below the pom.xml. I've tried other versions of pom found in Google search, but all gave me the same errors.
UPDATE:
If I remove <scope>test</scope>from pom.xml, the build still fails.
<properties>
<!-- Dependency versions -->
<junit.jupiter.version>5.6.0</junit.jupiter.version>
<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
<!-- Java 8 -->
<java.version>1.8</java.version>
<!-- Encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<!-- Jupiter API for writing tests -->
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<!-- Maven Surefire plugin to run tests -->
<build>
<plugins>
<!-- plugin to run test cases from maven -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
<!-- Maven plugin to use perticular java version to compile code -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
[INFO] 5 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.473 s
[INFO] Finished at: 2020-04-28T12:19:11-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project Java8: Compilation failure: Compilation failure:
[ERROR] C:\Users\Documents\Java8\src\main\java\com\name\stream\ClassName.java:[8,23] error: package org.junit does not exist
[ERROR] C:\Users\Documents\Java8\src\main\java\com\name\stream\ClassName.java:[8] error: static import only from classes and interfaces
[ERROR] C:\Users\Documents\Java8\src\main\java\com\name\stream\ClassName.java:[31,2] error: cannot find symbol
[ERROR] symbol: method assertEquals(Optional<String>,Optional<Object>)
[ERROR] location: class ClassName
[ERROR] C:\Users\Documents\Java8\src\main\java\com\name\stream\ClassName.java:[33,2] error: cannot find symbol
[ERROR] symbol: method assertEquals(Optional<Optional<String>>,Optional<Object>)
[ERROR] location: class ClassName
[ERROR] C:\Users\Documents\Java8\src\main\java\com\name\stream\ClassName.java:[44,2] error: cannot find symbol
[ERROR] symbol: method assertEquals(Optional<String>,Optional<Object>)
[ERROR] location: class ClassName
[ERROR] -> [Help 1]
Eclipse does not correctly separate test scope and compile scope dependencies so keep the scope test which is correct. You have to create a Test class in
src/test/java/com/name/stream/ClassNameTest.java and use the appropriate annotations which needs to be from org.junit.jupiter.api package
Take a look at this example project: github.com/khmarbaise/basic-junit-jupiter-test (Simple Test case and assertions also simple class with a single method just to show how it works..)...It builds on command line, in IDEA Intellij and should also work in Eclipse and works on GitHub Actions
EDIT5 Updated /
I'm using Maven 3.3.3.
I just create new project and added compile and exec plugin, as examples on web.
I tried to execute, but I got error
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:java (default-cli) on project QNAProject: An exception occured while executing the Java class. com.jadex.qna.QNAProject.App -> [Help 1]<br>
[ERROR] <br>
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.<br>
[ERROR] Re-run Maven using the -X switch to enable full debug logging.<br>
[ERROR] <br>
[ERROR] For more information about the errors and possible solutions, please read the following articles:<br>
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException<br>
I tried exec-maven-plugin version 1.2.1 and 1.4.0, but got same error. Here is my 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.jadex.qna</groupId>
<artifactId>QNAProject</artifactId>
<version>0.1</version>
<packaging>jar</packaging>
<name>QNAProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>java</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>maven</executable>
<mainClass>com.jadex.qna.QNAProject.App</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
I even tried a working example project from several sites,
such as
http://examples.javacodegeeks.com/enterprise-java/maven/create-java-project-with-maven-example/
http://www.mkyong.com/maven/how-to-create-a-java-project-with-maven/
but I got same error.
I unzipped maven at C:\apache-maven-3.3.3 and created environment variable MAVEN_HOME as same path.
What is the problem?
====================================
EDIT: Here is the result
Well.. I set MAVEN_HOME, not M2_HOME because tutorial what I found said to set it only...
Of course, echo %MAVEN_HOME% shows
C:\apache-maven-3.3.3
is it wrong?
I added %MAVEN_HOME%\bin to PATH variable, but it did not work too.
And, I'm using eclipse
=====================================
EDIT2: Here is full log. I used goal 'clean exec:java -e -X'
It was too long, so I uploaded to my blog here.
And note that I changed repository folder from C:\Users.....m2 to new local repository folder C:\apache-maven-localrepository
https://arincblossom.wordpress.com/2015/06/15/error-logs/
=======================================
EDIT3: I changed maven-compiler-plugin setting like this
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<verbose>true</verbose>
<fork>true</fork>
<executable>${env.JAVA_HOME}/bin/javac</executable>
<compilerVersion>1.5</compilerVersion>
<!-- <source>1.8</source>
<target>1.8</target> -->
</configuration>
</plugin>
It prevented me from having error from mvn -e compile exec:java but I can't run with mvn exec:java -Dexec.mainClass="com.jadex.qna.QNAProject.App"
=================================
EDIT4: OK, I'll try from the bottom, and post again. Thanks for your sincere helps.
======================================
EDIT5
I reset all the sequences... re-installed eclipse, maven.. and re-created projects... but nothing worked...
I changed eclipse settings to fix JDK path to installed jdk path, not JRE path. then I found that 'mvn -e clean compile exec:java' is working, but I want to just 'mvn clean exec:java' work. It does not work at all.
You can check full source here
https://github.com/arincblossom/MavenTestProject
This is current console message for 'mvn -e clean exec:java'
[WARNING]
[WARNING] Some problems were encountered while building the effective settings
[WARNING] expected START_TAG or END_TAG not TEXT (position: TEXT seen ...ore artifacts.\n |\n | Default: ${user.home}/.m2/repository\n <l... #53:5) # C:\apache-maven-3.3.3\conf\settings.xml, line 53, column 5
[WARNING] expected START_TAG or END_TAG not TEXT (position: TEXT seen ...ore artifacts.\n |\n | Default: ${user.home}/.m2/repository\n <l... #53:5) # C:\apache-maven-3.3.3\conf\settings.xml, line 53, column 5
[WARNING]
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building MavenTestProject 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # MavenTestProject ---
[INFO] Deleting C:\Users\bonavision_laptop\Desktop\Project\JadeX\MavenTestProject\MavenTestProject\target
[INFO]
[INFO] --- exec-maven-plugin:1.4.0:java (default-cli) # MavenTestProject ---
[WARNING]
java.lang.ClassNotFoundException: com.jadex.qna.MavenTestProject.App
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:281)
at java.lang.Thread.run(Thread.java:745)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.900 s
[INFO] Finished at: 2015-06-15T17:42:19+09:00
[INFO] Final Memory: 8M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.4.0:java (default-cli) on project MavenTestProject: An exception occured while executing the Java class. com.jadex.qna.MavenTestProject.App -> [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
This issue happens, when it is not compatible with eclipse too.
Try this
mvn clean install eclipse:eclipse
Vote up, if it works to help fellow members
The error log which you posted says the following:
java.lang.ClassNotFoundException com.jadex.qna.QNAProject.App
So it clear what the root source of the error is. You are trying to execute the main() method of a class whose class file Maven cannot find. As this SO article discusses, you can try explicitly compiling first, then executing after the class file has been generated:
mvn -e compile exec:java
mvn exec:java -Dexec.mainClass="com.jadex.qna.QNAProject.App"
I ran into this same problem, it was caused by a port conflict.
my tomcat server tried to start on port 8080 but i already had a binding for it.
netstat -anto will show you port bindings 0.0.0.0:8080 or similar and it's PID this will help you determin what process is already running the port bidning, either change it in your timcat server or whatever process is using the bidning. Could be caused by an IIS, SKype or similar.
when I'm building a maven project I got this error .....
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.790s
[INFO] Finished at: Sun May 11 09:36:22 IST 2014
[INFO] Final Memory: 6M/111M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test (default-test) on project javaeeapp: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test failed: Unable to load the mojo 'test' in the plugin 'org.apache.maven.plugins:maven-surefire-plugin:2.10'. A required class is missing: org/apache/maven/plugin/surefire/SurefireReportParameters
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-surefire-plugin:2.10
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/NOughT/.m2/repository/org/apache/maven/plugins/maven-surefire-plugin/2.10/maven-surefire-plugin-2.10.jar
[ERROR] urls[1] = file:/C:/Users/NOughT/.m2/repository/org/apache/maven/surefire/surefire-booter/2.10/surefire-booter-2.10.jar
[ERROR] urls[2] = file:/C:/Users/NOughT/.m2/repository/org/apache/maven/surefire/maven-surefire-common/2.10/maven-surefire-common-2.10.jar
[ERROR] urls[3] = file:/C:/Users/NOughT/.m2/repository/org/codehaus/plexus/plexus-utils/2.1/plexus-utils-2.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------: org.apache.maven.plugin.surefire.SurefireReportParameters
[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
how I add maven surefire plugin to eclipse??
Add Maven Surefire Plugin in pom.xml.
Refer sample pom.xml here:
<project>
...
<build>
<!-- To define the plugin version in your parent POM -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
</plugin>
...
</plugins>
</pluginManagement>
<!-- To use the plugin goals in your POM or parent POM -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
</plugin>
...
</plugins>
</build>
...
</project>
I also got the same error got resolved by going to add dependency
and add the following dependency
1.maven surfire plugin
2.maven surfire common
3.surfire api
4.surfire booter
By downloading all this in my pom.xml My issue got resolved
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>