Liquibase maven plugin with JDK11 failing with ClassNotFoundException: XmlElement - plugins

I'm using
Apache Maven 3.3.9
Java version: 11.0.5
And the latest version of liquibase-maven-plugin as follows:
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<configuration>
<changeLogFile>src\main\resources\changelog.yaml</changeLogFile>
<driver>oracle.jdbc.OracleDriver</driver>
<url>thin_url</url>
<username>user</username>
<password>password</password>
</configuration>
</plugin>
I've added in my poml.xml the following dependencies
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.1</version>
</dependency>
but each time execute the plugin with mvn liquibase:update I've got an Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlElement exception.
Any clue what I'm doing wrong?

I was adding the dependencies in the wrong place. I was adding them as 'regular' dependencies in the pom. I didn't know that I had to add them in the plugin as follows:
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>${liquibase.version}</version>
<configuration>
<changeLogFile>resources\changelog2.yml</changeLogFile>
<driver>oracle.jdbc.OracleDriver</driver>
<url>url</url>
<username>user</username>
<password>password</password>
<verbose>true</verbose>
</configuration>
<dependencies>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.2</version>
</dependency>
</dependencies>
</plugin>

Java 9 (and above) removed some classes that used to be part of the standard Java runtime.
See this question and answer for more details:
How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9

Related

Scalatest failed with error "java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z"

We are working on a spark project that was working fine. Recently we had a requirement to upgrade the hadoop hdfs version to 3.1.1, so I have added an explicit dependency for hadoop-client and excluded the hadoop-client(version 2.6.5) that is getting imported automatically through spark-core in my pom file as shown below.
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-core_2.11</artifactId>
<version>2.4.0</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
</exclusion>
</exclusions>
</dependency>
The maven build without tests is getting succeeded and even the application is running fine on the spark cluster. But the scalatests are failing with the error
"ERROR Utils: Aborting task
java.lang.UnsatisfiedLinkError: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
at org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Native Method)
at org.apache.hadoop.io.nativeio.NativeIO$Windows.access(NativeIO.java:640)
at org.apache.hadoop.fs.FileUtil.canRead(FileUtil.java:1223)"
We are using the maven-surefire-plugin and scalatest plugin in our pom file. We have the hadoop binary for 2.7.1 copied under lib directory within our project and the HADOOP_HOME environment variable under scalatest dependency is set to this path. After making the above dependency changes to get hadoop-client 3.1.1, the maven build with tests started failing. I tried to download the hadoop 3.1.1 binary (with winutils and hadoop.dll) and update my HADOOP_HOME to point to that path but still getting the same error.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<argLine>-Xms512m -Xmx1024m</argLine>
<skipTests>true</skipTests>
<reportsDirectory>${project.build.directory}/scalatest-reports</reportsDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.scalatest</groupId>
<artifactId>scalatest-maven-plugin</artifactId>
<version>2.0.0</version>
<configuration>
<argLine>-Xms512m -Xmx1024m</argLine>
<reportsDirectory>${project.build.directory}/scalatest-reports</reportsDirectory>
<junitxml>jUnitResults</junitxml>
<parallel>false</parallel>
<skipTests>false</skipTests>
<environmentVariables>
**<HADOOP_HOME>${project.basedir}/../lib/hadoop-2.7.1</HADOOP_HOME>**
</environmentVariables>
</configuration>
<executions>
<execution>
<id>test</id>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
Any pointers to fix this issue specific to running scalatests using build is greatly appreciated.

Failed to execute goal com.google.appengine:appengine-maven-plugin:1.9.67:devserver

