Description: Needed changes to allow building in Debian
Author: Miguel Landaeta <miguel@miguel.cc>
Bug-Debian: http://bugs.debian.org/575667
Forwarded: not-needed
Last-Update: 2010-06-15
--- mojarra-2.0.2.orig/build.xml
+++ mojarra-2.0.2/build.xml
@@ -86,9 +86,12 @@
<delete dir="${basedir}/build"/>
<delete dir="${dist.dir}"/>
<call.modules target="clean"/>
+ <!-- these directories don't exist
<ant dir="jsf-demo" target="clean" />
<ant dir="updatecenter2" target="updatecenter2.clean" />
+ -->
<antcall target="remove.netbeans.186761.hack" />
+ <delete dir="target"/>
</target>
<target name="modules.clean">
@@ -361,10 +364,12 @@
basedir="${basedir}/samples"/>
<delete dir="samples"/>
+ <!--
<installerBuilder
classFile="${dist.dir}/mojarra-samples.class"
licenseFile="${LICENSEFILE}"
zipFile="${basedir}/mojarra-samples.zip"/>
+ -->
</target>
<target name="updatecenter2" depends="main">
--- /dev/null
+++ mojarra-2.0.2/build.properties
@@ -0,0 +1 @@
+container.name=glassfish
--- mojarra-2.0.2.orig/jsf-ri/mojarra-jsf-impl.bnd
+++ mojarra-2.0.2/jsf-ri/mojarra-jsf-impl.bnd
@@ -49,6 +49,8 @@ Import-Package: javax.faces.*,javax.serv
javax.xml.*,org.w3c.dom.*, \
com.sun.enterprise.*;resolution:=optional, \
groovy.*;resolution:=optional,\
+ org.mortbay.jetty.webapp;resolution:=optional, \
+ org.mortbay.jetty.handler;resolution:=optional, \
org.mortbay.jetty.annotations;resolution:=optional, \
org.mortbay.jetty.plus.annotation;resolution:=optional, \
org.apache.*;resolution:=optional, \
@@ -57,4 +59,4 @@ Include-Resource: META-INF=build/classes
Bundle-Version: @osgi.version@
Bundle-Name: Mojarra JSF Implementation @impl.version@
Bundle-Description: Mojarra JSF Implementation (javax.faces/@spec.version@) @impl.version@
-Bundle-SymbolicName: javax.faces/com.sun.faces.mojarra-jsf-impl
+Bundle-SymbolicName: com.sun.faces.mojarra-jsf-impl
--- mojarra-2.0.2.orig/jsf-ri/build.xml
+++ mojarra-2.0.2/jsf-ri/build.xml
@@ -57,7 +57,7 @@
<property name="build.classes.dir" value="${build.dir}/classes"/>
<property name="build.generate.dir" value="${build.dir}/generate"/>
<property name="build.generate.tld.dir"
- value="${build.generate.dir}/conf/share"/>
+ value="../target/generate/conf/share"/>
<!-- The base directory for binary dependency libs under local version
control -->
@@ -80,7 +80,8 @@
<property name="dependency.base.dir" value="${jsf.build.home}/dependencies"/>
<property name="dependency.jar.dir" value="${dependency.base.dir}/jars"/>
- <property name="yuicompressor.jar" value="${dependency.jar.dir}/yuicompressor.jar"/>
+ <property name="yuicompressor.jar.dir" value="/usr/share/yui-compressor"/>
+ <property name="yuicompressor.jar" value="${yuicompressor.jar.dir}/yui-compressor.jar"/>
<property name="build.javadocs.dir" value="${build.dir}/javadocs"/>
<property name="javadoc.private" value="true"/>
<property name="javadoc.protected" value="false"/>
@@ -278,9 +279,12 @@
description="Just compile the classes">
<!-- Run javac through everything -->
- <jsf.javac srcdir="${source.dir}:${build.generate.dir}"
+ <jsf.javac srcdir="${source.dir}:${build.generate.dir}:../target/generate"
destdir="${build.classes.dir}"
- excludes="**/ManagedBeanFactoryImpl.java">
+ excludes="**/ManagedBeanFactoryImpl.java,**/FacesInitializer.java">
+ <!-- src/com/sun/faces/config/FacesInitializer.java is
+ excluded because it requires Servlet API 3.0 and that is
+ not available in Debian yet -->
<classpath>
<path refid="impl.compile.classpath"/>
</classpath>
@@ -343,8 +347,10 @@
toDir="${build.classes.dir}/com/sun/faces"/>
<copy file="conf/xslt/facelets1_0-2_0toSchema.xsl"
toDir="${build.classes.dir}/com/sun/faces"/>
+ <!--
<unzip src="${jsf.build.home}/lib/injectionproviders.jar"
dest="${build.classes.dir}"/>
+ -->
<copy todir="${build.classes.dir}/META-INF">
<fileset dir="${conf.share.dir}">
<include name="jsf_core.tld"/>
@@ -355,6 +361,16 @@
</fileset>
</copy>
+ <!-- copy missing classes to api build directory to regenerate jsf-api.jar -->
+ <copy todir="${jsf.build.home}/jsf-api/build/classes/javax/faces/component">
+ <fileset dir="${build.classes.dir}/javax/faces/component">
+ <include name="html/*.class"/>
+ </fileset>
+ </copy>
+
+ <!-- since those classes don't belong in jsf-impl.jar, they are removed -->
+ <delete dir="${build.classes.dir}/javax"/>
+
</target>
<target name="clean"
@@ -503,7 +519,7 @@
</target>
<target name="test"
- depends="update,init.test,run.junit.test,run.cactus.test,run.systest,run.systest-per-webapp"
+ depends="init.test,run.junit.test,run.cactus.test,run.systest,run.systest-per-webapp"
description="Run all unit and system tests"/>
<target name="init.test">
@@ -588,7 +604,7 @@
<delete file="tmp.bnd"/>
</target>
- <target name="main" depends="update,jars"/>
+ <target name="main" depends="jars"/>
<target name="create.runtime.config">
<!-- in="${build.dir}/classes/com/sun/faces/standard-html-renderkit.xml"-->
--- mojarra-2.0.2.orig/common/ant/common.xml
+++ mojarra-2.0.2/common/ant/common.xml
@@ -39,31 +39,35 @@
<project name="JSF Common" basedir="." xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<import file="${jsf.build.home}/common/ant/${container.name}/container.xml"/>
- <import file="${jsf.build.home}/common/ant/dependencies.xml"/>
+ <!--<import file="${jsf.build.home}/common/ant/dependencies.xml"/>-->
<import file="${jsf.build.home}/common/ant/maven.xml"/>
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement
- location="${jsf.build.home}/common/lib/ant-contrib.jar"/>
+ location="/usr/share/java/ant-contrib.jar"/>
</classpath>
</taskdef>
<taskdef resource="aQute/bnd/ant/taskdef.properties">
<classpath>
<pathelement
- location="${jsf.build.home}/common/lib/bnd-0.0.249.jar"/>
+ location="/usr/share/java/bnd.jar"/>
</classpath>
</taskdef>
+ <!--
<taskdef name="installerBuilder" classname="org.jvnet.poormans_installer.builder.BuilderTask">
<classpath>
<pathelement location="${jsf.build.home}/common/lib/installer-builder.jar"/>
<pathelement location="${jsf.build.home}/common/lib/sfx4j-1.0.jar"/>
</classpath>
</taskdef>
+ -->
+ <!--
<path id="maven-ant-tasks.classpath" path="${jsf.build.home}/common/lib/maven-ant-tasks-2.0.10.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath" />
+ -->
<!-- Setup the time properties for use with the project -->
@@ -139,10 +143,11 @@
</artifact:dependencies>
</target>
- -->
<condition property="maven.repo.local" value="${maven.repo.local}" else="${user.home}/.m2/repository">
<isset property="maven.repo.local"/>
</condition>
+ -->
+ <!--
<artifact:localRepository id="local.repository" path="${maven.repo.local}"/>
<artifact:remoteRepository id="jboss.repo" url="http://repository.jboss.com/maven2/"/>
@@ -165,9 +170,15 @@
<remoteRepository refid="j.n.repo"/>
<remoteRepository refid="gf.repo"/>
<remoteRepository refid="gf.nexus.repo"/>
- <remoteRepository refid="jboss.repo"/> <!-- needed for validation-api -->
+ <remoteRepository refid="jboss.repo"/>
</artifact:dependencies>
-
+ -->
+
+ <path id="compile.path">
+ <fileset dir="/" includesfile="${jsf.build.home}/debian/classpath-debian"/>
+ </path>
+
+ <!--
<artifact:dependencies filesetId="commons.filepath" pathId="commons.path">
<dependency groupId="commons-collections" artifactId="commons-collections" version="2.1.1"/>
<dependency groupId="commons-digester" artifactId="commons-digester" version="1.5"/>
@@ -186,6 +197,7 @@
<localRepository refid="local.repository"/>
<remoteRepository refid="gf.nexus.repo"/>
</artifact:dependencies>
+ -->
<!-- Test classpaths that are used in multiple places within the project -->
<path id="junit.classpath">
@@ -227,7 +239,7 @@
</path>
<path id="apache.commons.classpath">
- <path refid="commons.path"/>
+ <!--<path refid="commons.path"/>-->
</path>
<!-- Common Targets -->
--- mojarra-2.0.2.orig/jsf-api/mojarra-jsf-api.bnd
+++ mojarra-2.0.2/jsf-api/mojarra-jsf-api.bnd
@@ -55,4 +55,4 @@ Include-Resource: META-INF=build/classes
Bundle-Version: @osgi.version@
Bundle-Name: Mojarra JSF API Implementation @impl.version@
Bundle-Description: Mojarra JSF API (javax.faces/@spec.version@) @impl.version@
-Bundle-SymbolicName: javax.faces/com.sun.faces.mojarra-jsf-api
+Bundle-SymbolicName: javax.faces
--- mojarra-2.0.2.orig/jsf-api/build.xml
+++ mojarra-2.0.2/jsf-api/build.xml
@@ -769,7 +769,7 @@ javax.faces.level=ALL
Main target
===================================================================
-->
- <target name="main" depends="update,jars"
+ <target name="main" depends="jars"
description="Compile API classes and build JAR file"/>
<!--
--- mojarra-2.0.2.orig/jsf-tools/conf/HtmlBasicTaglib21.properties
+++ mojarra-2.0.2/jsf-tools/conf/HtmlBasicTaglib21.properties
@@ -91,10 +91,10 @@ taglib.uri=http://java.sun.com/jsf/html
taglib.file.name=html_basic.tld
target.package=com.sun.faces.taglib.html_basic
renderkit.id=HTML_BASIC
-base.output.dir=build/generate
+base.output.dir=../target/generate
#OPTIONAL PROPERTIES
-taglib.include=build/TAG-DEF-21.txt
+taglib.include=../jsf-tools/conf/TAG-DEF-21.txt
taglib.description=This tag library contains JavaServer Faces component tags for all\n\
UIComponent + HTML RenderKit Renderer combinations defined in the\n\
JavaServer Faces Specification.