I have the following maven project structure
Project[pom.xml] <type>pom</type>
-module 1[pom.xml] <type>jar</type>
-module 2[pom.xml] <type>pom</type>
--SubModule1[pom.xml] <type>jar</type>
--SubModule2[pom.xml] <type>jar</type>
--SubModule3[pom.xml] <type>war</type>
-module 3[pom.xml] <type>ear</type>
my problem with the packaging, the output EAR file does not include module 2 when doing
mvn clean install
What I did in module 2 is to package as war. but then I could not the artifact to the ear file.
any ideas are appreciated.
I hope I am not congesting this question
below is the poms
Project POM
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>project</groupId>
<artifactId>project</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<name>project</name>
<description>Insert description for your project here.</description>
<modules>
<module>module1</module>
<module>module2</module>
<module>module3</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>module1</artifactId>
<version>${project.version}</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>module2</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wildfly.bom</groupId>
<artifactId>wildfly-jakartaee8-with-tools</artifactId>
<version>${version.jboss.bom}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<!--Configuration of the maven-compiler-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.compiler.plugin}</version>
<configuration>
</configuration>
</plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.wildfly.maven.plugin}</version>
<inherited>true</inherited>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
Module 2 POM
<?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>project</groupId>
<artifactId>project</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>module2</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<modules>
<module>SubModule1</module>
<module>SubModule2</module>
<module>SubModule3</module>
</modules>
<properties>
<!--suppress UnresolvedMavenProperty -->
<context.root>/root</context.root>
<!--suppress UnresolvedMavenProperty -->
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>project</groupId>
<artifactId>SubModule1</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>project</groupId>
<artifactId>SubModule2</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>project</groupId>
<artifactId>SubModule3</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<modules>
<webModule>
<groupId>project</groupId>
<artifactId>SubModule3</artifactId>
<contextRoot>${context.root}</contextRoot>
</webModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>
</project>
*** module3 EAR ***
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>project</groupId>
<artifactId>project</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>module3</artifactId>
<packaging>ear</packaging>
<description>This is the EAR POM file</description>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>module1</artifactId>
<type>jar</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>module2</artifactId>
<type>pom</type>
</dependency>
</dependencies>
<build>
<finalName>${project.parent.artifactId}</finalName>
<plugins>
<!--EAR plugin: format of output file -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>${version.ear.plugin}</version>
<configuration>
<version>8</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<modules>
</modules>
<outputFileNameMapping>#{artifactId}##{dashClassifier?}#.#{extension}#</outputFileNameMapping>
</configuration>
</plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
The following declarations in the parent POM seem strange:
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>module1</artifactId>
<version>${project.version}</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>module2</artifactId>
<version>${project.version}</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
They might cause the described problems.
Related
I have a problem when i try to Run my own maven plugin,
I need my maven plugin to load properties file, from the module that execute this plugin.
I have a Maven project with 2 modules
Module A which I create the plugin
#Mojo(name = "Test", defaultPhase = LifecyclePhase.COMPILE)
public class Test extends AbstractMojo {
#Value("${user}")
String user;
public void execute() throws MojoExecutionException, MojoFailureException {
System.out.println("user "+ user);
}
}
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>org.example</groupId>
<artifactId>Test</artifactId>
<packaging>maven-plugin</packaging>
<version>0.0.1-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.0</version>
<relativePath />
</parent>
<dependencies>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>8.5.4</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.8.5</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-project</artifactId>
<version>3.0-alpha-2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
</dependencies>
<properties>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
</properties>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Module B where i run the plugin Test, and use properties file from module B
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.example</groupId>
<artifactId>Test</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.example</groupId>
<artifactId>Test</artifactId>
<version>0.0.1-SNAPSHOT</version>
<executions>
<execution>
<goals>
<goal>Test</goal>
</goals>
<configuration>
<files>
<file>src/main/resources/application.properties</file>
</files>
</configuration>
</execution>
</executions>
<configuration>
<scope>test</scope>
</configuration>
</plugin>
</plugins>
</build>
</project>
application properties
user=test
Running the plugin with my Idea IDE
user null
When i run my project I get:
java.io.FileNotFoundException:
C:\Users\Anubhav\Desktop\QRDemo\Quote.png (The system cannot find the
path specified)
Here is my pom.xml code:
<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 https://maven.apache.org/xsd/maven-
4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>QRCode</groupId>
<artifactId>QRCode</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>javase</artifactId>
<version>3.3.0</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<release>16</release>
</configuration>
</plugin>
</plugins>
</build>
</project>
I'm completely lost
I am writing a maven plugin using Mojo classes. The plugin requires a dependency called jcifs and included it in the pom.xml of the plugin. I am able build the plugin and it is deployed into my local repository. I can find the jar file and pom.xml in my local repository.
When I use this plugin in another project in my local system, when executing the plugin goal, I am getting an exception saying the class not found. But the class is coming from the jcifs jar and it is included as part of the dependency for my plugin.
I am not able to figure out what I am missing here. Any help is appreciated
Following is the plugin 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.mayuran19.maven.plugin</groupId>
<artifactId>LocalToRemoteRepo</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>maven-plugin</packaging>
<name>localtoremoterepo-maven-plugin</name>
<properties>
<mavenVersion>3.2.1</mavenVersion>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>3.5.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${mavenVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jcifs</groupId>
<artifactId>jcifs</artifactId>
<version>1.3.17</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.3</version>
<executions>
<execution>
<id>default-descriptor</id>
<phase>process-classes</phase>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
Following show is the pom.xml of the project that use this plugin
<?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.mayuran19.maven.plugin</groupId>
<artifactId>LocalToRemoteRepo</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>localtoremoterepo-maven-plugin Test</name>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.3.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-core</artifactId>
<version>4.3.4.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-dependency-tree</artifactId>
<version>3.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>jcifs</groupId>
<artifactId>jcifs</artifactId>
<version>1.3.17</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.mayuran19.maven.plugin</groupId>
<artifactId>LocalToRemoteRepo</artifactId>
<version>1.0-SNAPSHOT</version>
<configuration>
<localRepoDir>C:/Users/smayuran.SITBCS/.m2/repository</localRepoDir>
<remoteRepoDir>smb://192.168.9.196/internal</remoteRepoDir>
<username>G3App</username>
<password>P#ssword$1</password>
</configuration>
</plugin>
</plugins>
</build>
Error I am getting is class not found exception from the library jcifs
You can do this way, if you want:
**Step 1:**Download the jar file to you local machine
**Step 2:**Moving you jar to you maven repo:Run as shown bellow
Example:
<dependency>
<groupId>org.mock-server</groupId>
<artifactId>mockserver-netty</artifactId>
<version>3.10.1</version>
</dependency>
mvn install:install-file -Dfile=C:\Users\username\Desktop\mockserver-netty-3.10.1.jar -DgroupId=org.mock-server -DartifactId=mockserver-netty -Dversion=3.10.1 -Dpackaging=jar
I have a multi module project with 1 main module (engine) and 2 sub modules (client and server)
engine (Main module)
- Client
- Server
When I try to use the server module in the client, It throws a compilation error that indicates that the server package was not found.
Please find all the 3 POM's below.
Engine POM
<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>dev.kasse</groupId>
<artifactId>engine</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>server</module>
<module>client</module>
</modules>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
</dependencies>
Client pom
<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>dev.kasse</groupId>
<artifactId>engine</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>client</artifactId>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
**<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>server</artifactId>
<scope>test</scope>
<version>${project.version}</version>
</dependency>**
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
</dependency>
<dependency>
<groupId>commons-configuration</groupId>
<artifactId>commons-configuration</artifactId>
<version>1.10</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkCount>0</forkCount>
<reuseForks>true</reuseForks>
</configuration>
</plugin>
</plugins>
</build>
Server POM
<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>dev.kasse</groupId>
<artifactId>engine</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>server</artifactId>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
</project>
Your modules need
<packaging>jar</packaging>
to overwrite the
<packaging>pom</packaging>
from the parent file.
I have a similar project set-up, but your solution worked just fine for me.
Still one way that could maybe have solved it in your case, would be to define the version in the parent pom using the dependencyManagment
<dependencyManagement>
<dependencies>
<dependency>
<groupId>${groupId}</groupId>
<artifactId>server</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
The dependency to the server has "test" scope: this means that is will be not included in the runtime package
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>server</artifactId>
<scope>test</scope> <!-- remove this tag -->
<version>${project.version}</version>
</dependency>
for more information on dependency scopes see: here
Ran into a similar problem. This seems to be caused by spring boots' packaging of jar. The Spring boot create an executable jar, sending the classes into BOOT-INF folder inside the jar.
Adding the following into the build\plugins section of the pom resolves the issue (client pom in the case here)
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<forceCreation>true</forceCreation>
</configuration>
</execution>
</executions>
</plugin>
An alternative solution is here : Maven Multi-module dependency package not found
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?