libjetty8 breaking jar from maven-build
Kjetil Flovild-Midtlie
kjetil at docstream.no
Sun Nov 24 12:37:15 UTC 2013
BACKGROUND:
In order to use a maven-buildt-jar directly on an ubuntu server,
I need to only change the prefix in my classpath part (manifest)
and strip out version numbers like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<addMavenDescriptor/>
<manifest>
<mainClass>no.docstream.Main</mainClass>
<addClasspath>true</addClasspath>
<classpathPrefix>/usr/share/java/</classpathPrefix>
<classpathLayoutType>custom</classpathLayoutType>
<customClasspathLayout>$${artifact.artifactId}.$${artifact.extension}</customClasspathLayout>
</manifest>
</archive>
</configuration>
</plugin>
HOWEVER if i need to use jetty8 jars it gets painfull ::
In the "maven universe" THERE ISN'T any jars named jetty8-*.jar ,
and some jetty artifacts are also tied to a jar named javax.servlet.jar (eql to servlet-api-3.0.jar)
..so in order so make my jetty jar work i need these lines i a postinst script:
---------------
#!/bin/bash
# jetty8 debian name issue fixxers
# Fix issue 1
# servlet-api ...
JAVAX=javax.servlet.jar
if [ ! -h $JAVAX ]
then
ln -s servlet-api-3.0.jar $JAVAX
echo -e "\n$JAVAX softlinked.\n"
else
echo -e "\n$JAVAX link in place already.\n"
fi
# Fix issue 2
# each jetty8-* must be jetty-*
for f in $(ls | grep jetty8)
do
NEW_LINK=$(echo $f | sed -e 's/jetty8/jetty/')
if [ ! -h $NEW_LINK ]
then
ln -s $f $NEW_LINK
echo "$NEW_LINK softlinked."
else
echo "$NEW_LINK link in place already."
fi
done
---------------
Could this script be considered included in libjetty8-java?
Kjetil Flovild-Midtlie
Dev.
Docstream as
Hvamstubben 17, Norway-2013 Skjetten
Mobile (+47) 92 09 56 15
Office (+47) 48 11 12 00
Fax (+47) 63 84 08 12
www.docstream.no
____________________________
More information about the pkg-java-maintainers
mailing list