Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

permissions:
contents: read

# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners
# GitHub Actions does not support Docker, PostgreSQL server on Windows, macOS :(

concurrency:
# On master/release, we don't want any jobs cancelled so the sha is used to name the group
# On PR branches, we cancel the job if new commits are pushed
# More info: https://stackoverflow.com/a/68422069/253468
group: ${{ github.ref == 'refs/heads/trunk' && format('ci-main-{0}', github.sha) || format('ci-main-{0}', github.ref) }}
cancel-in-progress: true

jobs:
build:
name: 'Build, Java 8'
runs-on: ubuntu-latest
steps:
- name: 'Checkout xalan-java'
uses: actions/checkout@v3
- name: 'Set up JDK 8'
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 8
- name: 'Build Xalan jars'
run: |
ant jar
- uses: actions/checkout@v3
name: 'Checkout xalan-test'
with:
repository: apache/xalan-test
path: xalan-test
ref: xalan-j_2_7_x
- name: 'Run xalan-test tests'
working-directory: xalan-test
run: |
ant alltest -Dxalan.relpath=../ -Dparserjar=../lib/endorsed/xercesImpl.jar -Dxml-apis.jar=../lib/endorsed/xml-apis.jar
env:
_JAVA_OPTIONS: -XX:+UnlockExperimentalVMOptions -XX:hashCode=2
- id: build_artifacts
run: |
ant fulldist
33 changes: 32 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,33 @@
/bin/
/build/
/build/
/classes/
/.idea/
*.iml
.DS_Store

# We download the dependencies if they are missing
/lib/
/tools/java_cup.jar
/tmp/

# Generated sources
/src/org/apache/xalan/processor/XSLProcessorVersion.java
/src/org/apache/xalan/xsltc/compiler/XPathLexer.java
/src/org/apache/xalan/xsltc/compiler/XPathParser.java
/src/org/apache/xalan/xsltc/compiler/sym.java
/xdocs/sources/xalan/DONE
/xdocs/sources/xalan/XSLTCDONE
/xdocs/style/graphics/
/xdocs/style/loader.xml
/xdocs/style/resources/
/xdocs/style/stylesheets/any2header.xsl
/xdocs/style/stylesheets/any2project.xsl
/xdocs/style/stylesheets/book2group.xsl
/xdocs/style/stylesheets/book2project.xsl
/xdocs/style/stylesheets/changes2document.xsl
/xdocs/style/stylesheets/context2footer.xsl
/xdocs/style/stylesheets/context2label.xsl
/xdocs/style/stylesheets/directory2project.xsl
/xdocs/style/stylesheets/document2html.xsl
/xdocs/style/stylesheets/faqs2document.xsl
/xdocs/style/stylesheets/group2document.xsl
88 changes: 62 additions & 26 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ $Id$

<!-- Xalan Java directories -->
<!-- <property name="bin.dir" value="./bin"/> -->
<property name="maven.repository.url" value="https://repo1.maven.org/maven2"/>
<property name="build.dir" value="./build"/>
<property name="lib.dir" value="./lib"/>
<property name="endorsed.dir" value="${lib.dir}/endorsed"/>
<mkdir dir="${endorsed.dir}"/>
<property name="samples.dir" value="./samples"/>
<property name="src.dir" value="./src"/>
<property name="tools.dir" value="./tools"/>
Expand All @@ -98,14 +100,18 @@ $Id$
<property name="xsltc.reldir" value="${xalan.reldir}/xsltc"/>

<!-- Jars to run Xalan Java (Interpretive, Compiled, or both) -->
<property name="xmlapis.jar.version" value="1.4.01"/>
<property name="xmlapis.jar.name" value="xml-apis.jar"/>
<property name="xmlapis.jar" value="${endorsed.dir}/${xmlapis.jar.name}"/>
<property name="parser.jar.version" value="2.12.2"/>
<property name="parser.jar.name" value="xercesImpl.jar"/>
<property name="parser.jar" value="${endorsed.dir}/${parser.jar.name}"/>
<property name="bcel.jar.version" value="5.1"/>
<property name="bcel.jar.name" value="BCEL.jar"/>
<property name="bcel.jar" value="${lib.dir}/${bcel.jar.name}"/>
<property name="runtime.jar.name" value="runtime.jar"/>
<property name="runtime.jar" value="${lib.dir}/${runtime.jar.name}"/>
<property name="regexp.jar.version" value="1.2"/>
<property name="regexp.jar.name" value="regexp.jar"/>
<property name="regexp.jar" value="${lib.dir}/${regexp.jar.name}"/>

Expand All @@ -122,8 +128,10 @@ $Id$
<property name="taglet.jar" value="${tools.dir}/${taglet.jar.name}"/>

