Hi,
imagine there is a maven build, that produces a WAR file.
Would it be possible to "stick" the WAR into an RPM ?
Thanks, Matthias
On 07/11/2013 01:22 PM, Matthias Wessendorf wrote:
imagine there is a maven build, that produces a WAR file.
Would it be possible to "stick" the WAR into an RPM ?
It would be possible, but Fedora currently lacks guidelines for packaging Web archives. There was some effort in the past for standardizing this, but it was dead-ended.
Because of the above, installation of WAR files is not supported out of the box, but it still can be done. There are several packages installing WARs in non-standard way (for example thermostat or bsh). You can see their spec files for example how this can be done.
On 07/11/2013 01:22 PM, Matthias Wessendorf wrote:
imagine there is a maven build, that produces a WAR file.
Would it be possible to "stick" the WAR into an RPM ?
It would be possible, but Fedora currently lacks guidelines for packaging Web archives. There was some effort in the past for standardizing this, but it was dead-ended.
Because of the above, installation of WAR files is not supported out of the box, but it still can be done. There are several packages installing WARs in non-standard way (for example thermostat or bsh).
The issue is just JAR files inside the WAR file. If it is a WAR file with no other archives hidden inside it can be considered OKish.
--Fernando
You can see their spec files for example how this can be done.
-- Mikolaj Izdebski Software Engineer, Red Hat IRC: mizdebsk -- java-devel mailing list java-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/java-devel
On 07/11/2013 03:23 PM, Fernando Nasser wrote:
Because of the above, installation of WAR files is not supported out of the box, but it still can be done. There are several packages installing WARs in non-standard way (for example thermostat or bsh).
The issue is just JAR files inside the WAR file. If it is a WAR file with no other archives hidden inside it can be considered OKish.
In this case you can create RPM with unpacked WAR file. Application servers usually unpack WARs anyways.
If symlinks inside WAR files were supported then one could repack them and replace bundled libraries with symbolic links. But that's not portable.
On 07/11/2013 03:23 PM, Fernando Nasser wrote:
Because of the above, installation of WAR files is not supported out of the box, but it still can be done. There are several packages installing WARs in non-standard way (for example thermostat or bsh).
The issue is just JAR files inside the WAR file. If it is a WAR file with no other archives hidden inside it can be considered OKish.
In this case you can create RPM with unpacked WAR file. Application servers usually unpack WARs anyways.
That is how it is done, we make it into a xxx.war _directory_ instead of a xxx.war archive
If symlinks inside WAR files were supported then one could repack them and replace bundled libraries with symbolic links. But that's not portable.
It works in some servers but I agree it may not be portable.
-- Mikolaj Izdebski Software Engineer, Red Hat IRC: mizdebsk -- java-devel mailing list java-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/java-devel
I have an app in Fedora that upstream packages as a war file:
http://pkgs.fedoraproject.org/cgit/guacamole.git/tree/
Regards.
Sent from my phone! --Simone On Jul 11, 2013 4:24 PM, "Fernando Nasser" fnasser@redhat.com wrote:
On 07/11/2013 03:23 PM, Fernando Nasser wrote:
Because of the above, installation of WAR files is not supported out of the box, but it still can be done. There are several packages installing WARs in non-standard way (for example thermostat or bsh).
The issue is just JAR files inside the WAR file. If it is a WAR file with no other archives hidden inside it can be considered OKish.
In this case you can create RPM with unpacked WAR file. Application servers usually unpack WARs anyways.
That is how it is done, we make it into a xxx.war _directory_ instead of a xxx.war archive
If symlinks inside WAR files were supported then one could repack them and replace bundled libraries with symbolic links. But that's not portable.
It works in some servers but I agree it may not be portable.
-- Mikolaj Izdebski Software Engineer, Red Hat IRC: mizdebsk -- java-devel mailing list java-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/java-devel
-- java-devel mailing list java-devel@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/java-devel
On 11 July 2013 12:22, Matthias Wessendorf matzew@redhat.com wrote:
Hi,
imagine there is a maven build, that produces a WAR file.
Would it be possible to "stick" the WAR into an RPM ?
Someone might since have maven-ized fpm;
https://github.com/jordansissel/fpm http://www.semicomplete.com/blog/tags/deb
but if that is not the case then wrapping "fpm" in antrun has been my tactic;
+ <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <id>izpack</id> + <phase>package</phase> + <configuration> + <tasks> + <echo message="Starting Ant izPack build ..." /> + <property name="plugin_classpath" refid="maven.plugin.classpath"/> nux/gtk/x86_64/ -a amd64 -n chefclipse --prefix /usr/lib/chefclipse -p target/chefclipse_1.0_amd64.deb ." /> + </exec> + <exec executable="fpm"> + <arg line="-s dir -t deb -C target/products/org.limepepper.chefclipse.product/linux/gtk/x86/ -a i386 -n chefclipse --prefix /usr/lib/chefclipse -p target/chefclipse_1.0_i386.deb ." /> + </exec> + <exec executable="fpm"> + <arg line="-s dir -t rpm -C target/products/org.limepepper.chefclipse.product/linux/gtk/x86_64/ -a x86_64 -n chefclipse --prefix /usr/lib/chefclipse -p target/chefclipse_1.0_amd64.rpm ." /> + </exec> + <exec executable="fpm"> + <arg line="-s dir -t rpm -C target/products/org.limepepper.chefclipse.product/linux/gtk/x86/ -a i686 -n chefclipse --prefix /usr/lib/chefclipse -p target/chefclipse_1.0_i686.rpm ." /> + </exec> + </tasks> + </configuration> + <goals> + <goal>run</goal> + <goal>run</goal> + </goals> + </execution> + </executions>
Tom,
just found this:
https://github.com/ajmfulcher/fpm-maven-plugin
I will try that one later
-M
----- Original Message -----
From: "Tom Hodder" tom@limepepper.co.uk To: "Matthias Wessendorf" matzew@redhat.com Cc: java-devel@lists.fedoraproject.org Sent: Thursday, July 11, 2013 1:36:07 PM Subject: Re: [fedora-java] Turning a WAR file into a RPM ?
On 11 July 2013 12:22, Matthias Wessendorf matzew@redhat.com wrote:
Hi,
imagine there is a maven build, that produces a WAR file.
Would it be possible to "stick" the WAR into an RPM ?
Someone might since have maven-ized fpm;
https://github.com/jordansissel/fpm http://www.semicomplete.com/blog/tags/deb
but if that is not the case then wrapping "fpm" in antrun has been my tactic;
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>izpack</id>
<phase>package</phase>
<configuration>
<tasks>
<echo message="Starting Ant izPack build ..." />
<property name="plugin_classpath"
refid="maven.plugin.classpath"/> nux/gtk/x86_64/ -a amd64 -n chefclipse --prefix /usr/lib/chefclipse -p target/chefclipse_1.0_amd64.deb ." />
</exec>
<exec executable="fpm">
<arg line="-s dir -t deb -C
target/products/org.limepepper.chefclipse.product/linux/gtk/x86/ -a i386 -n chefclipse --prefix /usr/lib/chefclipse -p target/chefclipse_1.0_i386.deb ." />
</exec>
<exec executable="fpm">
<arg line="-s dir -t rpm -C
target/products/org.limepepper.chefclipse.product/linux/gtk/x86_64/ -a x86_64 -n chefclipse --prefix /usr/lib/chefclipse -p target/chefclipse_1.0_amd64.rpm ." />
</exec>
<exec executable="fpm">
<arg line="-s dir -t rpm -C
target/products/org.limepepper.chefclipse.product/linux/gtk/x86/ -a i686 -n chefclipse --prefix /usr/lib/chefclipse -p target/chefclipse_1.0_i686.rpm ." />
</exec>
</tasks>
</configuration>
<goals>
<goal>run</goal>
<goal>run</goal>
</goals>
</execution>
</executions>
java-devel@lists.fedoraproject.org