I'm using both "maven-dependency-plugin" and "maven-jar-plugin" so all of my 
application classes and dependent classes go into a single jar file.  Every 
once in a while I discover that the resulting jar file doesn't have my 
dependent classes.  If I then do "mvn clean" and then "mvn" (default goal of 
install), it works fine.  At the time it's happened, I didn't have the presence 
of mind to check my "target/classes" directory to verify it was 
"maven-dependency-plugin" that failed to do its work.  As the job of 
"maven-jar-plugin" is much simpler, I don't think it's likely this is the 
problem.

My plugin configs follow this.

Any ideas why this might be happening?

------------------
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.3</version>
        <executions>
                <execution>
                        <id>copy</id>
                        <phase>prepare-package</phase>
                        <goals>
                                <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                                <includeScope>compile</includeScope>
                                <excludeScope>test</excludeScope>
                                
<outputDirectory>target/classes</outputDirectory>
                        </configuration>
                </execution>
        </executions>
</plugin>
<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.3.1</version>
        <configuration>
                <classesDirectory>target/classes</classesDirectory>
                <archive>
                        <manifest>
                                <mainClass>mypackage.MyClass</mainClass>
                                
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                </archive>
        </configuration>
</plugin>
------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to