debian swirl logo

Back to the packages list jetty8

#!/usr/bin/make -f

include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/javahelper.mk
include /usr/share/cdbs/1/class/maven.mk

JAVA_HOME := /usr/lib/jvm/default-java

DEB_MAVEN_INSTALL_TARGET := 
DEB_MAVEN_INSTALL_DOC_TARGET := 
DEB_MAVEN_DOC_TARGET := javadoc:aggregate
DEB_MAVEN_ARGS := -P-aggregates -P-osgi

LIBJETTY_JARS := continuation deploy http io jaspi jmx jsp nested \
  overlay-deployer policy rewrite security server servlet servlets start util \
  webapp websocket xml


LIBJETTY_EXTRA_JARS := ajp annotations client jndi monitor plus

# Some java sources contain UTF-8 characters, build fails with C locale
export LC_ALL= C.UTF-8

install/libjetty8-java:: libjetty8-java-mh-install
	version= $(wildcard debian/libjetty8-java/usr/share/maven-repo/org/eclipse/jetty/jetty-server/8*); \
	version= $$(basename $$version); \
		for lib in $(LIBJETTY_JARS); do \
		mh_installjar -plibjetty8-java --java-lib --usj-name= jetty8-$$lib \
			    jetty-$$lib/pom.xml jetty-$$lib/target/jetty-$$lib-*.jar; \
		if [ $$lib = "start" ]; then \
			    continue; \
			fi; \
		jar= jetty-$$lib-$$version.jar; \
		jar8= jetty8-$$lib-$$version.jar; \
			dh_link -plibjetty8-java usr/share/java/$$jar8 usr/share/jetty8/lib/$$jar; \
		done; \
		dh_link -plibjetty8-java usr/share/java/jetty8-start-$$version.jar usr/share/jetty8/start.jar

install/libjetty8-extra-java:: libjetty8-extra-java-mh-install
	version= $(wildcard debian/libjetty8-extra-java/usr/share/maven-repo/org/eclipse/jetty/jetty-ajp/8*); \
	version= $$(basename $$version); \
		for lib in $(LIBJETTY_EXTRA_JARS); do \
		mh_installjar -plibjetty8-extra-java --java-lib --usj-name= jetty8-$$lib \
			    jetty-$$lib/pom.xml jetty-$$lib/target/jetty-$$lib-*.jar; \
		if [ $$lib = "monitor" ]; then \
			    continue; \
			fi; \
		jar= jetty-$$lib-$$version.jar; \
		jar8= jetty8-$$lib-$$version.jar; \
			dh_link -plibjetty8-extra-java usr/share/java/$$jar8 usr/share/jetty8/lib/$$jar; \
		done; \
		dh_link -plibjetty8-extra-java usr/share/java/jetty8-monitor-$$version.jar usr/share/jetty8/lib/monitor/jetty-monitor.jar; \
	# Add also test-jetty-servlet \
	mh_installjar -plibjetty8-extra-java --java-lib --usj-name= jetty8-test-servlet \
		    test-jetty-servlet/pom.xml test-jetty-servlet/target/test-jetty-servlet-*.jar; \
		dh_link -plibjetty8-extra-java usr/share/java/jetty8-test-servlet-$$version.jar \
		    usr/share/jetty8/lib/test-jetty-servlet-$$version.jar;

install/libjetty8-java-doc::
		mv target/site/apidocs target/site/api
		dh_install -p libjetty8-java-doc

%-mh-install:
		mh_install -p$(patsubst %-mh-install,%,$@)

Builds:

jetty8
java servlet engine and webserver
libjetty8-extra-java
java servlet engine and webserver -- extra libraries
libjetty8-java-doc
javadoc for the jetty api
libjetty8-java
java servlet engine and webserver -- core libraries