I am using Eclipse Kepler SR2 with m2e. I have a web project that depends on banks.
When I use "Run as → Maven Build ..." with the goal package and the "Check artifacts of the workspace" is checked, then the lib folder in the target folder contains the folder with the name of the dependency ban, and not the jar itself. Packaged war also contains a folder, not a jar. However, when deployed to tomcat with m2e, the jar is deployed correctly.
I am using maven-war-plugin version 2.4.
This is my WAR:
<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.modelity.loans</groupId>
<artifactId>loans-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>loans-web</artifactId>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>com.modelity.loans</groupId>
<artifactId>loans-core</artifactId>
<version>0.0.1-SNAPSHOT</version>
<type>jar</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</build>
</project>
And these are the artifact coordinates of the dependency ban:
<parent>
<groupId>com.modelity.loans</groupId>
<artifactId>loans-lib</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>loans-core</artifactId>
<packaging>jar</packaging>
I looked at the debug output for the purpose of the maven package. When a military plug-in processes banks, it says
[DEBUG] Processing: loans-core-0.0.1-SNAPSHOT.jar
without indicating that the jar was copied. Later in the magazine I see:
adding directory WEB-INF/lib/loans-core-0.0.1-SNAPSHOT.jar/
maven (3.0.4), maven (3.0.5).
SR1 .
, . , .
,