[ERROR] Failed to execute goal org.apache.maven.plugins:maven-ear-
plugin:2.6:generate-application-xml (default-generate-application-xml)
on project itaras-ear: Artifact[war:org.apache.maven.plugins:maven-war-
plugin] is not a dependency of the project.
First I built a WAR file for my application. Now I am in the process of building my EAR file which is supposed to have WAR as dependency.
I have run ITARAS-EAR module with m2e plugin when I got the above mentioned error message.
module WAR's pom.xml is below.
<parent>
<groupId>itaras</groupId>
<artifactId>itaras</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>itaras-war</groupId>
<artifactId>itaras-war</artifactId>
<packaging>war</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>src\main\webapp\WEB-INF\web.xml</webXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
Module EAR's pom.xml is here.
<parent>
<groupId>itaras</groupId>
<artifactId>itaras</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>itaras-ear</artifactId>
<packaging>ear</packaging>
<dependencies>
<dependency>
<groupId>itaras-war</groupId>
<artifactId>itaras-war</artifactId>
<type>war</type>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.6</version>
<configuration>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<applicationXML>src/main/application/META-
INF/application.xml</applicationXML>
</configuration>
</plugin>
</plugins>
</build>
<groupId>itaras-ear</groupId>
</project>
Thanks in advance. Do Correct me if I had gone fundamentally wrong :)
Your war project has 2 groupIds
<parent>
<groupId>itaras</groupId>
<artifactId>itaras</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
*** <groupId>itaras-war</groupId> ****
<artifactId>itaras-war</artifactId>
<packaging>war</packaging>
Remove the groupId and allow it to pick it's groupId from the parent. Only specify the artifactId, version and groupId from the parent.
Then your dependency to the war in your ear project is:
<dependencies>
<dependency>
<groupId>itaras</groupId>
<artifactId>itaras-war</artifactId>
<type>war</type>
<version>${project.version}</version>
</dependency>
</dependencies>
Related
I'm a beginner to maven and trying to make a project and successfully build it in IntelliJ Idea. My pom.xml is as follows:
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">
4.0.0
<groupId>jetbrains</groupId>
<artifactId>EAN-Scraper</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<java.version>1.8</java.version>
<maven.compiler.version>3.8.1</maven.compiler.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.1</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.13.1</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
<!-- Source directory configuration -->
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<source>1.8}</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build> </project>
And the error that I get is
Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile
(default-compile) on project EAN-Scraper: Fatal error compiling
I already tried the changes as suggested here. My jdk version is 13. My project structure is attached below
There is a typo in the declaration of the compiler plugin:
<source>1.8}</source>
enter image description hereenter image description hereI have used maven plugin in eclipse so I dont see any setting.xml even I tried by adding manually setting.xml.
What I am missing please correct me with In details step.
My pom is
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<groupId>demo</groupId>
<artifactId>demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>demo</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>
<dependency>
<groupId>com.project</groupId>
<artifactId>SOA_API_Automation</artifactId>
<scope>system</scope>
<version>0.0.1-SNAPSHOT</version>
<systemPath>{jar/path}</systemPath>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
If you are referring to the settings.xml which is user-specific configuration for Maven, that is not present inside the POM. It's present in ~/.m2/settings.xml. For more details refer the maven doc
UPDATE
As it turns out there is nothing wrong with my dependencies. The problem is that my META-INF/context.xml file packaged inside my war is not being read by the tomcat plugin. I am still looking for a solution as to why this isn't working.
ORIGINAL QUESTION
I have a multi-module project that looks like this:
myproject
+ - business
+ - app
where "business" and "app" are modules with "myproject" defined as parent in their pom.xml. The app module packages a war file with a context.xml file containing a definition for a JDBC connection pool. When the war file is packaged and deployed to a standalone tomcat instance everything works. The standalone tomcat instance has the required MySql connector jar in its lib classpath directory.
When I run the app module using the tomcat7 maven plugin with the tomcat7:run goal and then access my application I get the "SQLException: No suitable driver" error. How can I get the embedded tomcat to see the MySql connector jar at the right time?
myproject pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
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.robsite</groupId>
<artifactId>myproject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>app</module>
<module>business</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8080</port>
<path>/app</path>
<contextReloadable>true</contextReloadable>
</configuration>
</plugin>
</plugins>
</build>
</project>
app 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>
<parent>
<groupId>com.robsite</groupId>
<artifactId>myproject</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>app</artifactId>
<packaging>war</packaging>
<dependencies>
<!-- Jersey modules -->
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>2.26-b01</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>2.25.1</version>
</dependency>
<!-- Spring modules -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.3.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.6.RELEASE</version>
</dependency>
<!-- Modules provided by web container -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<!-- Dependency on business module and its provided dependencies -->
<dependency>
<groupId>com.robsite</groupId>
<artifactId>business</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.0.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
In answer to my original question the way to add dependencies on the tomcat plugin, and have classes loaded by the classloader before loading a web app, is by adding a dependency tag inside the plugin.
To solve the real problem I had to add a specific configuration to tell the tomcat plugin to read the /META-INF/context.xml file from my web application module stored at app/src/main/webapp/META-INF/context.xml.
The corrected pom.xml for my root myproject parent pom is below.
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
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.robsite</groupId>
<artifactId>myproject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>app</module>
<module>business</module>
</modules>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8080</port>
<path>/app</path>
<contextReloadable>true</contextReloadable>
<contextFile>${project.basedir}/src/main/webapp/META-INF/context.xml</contextFile>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.40</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
I follow this tutorial :https://platform.netbeans.org/tutorials/nbm-maven-crud.html and I have an issue.
I tried to create the sample "maven crud sample application" and my "maven netbeans application" and I get always the same error. When I run the project, I get the following exception:
--- nbm-maven-plugin:3.3:run-platform (default-cli) # application ---
Executing: /bin/sh -c "/home/pea-rep/NetBeansProjects/JDK6/test maven//MavenCRUDSample/application/target/foo/bin/foo" --userdir '"/home/pea-rep/NetBeansProjects/JDK6/test maven//MavenCRUDSample/application/target/userdir"' -J-Dnetbeans.logger.console=true -J-ea --branding foo --jdkhome /usr/local/java/jdk1.6.0_45
Exception in thread "main" java.lang.NoClassDefFoundError: maven//MavenCRUDSample/application/target/userdir/var/log/heapdump/hprof
Caused by: java.lang.ClassNotFoundException: maven.MavenCRUDSample.application.target.userdir.var.log.heapdump.hprof
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: maven/MavenCRUDSample/application/target/userdir/var/log/heapdump.hprof. Program will exit.
In this tutorial, I don't see any modification to make at the main class
I did the same tutorial without MAVEN and it works : https://platform.netbeans.org/tutorials/nbm-crud.html
With this error, I can't run my application and have my netbeans platform window. Someone knows why I have this?
I'm on Netbeans 6.9.1 with jdk1.6.0_45 and maven-3.2.1
OS : Ubuntu 64bit
edit :
I've got 4 pom.xml :
Parent : crud-sample-application – netbeans Platform Application
crud-sample-application – Netbeans Platform based application
crud-sample-application – Platform application branding ressources
crud-sample-application – sample Netbeans Module
Sorry I wasn't able to split it.
<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>org.netbeans</groupId>
<artifactId>crud-sample-application</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>crud-sample-application - NetBeans Platform Application</name>
<repositories>
<!-- this is a remote repository hosting the netbeans api artifacts.
the versions of the artifacts are netbeans IDE release based, eg. RELEASE65
You might want to use your own repository. To create one, use the nbm:populate-repository goal.
-->
<repository>
<id>netbeans</id>
<name>repository hosting netbeans.org api artifacts</name>
<url>http://bits.netbeans.org/maven2</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-actions</artifactId>
<version>RELEASE68</version>
</dependency>
</dependencies>
<build>
<plugins>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>3.1</version>
<extensions>true</extensions>
<configuration>
<descriptor>src/main/nbm/module.xml</descriptor>
<brandingToken>${brandingToken}</brandingToken>
<cluster>foobar</cluster>
</configuration>
</plugin>
<!-- netbeans modules in 5.5+ are 1.5 compatible -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<modules>
<module>crudsample</module>
<module>branding</module>
<module>application</module>
</modules>
<properties>
<netbeans.version>RELEASE68</netbeans.version>
<brandingToken>foo</brandingToken>
</properties>
</project>
<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">
<parent>
<groupId>org.netbeans</groupId>
<artifactId>crud-sample-application</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>application</artifactId>
<packaging>nbm-application</packaging>
<version>1.0-SNAPSHOT</version>
<name>crud-sample-application - NetBeans Platform based application</name>
<dependencies>
<dependency>
<groupId>org.netbeans.cluster</groupId>
<artifactId>platform11</artifactId>
<version>${netbeans.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.netbeans</groupId>
<artifactId>crudsample</artifactId>
<version>1.0-SNAPSHOT</version>
<type>nbm</type>
</dependency>
<dependency>
<groupId>org.netbeans</groupId>
<artifactId>branding</artifactId>
<version>1.0-SNAPSHOT</version>
<type>nbm</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<version>3.3</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>deployment</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<executions>
<execution>
<id>updatesite</id>
<phase>package</phase>
<goals>
<goal>autoupdate</goal>
</goals>
<configuration>
<!--distBase>central::default::http://repo1.maven.org/maven2</distBase-->
</configuration>
</execution>
<execution>
<id>webstart</id>
<phase>package</phase>
<goals>
<goal>webstart-app</goal>
</goals>
<configuration>
<codebase>${project.build.directory}/webstart/${brandingToken}</codebase>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
<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">
<parent>
<groupId>org.netbeans</groupId>
<artifactId>crud-sample-application</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>branding</artifactId>
<packaging>nbm</packaging>
<version>1.0-SNAPSHOT</version>
<name>crud-sample-application - Platform application branding resources</name>
<dependencies>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
<version>${netbeans.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
<executions>
<execution>
<id>branding</id>
<phase>process-resources</phase>
<goals>
<goal>branding</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
<!-- to have the jar plugin pickup the nbm generated manifest -->
<useDefaultManifestFile>true</useDefaultManifestFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
<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">
<parent>
<groupId>org.netbeans</groupId>
<artifactId>crud-sample-application</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>nbm</packaging>
<version>1.0-SNAPSHOT</version>
<name>crud-sample-application - sample NetBeans Module</name>
<dependencies>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-util</artifactId>
<version>RELEASE68</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>eclipselink</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-windows</artifactId>
<version>RELEASE68</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-awt</artifactId>
<version>RELEASE68</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-explorer</artifactId>
<version>RELEASE68</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-nodes</artifactId>
<version>RELEASE68</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-dialogs</artifactId>
<version>RELEASE68</version>
</dependency>
<dependency>
<groupId>org.netbeans.api</groupId>
<artifactId>org-openide-execution</artifactId>
<version>RELEASE68</version>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derbyclient</artifactId>
<version>10.5.3.0_1</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>nbm-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
<configuration>
<!-- to have the jar plugin pickup the nbm generated manifest -->
<useDefaultManifestFile>true</useDefaultManifestFile>
</configuration>
</plugin>
</plugins>
</build>
<groupId>org.netbeans</groupId>
<artifactId>crudsample</artifactId>
<repositories>
<repository>
<url>http://ftp.ing.umu.se/mirror/eclipse/rt/eclipselink/maven.repo</url>
<id>eclipselink</id>
<layout>default</layout>
<name>Repository for library Library[eclipselink]</name>
</repository>
</repositories>
</project>
I use netbeans for run my application ==> run project :
install nbm:run-platform
run project via main() :
process-classes org.codehaus.mojo:exec-maven-plugin:1.1.1:exec
avec les arguments :
exec.classpathScope=${classPathScope}
exec.args=-classpath %classpath ${packageClassName}
exec.executable=java "
Thanks,
M.
Problem solve, When netbeans execute :
/bin/sh -c "/home/pea-rep/NetBeansProjects/JDK6/test maven//MavenCRUDSample/application/target/foo/bin/foo" --userdir '"/home/pea-rep/NetBeansProjects/JDK6/test maven//MavenCRUDSample/application/target/userdir"' -J-Dnetbeans.logger.console=true -J-ea --branding foo --jdkhome /usr/local/java/jdk1.6.0_45
It doesn't like the space between maven and test. I rename my folder and it works.
ich have tree modules for my projec, server,client and core. Core module should be imported as jar dependency in other modules.
On eclipse i see no warnings, but if i'm starting the application i'm getting following error :
Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [at.ac.tuwien.inso.verteilte.service.HelloServiceImpl] for bean with name 'helloServiceImpl' defined in ServletContext resource [/WEB-INF/appContext.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: at/ac/tuwien/inso/verteilte/services/IHelloService
Caused by: java.lang.ClassNotFoundException: at.ac.tuwien.inso.verteilte.services.IHelloService
this interface is imported on a HelloServiceImpl. HelloServiceImpl is created on the beans as following :
<jaxws:endpoint id="helloService" implementorClass="at.ac.tuwien.inso.verteilte.service.HelloServiceImpl">
i have removed the namespaces because of link protection of stackoverflow :)
By the way, my pom.xml's are :
for core :
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>verteiltepaxen-parent</artifactId>
<groupId>at.ac.inso.tuwien.verteiltepraxen</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>at.ac.inso.tuwien.verteiltepraxen</groupId>
<artifactId>core</artifactId>
<version>1.0-SNAPSHOT</version>
<name>core</name>
<packaging>jar</packaging>
<description>Verteilte Praxen - core</description>
<build>
<finalName>core-1.0-SNAPSHOT</finalName>
</build>
</project>
Server :
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>verteiltepaxen-parent</artifactId>
<groupId>at.ac.inso.tuwien.verteiltepraxen</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>at.ac.inso.tuwien.verteiltepraxen</groupId>
<artifactId>server</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>server</name>
<description>Verteilte Praxen - Server</description>
<dependencies>
<dependency>
<groupId>at.ac.inso.tuwien.verteiltepraxen</groupId>
<artifactId>core</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>core</artifactId>
<groupId>at.ac.inso.tuwien.verteiltepraxen</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
</dependencies>
</dependencyManagement>
<build>
<finalName>server-1.0-SNAPSHOT</finalName>
</build>
</project>
Client :
<project>
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>verteiltepaxen-parent</artifactId>
<groupId>at.ac.inso.tuwien.verteiltepraxen</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<groupId>at.ac.inso.tuwien.verteiltepraxen</groupId>
<artifactId>client</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>client</name>
<description>Verteilte Praxen - Client</description>
<dependencies>
<dependency>
<groupId>at.ac.inso.tuwien.verteiltepraxen</groupId>
<artifactId>core</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
</dependencies>
</dependencyManagement>
<build>
<finalName>client-1.0-SNAPSHOT</finalName>
</build>
</project>
And the parent pom :
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>at.ac.inso.tuwien.verteiltepraxen</groupId>
<artifactId>verteiltepaxen-parent</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>verteiltepaxen Maven Webapp</name>
<properties>
<cxf.version>2.2.3</cxf.version>
<spring.version>2.5.6.SEC02</spring.version>
</properties>
<dependencies>
... other dependencies ...
</dependencies>
<repositories>
... Repositories ...
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.8</version>
<configuration>
<projectNameTemplate>verteiltepaxen-parent-1.0-SNAPSHOT</projectNameTemplate>
<wtpmanifest>true</wtpmanifest>
<wtpapplicationxml>true</wtpapplicationxml>
<wtpversion>2.0</wtpversion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<version>6.1.8</version>
<configuration>
<!-- Configure the webapp -->
<contextPath>/verteiltepaxen</contextPath>
</configuration>
</plugin>
</plugins>
<finalName>verteiltepaxen-parent-1.0SNAPSHOT</finalName>
</build>
<modules>
<module>client</module>
<module>server</module>
<module>core</module>
</modules>
</project>
Thanks you very much for your helps :)
Thank your for your help, i've removed it but the error is the same
<dependencies>
<dependency>
<groupId>at.ac.inso.tuwien.verteiltepraxen</groupId>
<artifactId>core</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
</dependencies>
I'm not sure what this would actually do, but in the server's POM you are listing core as a dependency and then also excluding it:
<dependency>
<groupId>at.ac.inso.tuwien.verteiltepraxen</groupId>
<artifactId>core</artifactId>
<version>1.0-SNAPSHOT</version>
<type>jar</type>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>core</artifactId>
<groupId>at.ac.inso.tuwien.verteiltepraxen</groupId>
</exclusion>
</exclusions>
</dependency>
Why would you do this? Exclusions are used to tell Maven to ignore some dependencies dragged in by other dependencies in your build.Try removing the exclusion.
You likely just need a mvn clean install in the parent directory to get a fresh war file. Otherwise, clarify what you mean by "if i'm starting the application": using the maven jetty plugin? Deploying to Tomcat? Something else?