<!-- Jars to build Xalan Java samples -->
<property name="servlet-api.jar.name" value="servlet-api-2.5.jar"/>
<property name="servlet-api.jar.version" value="2.5"/>
<property name="servlet-api.jar.name" value="servlet-api-${servlet-api.jar.version}.jar"/>
<property name="servlet-api.jar" value="${lib.dir}/${servlet-api.jar.name}"/>
<property name="javaee-api.jar.version" value="5"/>
<property name="javaee-api.jar.name" value="javaee-api-5.0-2.jar"/>
<property name="javaee-api.jar" value="${lib.dir}/${javaee-api.jar.name}"/>
<property name="brazil.jar.name" value="brazil-2.1.jar"/>
Expand Down Expand Up @@ -225,6 +233,42 @@ $Id$
<pathelement location="${build.xalan.jar}" />
<pathelement path="${java.class.path}" />
</path>
<macrodef name="get_from_maven">
<attribute name="groupId"/>
<attribute name="artifactId"/>
<attribute name="dstProperty"/>
<sequential>
<get src="${maven.repository.url}/@{groupId}/@{artifactId}/${@{dstProperty}.version}/@{artifactId}-${@{dstProperty}.version}.jar"
dest="${@{dstProperty}}"
skipexisting="true"
/>
</sequential>
</macrodef>
<target name="thirdparty.jars.download">
<get_from_maven groupId="xml-apis" artifactId="xml-apis" dstProperty="xmlapis.jar"/>
<get_from_maven groupId="xerces" artifactId="xercesImpl" dstProperty="parser.jar"/>
<get_from_maven groupId="bcel" artifactId="bcel" dstProperty="bcel.jar"/>
<get_from_maven groupId="regexp" artifactId="regexp" dstProperty="regexp.jar"/>
<get_from_maven groupId="javaee" artifactId="javaee-api" dstProperty="javaee-api.jar"/>
<get_from_maven groupId="javax/servlet" artifactId="servlet-api" dstProperty="servlet-api.jar"/>

<!-- /build/ is included to the distribution, so we avoid placing more files there -->
<property name="tmp.dir" value="tmp"/>

<!--
See http://www2.cs.tum.edu/projects/cup/install.php
-->
<property name="java_cup.release" value="java-cup-bin-11b-20160615.tar.gz"/>
<mkdir dir="${tmp.dir}/java_cup/bin"/>
<mkdir dir="${tmp.dir}/java_cup/extracted"/>
<get src="http://www2.cs.tum.edu/projects/cup/releases/${java_cup.release}"
dest="${tmp.dir}/java_cup/bin"
skipexisting="true"
/>
<untar src="${tmp.dir}/java_cup/bin/${java_cup.release}" dest="${tmp.dir}/java_cup/extracted" compression="gzip"/>
<copy tofile="${java_cup.jar}" file="${tmp.dir}/java_cup/extracted/java-cup-11b.jar"/>
<copy tofile="${runtime.jar}" file="${tmp.dir}/java_cup/extracted/java-cup-11b-runtime.jar"/>
</target>
<path id="compile.class.path">
<!-- Ensure the selected parser.jar file is used to compile against -->
<pathelement location="${build.classes}" />
Expand Down Expand Up @@ -295,9 +339,10 @@ $Id$
<include name="${dist.file}/build.*"/>
<include name="${dist.file}/commits.xml"/>
<include name="${dist.file}/KEYS"/>
<include name="${dist.file}/readme.html"/>
<include name="${dist.file}/lib/"/>
<include name="${dist.file}/tools/"/>
<include name="${dist.file}/readme.html"/>
<include name="${dist.file}/tools/stylebook-1.0-b3_xalan-2.jar"/>
<include name="${dist.file}/tools/xalan2jdoc.jar"/>
<include name="${dist.file}/tools/xalan2jtaglet.jar"/>
<include name="${dist.file}/samples/"/>
<exclude name="${dist.file}/samples/xalansamples.jar"/>
<exclude name="${dist.file}/samples/xalanservlet.war"/>
Expand All @@ -321,7 +366,7 @@ $Id$
<!-- =================================================================== -->
<!-- Creates output build directories and doc prerequistes -->
<!-- =================================================================== -->
<target name="prepare">
<target name="prepare" depends="thirdparty.jars.download">
<echo message="Project:${Name-in-docs} version:${version} build.xml $Revision$"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.classes}"/>
Expand Down Expand Up @@ -502,7 +547,9 @@ $Id$
</target>

<!-- Generate the XPath lexer sources for xsltc if needed -->
<target name="xsltc.jlex" depends="xsltc.java_cup" unless="xsltc.jlex.not_needed">
<!-- The ASF rules forbid incuding binary files into the source distribution,
so we can't execute this step automatically. -->
<target name="xsltc.jlex" depends="xsltc.java_cup" unless="false"> <!-- xsltc.jlex.not_needed -->
<!-- The third step generates XPathLexer.java. The lexiographical analyser
has to be generated after sym.java, so order is important. -->
<echo message="JLex preparsing"/>
Expand Down Expand Up @@ -844,9 +891,9 @@ $Id$
<!-- Compiles all samples that require extra non-standard components in -->
<!-- order to compile. -->
<!-- =================================================================== -->
<target name="extra.nonstd.samples" depends="xsltc.brazil"/>
<target name="extra.nonstd.samples" depends=""/>

