Here goes again ... -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Gesendet: Freitag, 2. März 2012 13:01 An: [email protected] Betreff: AW: exe archiver for Maven assembly plugin?
Hi, Ok ... so I couldn't find anything in the NPanday Source, so I figgured out a solution on my own. I applies the patch to NPanday to this mail. With this module I am able to create maven assemblies containing executables. Here comes an example pom using this plugin (don't know if plugin is really the right name for it): <?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> <parent> <groupId>de.cware.utils</groupId> <artifactId>lib-psexec</artifactId> <version>1.0.0-SNAPSHOT</version> </parent> <groupId>de.cware.utils</groupId> <artifactId>lib-psexec-client</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>jar</packaging> <dependencies> <dependency> <groupId>de.cware.utils</groupId> <artifactId>lib-psexec-service</artifactId> <version>1.0.0-SNAPSHOT</version> <type>winexe</type> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.8.2</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>2.2.1</version> <executions> <execution> <id>make-assembly</id> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> </configuration> <dependencies> <dependency> <groupId>org.apache.npanday.plugins</groupId> <artifactId>maven-exe-archiver-plugin</artifactId> <version>${npanday.version}</version> </dependency> </dependencies> </plugin> </plugins> </build> </project> The result is a Jar file containing all the classes of lib-psexec-client as well as the binary of lib-psexec-service embedded inside it. So it solved the problems I was having. I haven't done intense testing though as I simply wanted to embed exe files in my jars and this does the trick ;-) Chris -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Gesendet: Freitag, 2. März 2012 10:40 An: [email protected] Betreff: exe archiver for Maven assembly plugin? Hi, I am currently trying to setup a Maven build consisting of a mixed configuration (I am using 1.5-incubator-SNAPSHOT): 1. Java Library (jar packaging) 2. Windows Executable (winexe packaging) The release should be a jar containing the Java library with an embedded exe (So I can load the binary from within my Java code) When using the Maven assembly plugin, all I get is this: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-assembly-plugin:2.2.1:single (make-assembly) on project lib-psexec-assembly: Failed to create assembly: Error adding file-set for 'de.cware.utils:lib-psexec-service:winexe:1.0.0-SNAPSHOT' to archive: Error adding archived file-set. PlexusIoResourceCollection not found for: C:\Maven-Repository\de\cware\utils\lib-psexec-service\1.0.0-SNAPSHOT\lib-psexec-service-1.0.0-SNAPSHOT.exe: No such archiver: 'exe'. -> [Help 1] So it seems there is no archiver available to handle exe resources. So my question now is: How do I configure the assembly to do this or is the such an assembler simply missing from NPanday and one should be implemented. I would volunteer implementing one, if this would be the way to go, I just don't want to implement something that isn't needed. Chris [ C h r i s t o f e r D u t z ] C-Ware IT-Service Inhaber Dipl. Inf. Christofer Dutz Karlstraße. 104, 64285 Darmstadt fon: 0 61 51 / 27315 - 61 fax: 0 61 51 / 27315 - 64 mobil: 0171 / 7 444 2 33 email: [email protected]<mailto:[email protected]> http://www.c-ware.de<http://www.c-ware.de/> UStId-Nr. DE195700962