Hey i have a problem starting my maven project on devserver and update calls.
I buils my maven project to run with google cloud engine, but im getting this issue and cant start my server.
This 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>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<groupId>trainingBuddyServer</groupId>
<artifactId>Training-Buddy-Server</artifactId>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
<archiveClasses>true</archiveClasses>
</properties>
<prerequisites>
<maven>3.5</maven>
</prerequisites>
<dependencies>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.67</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>22.0</version>
</dependency>
<dependency>
<groupId>com.googlecode.objectify</groupId>
<artifactId>objectify</artifactId>
<version>5.1.17</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.67</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-endpoints</artifactId>
<version>1.9.67</version>
</dependency>
<dependency>
<groupId>com.google.endpoints</groupId>
<artifactId>endpoints-framework</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>com.google.endpoints</groupId>
<artifactId>endpoints-management-control-appengine</artifactId>
<version>1.0.3</version>
</dependency>
<dependency>
<groupId>com.google.endpoints</groupId>
<artifactId>endpoints-framework-auth</artifactId>
<version>1.0.3</version>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-testing</artifactId>
<version>1.9.67</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-stubs</artifactId>
<version>1.9.67</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-tools-sdk</artifactId>
<version>1.9.67</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.truth</groupId>
<artifactId>truth</artifactId>
<version>0.33</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- for hot reload of the web application-->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.9.67</version>
<configuration>
<appId>trainingbuddy-221215</appId> <!-- Override appengine-web.xml <project> -->
<version>1</version>
<fullScanSeconds>1</fullScanSeconds>
<retainUploadDir>true</retainUploadDir>
</configuration>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.3.1</version>
<configuration>
<deploy.promote>true</deploy.promote>
<deploy.stopPreviousVersion>true</deploy.stopPreviousVersion>
</configuration>
</plugin>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>3.5</version>
</requireMavenVersion>
<requirePluginVersions>
<message>Best Practice is to always define plugin versions!</message>
<banLatest>true</banLatest>
<banRelease>true</banRelease>
<phases>clean,deploy,verify,appengine:run,appengine:deploy,appengine:update,appengine:devappaserver,site</phases>
</requirePluginVersions>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I think its something wrong with pom file, because error says that it cant find this element "com.google.appengine:appengine-maven-plugin:1.9.67:devserver". So this is teh error if it will help :
[INFO] --- appengine-maven-plugin:1.9.67:devserver (default-cli) # Training-Buddy-Server ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.212 s
[INFO] Finished at: 2018-11-01T23:37:27+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:appengine-maven-plugin:1.9.67:devserver (default-cli) on project Training-Buddy-Server: The parameters 'project' for goal com.google.appengine:appengine-maven-plugin:1.9.67:devserver are missing or invalid -> [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/PluginParameterException
Maybe someone know how to fix this?
Adding the
<project>YOUR PROJECT ID</project>
Indeed solves it for me also, however I'm not using the newer gclod maven plugin but the older appengine one:
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
vs mine
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
At some point I should probably move on to the gcloud plugin but right now I haven't got time.
The old appengine plugin also works with the (undocumented) "project" configuration tag. Really confusing and also poor work by google since their getting (started examples) doesn't work, from 1.9.67 and above. Also if it's required from now on we should have gotten some information about it.
For the record I'm posting my multi module/services parent pom snippet including the pluginmanagement with the old appengine plugin:
<pluginManagement>
<plugins>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>${appengine.target.version}</version>
<configuration>
<project>YOUR PROJECT ID</project> <!-- WHAT DO WE NEED THIS FOR-->
<jvmFlags>
<jvmFlag>-Ddatastore.backing_store=${project.basedir}/local_db.bin</jvmFlag>
</jvmFlags>
<fullScanSeconds>-1</fullScanSeconds>
</configuration>
</plugin>
</plugins>
</pluginManagement>
Did you manage to solve this? I've been using my multi module project pom(s) for at least 3 years with no problems, however since 1.9.67 I'm no longer able to deploy or running devserver via appengine maven plugin, with the same error:
The parameters 'project' for goal com.google.appengine:appengine-maven-plugin:1.9.67:devserver are missing or invalid
Using 1.9.65 works for me, so as a short time solution you should be able to use that version instead, however I don't know how old versions your allowed to deploy.
I had the same issue with latest AppEngine. It worked fine with lower than 1.9.64, but it generated the same error with the later version. Today I solved that issue by adding filed on the pom.xml as
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.3.1</version>
<configuration>
<project>your project ID on Google Cloud </project>
<deploy.promote>true</deploy.promote>
<deploy.stopPreviousVersion>true</deploy.stopPreviousVersion>
</configuration>
</plugin>
This is a problem since 1.9.66:
The parameters 'project' for goal
com.google.appengine:appengine-maven-plugin:1.9.66:... are missing or
invalid

spring-boot-maven-plugin include other projects from workspace

I have a spring STS project which depends on two other projects in the same workspace. I have included them in my pom.xml but when I build jar they are excluded from the generated jar.Could you please let me know how to include these two dependent projects in the build.
I have below entries in pom.xml
<dependencies>
<dependency>
<groupId>org.acord.standards.life</groupId>
<artifactId>txlife</artifactId>
<version>2.37.00</version>
</dependency>
<dependency>
<groupId>com.xxx.service.query</groupId>
<artifactId>queryutil</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.acord.standards.life</groupId>
<artifactId>txlife</artifactId>
<version>2.37.00</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.xxx.service.query</groupId>
<artifactId>queryutil</artifactId>
<version>1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<attach>true</attach>
<!-- <includes>
<include>
<groupId>org.acord.standards.life</groupId>
<artifactId>txlife</artifactId>
<version>2.37.00</version>
<classifier>2.37.00</classifier>
</include>
<include>
<groupId>com.xxx.service.query</groupId>
<artifactId>queryutil</artifactId>
<version>1.0</version>
<classifier>1.0</classifier>
</include>
</includes> -->
</configuration>
</plugin>
</plugins>
</build>
I solve this problem following this documentation from Spring.io.
An alternative approach is you run Maven Install for each dependency project and, after it, set them in your pom.xml (in your main project). For example, I have a main spring project called Alna Rest that depends of others particular spring projects how Alna Data and Alna Service, then, in my Alna Rest project my pom.xml has this:
<dependency>
<groupId>com.alna.data</groupId>
<artifactId>alna-data</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>com.alna.service</groupId>
<artifactId>alna-service</artifactId>
<version>0.0.1</version>
</dependency>
After it I can run Maven Install in my Alna Rest project that the Spring Boot Maven Plugin build an executable jar with all projects dependencies.
Well, this works for me. But I don't know if it is the better approach for build a project that requires many othes spring boot projects. Then I recommend you search more about this.

Error in Eclipse Luna in m2e plugin when adding dependency to AspectJ

I'm trying to use AspectJ in my project. When I try to add the maven plugin aspectj-maven-plugin in my pom.xml, I get this error:
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.7:compile (execution: default, phase: compile)
I already tried to install the AspectJ toolkit + AspectJ m2e connector, but then I get an error at every annotation, because the compile level seems to be not 1.5 or above.
My setup is: Eclipse Luna + Java EE7 + JDK8.
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>de.dickschmeck</groupId>
<artifactId>housekeepingbook-web</artifactId>
<version>0.0.2-SNAPSHOT</version>
<packaging>war</packaging>
<name>Web Project</name>
<description>Web Project</description>
<properties>
<junit.version>4.11</junit.version>
<log4j.version>2.0.2</log4j.version>
<primefaces.version>4.0</primefaces.version>
</properties>
<dependencies>
<!-- Java EE 7 dependency -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<!-- JSR-330 -->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- JSF -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
</dependency>
<!-- Primefaces -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>5.0</version>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>all-themes</artifactId>
<version>1.0.10</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.2.2.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.2.2.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.0.2.GA</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<!-- log4j -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.8.2</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
</repository>
</repositories>
<build>
<plugins>
<!-- Avoid war plugin complaining missing web.xml -->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<version>1.7</version>
<configuration>
<complianceLevel>1.8</complianceLevel>
<source>1.8</source>
<target>1.8</target>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.0.0.Final</version>
<configuration>
<hostname>${wildfly-hostname}</hostname>
<port>${wildfly-port}</port>
<username>${wildfly-username}</username>
<password>${wildfly-password}</password>
</configuration>
</plugin>
</plugins>
</build>
Thank you very much in advance for your answers!
That is more a problem or quirk of the m2e plugin and is nothing specific to aspectj - which is also the reason it works in #kriegaex 's IntelliJ IDEA.
Here's a relevant site of the Eclipse-Wiki explaining the cause: http://wiki.eclipse.org/M2E_plugin_execution_not_covered
This question is about the same problem and one possible solution appears to be to add a corresponding <pluginManagement>-tag as described in the highest voted answer.
Also keep in mind that this error only pertains to the build of your application in Eclipse. It has no bearing on the maven build and can be safely ignored if you only ever build your project via maven - the quick fixes suggested for the error by Eclipse should give the option to ignore the error.
I do not understand your problem exactly, but maybe it helps if I tell you that in order to get an AJDT (AspectJ Development Tools) version for Luna, currently you need to use a snapshot/developer version available from
http://download.eclipse.org/tools/ajdt/44/dev/update/
The POM as such seems to be okay, at least it works on an empty project in IntelliJ IDEA or from the Maven command line.

Maven tomcat plugin does not allow stepping into dependent jars

I am using the Maven Tomcat plugin to test a Maven webservice project using Hibernate.
My POM looks like this:
<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>
<groupId>com.honeywell.gt</groupId>
<artifactId>WSOCCMeoReports</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>Simple CXF project using spring configuration</name>
<description>Simple CXF project using spring configuration</description>
<properties>
<shiro.version>1.2.1</shiro.version>
<spring.version>3.1.2.RELEASE</spring.version>
<cxf.version>2.6.1</cxf.version>
<hibernate.version>3.6.5.Final</hibernate.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>
<!--
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-c3p0</artifactId>
<version>${hibernate.version}</version>
</dependency> -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.6.6</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-core</artifactId>
<version>${shiro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId>
<version>${shiro.version}</version>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>${shiro.version}</version>
</dependency>
<dependency>
<groupId>com.sybase.jdbc</groupId>
<artifactId>SybDriver</artifactId>
<version>3.0.0</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<!-- mvn clean install tomcat:run-war to deploy
Look for "Running war on http://xxx" and
"Setting the server's publish address to be /yyy"
in console output; WSDL browser address will be
concatenation of the two: http://xxx/yyy?wsdl
-->
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<executions>
<execution>
<id>start-tomcat</id>
<goals>
<goal>run-war</goal>
</goals>
<phase>pre-integration-test</phase>
<configuration>
<port>${test.server.port}</port>
<path>/webservice</path>
<fork>true</fork>
<useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<projectNameTemplate>[artifactId]-[version]</projectNameTemplate>
<wtpmanifest>true</wtpmanifest>
<wtpapplicationxml>true</wtpapplicationxml>
<wtpversion>2.0</wtpversion>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
The Debug goals are tomcat:run-war
After hitting a break point in the service I cannot step into third party dependencies such as Hibernate. However, if I run a Unit test from the same Maven web service project, I can step into Hibernate.
EDIT 1:
I ran into this and got some ideas about attaching source. Matter of fact, I am trying to debug Hibernate, so I edited source lookup and added paths to the following external archives in my .m2 repository:
hibernate-entitymanager-3.6.5.Final
hibernate-core-3.6.5.Final.
Saved changes and Eclipse still cannot find source to step into. Anyone out there?
Problem appears to be a know issue with Maven Plugin for Eclipse as indicated here.
This post was helpful but I found out that for hibernate 3.6.5, I had to add hibernate-core-3.6.5.Final-sources.jar to source lookup path instead of hibernate-core-3.6.5.Final.jar.