I would like to add a source jar to a gwt project using maven.
I tried to do it this way (it's just a poc for managing source dependencies)
source jar 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">
<parent>
    <artifactId>test-source-dependencies</artifactId>
    <groupId>com.niflheimcorp</groupId>
    <version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>test-source-jar</artifactId>
<packaging>jar</packaging>
<version>1.0</version>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.4</version>
            <executions>
                <execution>
                    <id>attach-sources</id>
                    <phase>verify</phase>
                    <goals>
                        <goal>jar-no-fork</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
</project>
using jar 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>
<groupId>com.niflheimcorp</groupId>
<artifactId>test-utilisateur-jar</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
 <dependencies>
    <dependency>
        <groupId>com.niflheimcorp</groupId>
        <artifactId>test-source-jar</artifactId>
        <classifier>source</classifier>
    </dependency>
</dependencies> 
</project>
when launching mvn clean install i got the following error :
[ERROR] Failed to execute goal on project test-utilisateur-jar: Could not resolv
e dependencies for project com.niflheimcorp:test-utilisateur-jar:jar:1.0-SNAPSHO
T: Could not find artifact com.niflheimcorp:test-source-jar:jar:source:1.0-SNAPS
HOT -> [Help 1]
But the artifact is installed by maven just at the precedent step
[INFO] Installing C:\Users\CRSD2193\psf\G4R0C3_portaFixe\test-sources-dependenci
es\test-source-jar\target\test-source-jar-1.0-sources.jar to C:\Users\CRSD2193. m2\repository\com\niflheimcorp\test-source-jar\1.0\test-source-jar-1.0-sources.j ar
I can't see a reason for the error unless we can't declare a source jar as a build deps.
Regards
Nemesis