Hello,

I am trying to create an assembly which has the functionality of the predefined jar-with-dependencies assembly, with one difference, namely that one specific dependency jar is excluded.

I'm having a problem getting it to work. Instead of including all the dependency jars minus one with my code, it just includes a single one.

Here is the relevant section of the pom:
           <plugin>
               <artifactId>maven-assembly-plugin</artifactId>
               <configuration>
                   <descriptors>
<descriptor>cytoscape-plugin-assembly.xml</descriptor>
                   </descriptors>
               </configuration>
           </plugin>

And here is the assembly xml file:

<assembly>
 <id>plugin</id>
 <formats>
   <format>jar</format>
 </formats>
 <includeBaseDirectory>false</includeBaseDirectory>
 <dependencySets>
   <dependencySet>
     <outputFileNameMapping></outputFileNameMapping>
     <unpack>true</unpack>
     <scope>runtime</scope>
           <excludes>
               <exclude>cytoscape:cytoscape</exclude>
           </excludes>
   </dependencySet>
 </dependencySets>
 <fileSets>
   <fileSet>
     <directory>target/classes</directory>
     <outputDirectory></outputDirectory>
   </fileSet>
 </fileSets>
</assembly>

The relevant output of "mvn clean;mvn assembly:assembly" is:
[INFO] [assembly:assembly]
[INFO] Expanding: /users/dtenenba/.m2/repository/axis/axis/1.4/axis-1.4.jar into /users/dtenenba/IdeaProjects/uddibrowser/target/assembly/work [INFO] Building jar: /users/dtenenba/IdeaProjects/uddibrowser/target/uddibrowser-1.0-SNAPSHOT-plugin.jar

As you can see, axis-1.4.jar was the only jar file whose contents were added to the output jar. I definitely have more dependencies defined in my pom, otherwise the code would not build.

I tried getting rid of the exclude and explicitly including every jar I want:
     <includes>
         <include>wsdl4j:wsdl4j</include>
         <include>axis:axis-ant</include>
         <include>axis:axis-jaxrpc</include>
         <include>commons-discovery:commons-discovery</include>
         <include>commons-logging:commons-logging</include>
         <include>javax.activation:activation</include>
         <include>javax.mail:mail</include>
         <include>jgoodies:forms</include>
         <include>log4j:log4j</include>
         <include>saaj:saaj</include>
         <include>uddi4j:uddi4j</include>
     </includes>

That resulted in the same output as above. Just for grins I got rid of this line to see what would happen:
         <include>axis:axis</include>

This time it picked another jar to include, seemingly at random:
[INFO] [assembly:assembly]
[INFO] Expanding: /users/dtenenba/.m2/repository/jgoodies/forms/1.0.7/forms-1.0.7.jar into /users/dtenenba/IdeaProjects/uddibrowser/target/assembly/work [INFO] Building jar: /users/dtenenba/IdeaProjects/uddibrowser/target/uddibrowser-1.0-SNAPSHOT-plugin.jar

Why isn't it including everything I want included? It's driving me crazy....

Hope someone can help.
Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to