netbeans maven-assembly-plugin builds jar with dependencies but without project classes -
in netbeans 7.2.1 trying build executable jar dependencies using maven assembly plugin. worked in past when building jar contains dependencies except classes project itself.
when running clean install assembly:single
target directory contains 2 jars, icfstatuspage-1.0-snapshot-jar-with-dependencies.jar , icfstatuspage-1.0-snapshot.jar. 1 contains dependencies, other classes.
the build of jar dependencies seems ok. (missing pom files manual installed artifacts).
[assembly:single] missing pom cf:conn-fwk-int:jar:1.0 missing pom cf:conn-fwk:jar:1.0 building jar: /users/petervannes/netbeansprojects2/icfstatuspage/target/icfstatuspage-1.0-snapshot-jar-with-dependencies.jar ------------------------------------------------------------------------ build success ------------------------------------------------------------------------
plugin configuration snippet ;
<build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>2.4</version> <configuration> <source>1.6</source> <target>1.6</target> <debug>false</debug> </configuration> </plugin> <plugin> <artifactid>maven-assembly-plugin</artifactid> <version>2.4</version> <configuration> <archive> <manifest> <addclasspath>true</addclasspath> <mainclass>nl.organization.icfstatuspage.icfstatus</mainclass> </manifest> </archive> <descriptorrefs> <descriptorref>jar-with-dependencies</descriptorref> </descriptorrefs> </configuration> </plugin> </plugins> </build> <properties>
have been googling , trying multiple options no success till now. welcome !
cheers,
peter
i stuck @ same point , had trouble finding answer, though older question, since still came in search when stuck, answer. think need add in <executions>
section. know next nothing maven, i'm trying make work... seemed trick.
<plugin> <artifactid>maven-assembly-plugin</artifactid> <version>2.4</version> <configuration> <archive> <manifest> <addclasspath>true</addclasspath> <mainclass>nl.organization.icfstatuspage.icfstatus</mainclass> <adddefaultimplementationentries>true</adddefaultimplementationentries> <adddefaultspecificationentries>true</adddefaultspecificationentries> </manifest> </archive> <descriptorrefs> <descriptorrefs>jar-with-dependencies</descriptorrefs> </descriptorrefs> </configuration> <executions> <execution> <id>make-assembly</id> <!-- used inheritance merges --> <phase>package</phase> <!-- bind packaging phase --> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin>
i got section maven documentation on maven-assembly-plugin usage.
Comments
Post a Comment