<target name="extra.nonstd.samples.nojardepends" depends="xsltc.brazil.jardepends"/>
<target name="extra.nonstd.samples.nojardepends" depends=""/>

<!-- =================================================================== -->
<!-- Compiles the sample servlet and jars the class files. -->
Expand Down Expand Up @@ -901,7 +948,7 @@ $Id$
<!-- =================================================================== -->
<target name="xsltc.samples" depends="jar,xsltc.samples.nojardepends"/>

<target name="xsltc.samples.nojardepends">
<target name="xsltc.samples.nojardepends" depends="thirdparty.jars.download">
<mkdir dir="${build.samples}"/>
<javac srcdir="${samples.dir}/translets"
classpath="${java.class.path}:${build.xalan.jar}"
Expand Down Expand Up @@ -979,7 +1026,10 @@ $Id$
destdir="${build.samples}/CompiledServlet" excludes="${exclude}"
debug="${build.debug}" bootclasspathref="xslt.boot.class.path"
target="${compiler.target}" source="${compiler.source}">
<classpath location="${servlet-api.jar}"/>
<classpath>
<pathelement location="${servlet-api.jar}"/>
<pathelement location="${build.xalan.jar}"/>
</classpath>
</javac>
<jar jarfile="${build.xsltc.servlet.jar}"
basedir="${build.samples}/CompiledServlet"
Expand Down Expand Up @@ -1331,8 +1381,8 @@ $Id$
<copy file="${build.dir}/xalansamples.jar" todir="${dist.dir}/samples"/>
<copy file="${build.dir}/xalanservlet.war" todir="${dist.dir}/samples"/>
<copy file="${build.dir}/xsltcapplet.jar" todir="${dist.dir}/samples"/>
<copy file="${build.dir}/xsltcbrazil.jar" todir="${dist.dir}/samples"
failonerror="${has.nonstd.parts}"/>
<!-- <copy file="${build.dir}/xsltcbrazil.jar" todir="${dist.dir}/samples"-->
<!-- failonerror="${has.nonstd.parts}"/>-->
<copy file="${build.dir}/xsltcejb.jar" todir="${dist.dir}/samples"/>
<copy file="${build.dir}/xsltcservlet.jar" todir="${dist.dir}/samples"/>

Expand Down Expand Up @@ -1394,7 +1444,6 @@ $Id$
<tar tarfile="${build.dir}/${dist.pkg}-src.tar" >
<tarfileset dir="${build.dir}">
<patternset refid="src-distro"/>
<patternset refid="xsltc-deps-jars"/>
</tarfileset>
</tar>
<gzip src="${build.dir}/${dist.pkg}-src.tar" zipfile="${build.dir}/${dist.pkg}-src.tar.gz"/>
Expand All @@ -1403,7 +1452,6 @@ $Id$
<zip zipfile="${build.dir}/${dist.pkg}-src.zip" >
<fileset dir="${build.dir}">
<patternset refid="src-distro"/>
<patternset refid="xsltc-deps-jars"/>
</fileset>
</zip>
</target>
Expand Down Expand Up @@ -1631,18 +1679,6 @@ $Id$
<include name="${serializer.dist.file}/src/${serializer.reldir}/**/*.java" />
<include name="${serializer.dist.file}/src/${serializer.reldir}/**/*.properties" />
<include name="${serializer.dist.file}/src/${serializer.manifest.basename}" />

<!-- We need Ant in order to run build.xml in the source distribution -->
<include name="${serializer.dist.file}/tools/ant.jar"/>
<include name="${serializer.dist.file}/tools/antRun"/>
<include name="${serializer.dist.file}/tools/antRun.bat"/>

<!-- The serializer needs this jar in order to build -->
<include name="${serializer.dist.file}/xml-apis.jar"/>

<!-- Ant needs an XML parser in order to read in the build.xml, so it
can even do the build ... this is a strange loop ... -->
<include name="${serializer.dist.file}/xercesImpl.jar"/>
</patternset>

<!-- patternset for binary distribution packages ... if needed
Expand Down
Binary file removed lib/BCEL.jar
Binary file not shown.
Binary file removed lib/brazil-2.1.jar
Binary file not shown.
Binary file removed lib/endorsed/xercesImpl.jar
Binary file not shown.
Binary file removed lib/endorsed/xml-apis.jar
Binary file not shown.
Binary file removed lib/javaee-api-5.0-2.jar
Binary file not shown.
Binary file removed lib/regexp.jar
Binary file not shown.
Binary file removed lib/runtime.jar
Binary file not shown.
Binary file removed lib/servlet-api-2.5.jar
Binary file not shown.
Binary file removed tools/ant.jar
Binary file not shown.
9 changes: 0 additions & 9 deletions tools/antRun

This file was deleted.

36 changes: 0 additions & 36 deletions tools/antRun.bat

This file was deleted.

Binary file removed tools/java_cup.jar
Binary file not shown.