diff --git a/README.md b/README.md index f8f55e2..8e8bc8f 100644 --- a/README.md +++ b/README.md @@ -71,24 +71,41 @@ Build & smoke test can be executed via command-line by calling: **mvn clean inst ## Updating Saxon Version -There is bash script '[saxon-update.sh](https://github.com/svanteschubert/Saxon-HE-enhanced-accuracy/blob/accuracy-feature/saxon-update.sh)', which download the latest Saxon from Maven and rebase our changes on top of it. Two variables of next & current version of Saxon needs to be adopted. +There is bash script '[saxon-update.sh](https://github.com/svanteschubert/Saxon-HE-enhanced-accuracy/blob/accuracy-feature/saxon-update.sh)', which download the specified Saxon-HE version [from Maven](https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/) and rebase our changes on top of it. + +1. Two variables of next & current version of Saxon needs to be adopted (see [Maven for latest version](https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/)). +1. Sometimes there might be merge conflicts if Saxon changed a line we are adopting (the script will stop). + In this case the last three lines (change of version in pom.xml and its commit) have to be done manually. +1. Test if the sources build & our test runs without error (there are errors in JavaDoc nevermind). +1. Tag manually the latest commit to trigger the GitHub automatic release deployment, see chapter GitHub Actions below.
+ **git tag -sm **
+ e.g. "*git tag -sm v10.6 v10.6*" # using -s to sign the tag & -m is taking the next parameter as message + ## Git Branches -1. **accuracy-feature** (main branch)
- Contains the script and latest changes should be worked here. -2. **saxon-upstream**
+1. **accuracy-feature** (our feature branch - our feature on top of the Saxon functionality) - ***we only commit to this branch!***
+ Our feature branch that will be continously updated. + Contains the script and everything on top of existing Saxon. + Will be rebased on top of the SAXON sources (saxon-upstream). +1. **saxon-upstream** (automatic generated - don't touch)
+ As Saxon is not available on GitHub we need to create the sources from the Maven source & binary JAR (downloaded, extracted and normalized (dos2unix) via our bash script) + Only the Java sources of Saxon (without the pom.xml resulting into continous merge conflicts (e.g. version number changes)). The required parts of the Maven Saxon sources and binaries JAR are being added on top of this branch. -3. **SAXON-HE-v<VERSION>**
- Branch with original Saxon functionality. Extends the saxon-upstream of Saxon source & binary JARs with the Saxon pom.xml from Maven. Including commits to allow the Saxon sources to be able to build. -4. **SAXON-HE-accuracy-v<VERSION>**
- Previous version of our functionality based on a previous SAXON version. -5. **prototyping**
+1. **SAXON-HE-v<VERSION>** (original Saxon sources - ***could be used for other features on top of Saxon***)
+ Branch with original Saxon functionality. + Forks the saxon-upstream of Saxon source & binary JARs with adding first the original Saxon pom.xml also downloaded from Maven. + With an additional commit overwriting this pom.xml with our feature branch pom.xml to allow the Saxon sources to be able to build. +1. **SAXON-HE-accuracy-v<VERSION>** (our feature-enriched Saxon sources - ***could be used for maintenance***)
+This branch provides the maintenance branch of our enriched Saxon sources. +As we are rebasing our feature branch (accuracy-feature) always on top of the saxon-sources (saxon-upstream) all commits will get new hashes and the original branch (and commits) would get lost. +1. **prototyping** (deprecated (pure historical) - don't touch)
Initial work before it was later refactored to be automated by bash script 'saxon-update.sh'. -6. **basics**
+1. **basics** (deprecated (pure historical) - don't touch)
Branch the inital bash script was being started. ## GiHub Actions + There are two GitHub Actions 1. [Build](https://github.com/svanteschubert/Saxon-HE-enhanced-accuracy/blob/accuracy-feature/.github/workflows/maven.yml): Triggered by every push or pull-request on the default branch. diff --git a/pom.xml b/pom.xml index 893c80d..c64c189 100644 --- a/pom.xml +++ b/pom.xml @@ -1,307 +1,298 @@ - - 4.0.0 - net.sf.saxon - Saxon-HE-accuracy - 10.7 - jar - Saxon-HE - enhanced accuracy using decimal-based floating-point arithmetic - The XSLT Processor is using the far more accurate decimal-based floating-point arithmetic and half-up rounding. Reason was the European Norm 16931: where arithmetic should come same results and VAT has to be rounded often by national law half-up. - http://www.saxonica.com/ - - - Mozilla Public License Version 2.0 - http://www.mozilla.org/MPL/2.0/ - repo - - - - scm:svn:https://dev.saxonica.com/repos/archive/opensource/ - scm:svn:https://dev.saxonica.com/repos/archive/opensource/ - https://dev.saxonica.com/repos/archive/opensource/ - - - - - mike - Michael Kay - mike@saxonica.com - - - ond1 - O'Neil Delpratt - oneil@saxonica.com - - - debbie - Debbie Lockett - debbie@saxonica.com - - - john - John Lumley - john@saxonica.com - - - norm - Norman Walsh - norm@saxonica.com - - - - svanteschubert - Svante Schubert - Svante.Schubert@gmail.com - - - - UTF-8 - false - false - false - yyyy-MM-dd'T'HH:mm:ss - 1.8 - 1.8 - - - Saxon Community - https://saxonica.plan.io/projects/saxon - - 1999 - - - User List - saxon-help@lists.sourceforge.net - http://sourceforge.net/mailarchive/forum.php?forum_name=saxon-help - - + + + 4.0.0 + net.sf.saxon + Saxon-HE-accuracy + 10.7 + jar + Saxon-HE - enhanced accuracy using decimal-based floating-point arithmetic + The XSLT and XQuery Processor is using the far more accurate decimal-based floating-point arithmetic and half-up rounding. Reason was the European Norm 16931: where arithmetic should come same results and VAT has to be rounded often by national law half-up. + http://www.saxonica.com/ + 1999 + + Saxonica + https://www.saxonica.com/ + + + + Mozilla Public License Version 2.0 + http://www.mozilla.org/MPL/2.0/ + repo + + + + + + mike + Michael Kay + mike@saxonica.com + + + ond1 + O’Neil Delpratt + oneil@saxonica.com + + + debbie + Debbie Lockett + debbie@saxonica.com + + + john + John Lumley + john@saxonica.com + + + norm + Norman Walsh + norm@saxonica.com + + + + svanteschubert + Svante Schubert + Svante.Schubert@gmail.com + + + + scm:git:https://saxonica.plan.io/projects/saxonmirrorhe/repository + scm:git:https://saxonica.plan.io/projects/saxonmirrorhe/repository + https://saxonica.plan.io/projects/saxonmirrorhe/repository + + + Saxon Community + https://saxonica.plan.io/projects/saxon + + + false + yyyy-MM-dd'T'HH:mm:ss + UTF-8 + false + false + 1.8 + 1.8 + + + + User List + saxon-help@lists.sourceforge.net + http://sourceforge.net/mailarchive/forum.php?forum_name=saxon-help + + + + + org.jdom + jdom2 + 2.0.6.1 + true + + + xom + xom + 1.3.9 + true + + + + com.ibm.icu + icu4j + 73.1 + true + + + org.dom4j + dom4j + 2.1.4 + true + + + jline + jline + 2.14.6 + true + + + + + org.apache.ws.commons.axiom + axiom-impl + 1.4.0 + true + + + xml-resolver + xml-resolver + 1.2 + true + + + + org.jetbrains + annotations + 23.1.0 + + + org.junit.jupiter + junit-jupiter + test + + + - - org.jdom - jdom2 - 2.0.6.1 - true - - - com.io7m.xom - xom - 1.2.10 - true - - - - com.ibm.icu - icu4j - 73.1 - true - - - org.dom4j - dom4j - 2.1.4 - true - - - xml-resolver - xml-resolver - 1.2 - true - - - org.apache.ws.commons.axiom - axiom-impl - 1.4.0 - true - - - jline - jline - 2.14.6 - true - - - - - org.jetbrains - annotations - 23.1.0 - - - org.junit.jupiter - junit-jupiter - test - + + org.junit + junit-bom + 5.9.3 + pom + import + - - - - org.junit - junit-bom - 5.9.3 - pom - import - - - - - Saxonica - http://www.saxonica.com - - - org.sonatype.oss - oss-parent - 9 - - - - - - - maven-compiler-plugin - 3.11.0 - - - maven-surefire-plugin - 3.1.0 - - - - - - - - ${project.version} - ${build.timestamp} - - ${skipTests} - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.3.0 - - - - net.sf.saxon.Transform - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.5.0 - - ${project.artifactId} - - http://docs.oracle.com/javase/8/docs/api/ - http://xerces.apache.org/xerces-j/apiDocs/ - - true - ${project.artifactId} API v${project.version} - ${project.scm.url} - - - - attach-javadocs - - jar - - - ${javadoc.opts} - - - - - - maven-source-plugin - 3.3.0 - - - attach-sources - - jar - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - 3.1.0 - - - - ${project.version} - - - - - failsafe-it - - integration-test - verify - - - - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.5.0 - - ${project.artifactId} - 512m - 1024m - - http://download.oracle.com/javase/8/docs/api/ - http://xerces.apache.org/xerces-j/apiDocs/ - - true - ${project.artifactId} API v${project.version} - ${project.scm.url} - - - - - org.apache.maven.plugins - maven-failsafe-plugin - 3.1.0 - - - integration-tests - - report-only - - - failsafe-report - - - - - - + + + org.sonatype.oss + oss-parent + 9 + + + + + + maven-compiler-plugin + 3.11.0 + + + maven-surefire-plugin + 3.1.0 + + + + + + + + ${project.version} + ${build.timestamp} + + ${skipTests} + + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.3.0 + + + + net.sf.saxon.Transform + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.5.0 + + ${project.artifactId} + + http://docs.oracle.com/javase/8/docs/api/ + http://xerces.apache.org/xerces-j/apiDocs/ + + true + ${project.artifactId} API v${project.version} - ${project.scm.url} + + + + attach-javadocs + + jar + + + ${javadoc.opts} + + + + + + maven-source-plugin + 3.3.0 + + + attach-sources + + jar + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + 3.1.0 + + + + ${project.version} + + + + + failsafe-it + + integration-test + verify + + + + + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.5.0 + + ${project.artifactId} + 512m + 1024m + + http://download.oracle.com/javase/8/docs/api/ + http://xerces.apache.org/xerces-j/apiDocs/ + + true + ${project.artifactId} API v${project.version} - ${project.scm.url} + + + + + org.apache.maven.plugins + maven-failsafe-plugin + 3.1.0 + + + integration-tests + + report-only + + + failsafe-report + + + + + + diff --git a/saxon-update.sh b/saxon-update.sh index 59eeced..3a01fa6 100755 --- a/saxon-update.sh +++ b/saxon-update.sh @@ -6,9 +6,9 @@ set -e -v # !!! PLEASE UPDATE BOTH VARIABLES!!! # !! -> 1. Version number of the Saxon release to be downloaded/merged with! -SAXON_NEXT_VERSION="10.7" # 10.6 is being omitted as it has no Java sources within its Maven source ZIP +SAXON_NEXT_VERSION="10.8" # !! -> 2. Version number of the Saxon release currently used to add feature branch before rebase! -SAXON_CURRENT_VERSION="10.5" +SAXON_CURRENT_VERSION="10.7" # Do not change below the line... @@ -44,7 +44,7 @@ wget https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/${SAXON_NEXT_VERSION}/ # extract zip/jar - avoiding any log output by '> /dev/null' jar -xf Saxon-HE-${SAXON_NEXT_VERSION}-sources.jar > /dev/null rm Saxon-HE-${SAXON_NEXT_VERSION}-sources.jar -rm -rf ./META-INF ## signed hashes will be removed, manifest.mf replaced +rm -rf ./META-INF ## contains mostly signed hashes (no need as we are breaking the signs by patching Saxon therefore removed), manifest.mf will be replaced # Source Code Normalization: Trying to avoid the common Windows/Linux whitespace problems find . -type f | xargs dos2unix -q cd ../../.. @@ -79,17 +79,13 @@ cd ../../.. git add . # The echo absorts the error if there is nothing to commit git commit -am"Saxon ${SAXON_NEXT_VERSION}: Overtaking from the Maven binary JAR all none-class files." || echo "No changes to commit on new binaries" -# SAXON files represented by this branch should be functionally equal to official Saxon deliverable (without signing) -# git checkout -b ${UPSTREAM_BRANCH}-v${SAXON_NEXT_VERSION} +# SAXON files represented by this branch should be functionally equal to official Saxon deliverable (without signing) but pom.xml is missing - -### UPDATE-SAXON-3: GET SAXON POM FROM "MAVEN POM" -## Checking out existing branch locally for later git show command, otherwise error "fatal: invalid object name '${SAXON_CURRENT_VERSION}' -git checkout Saxon-HE-v${SAXON_CURRENT_VERSION} +### UPDATE-SAXON-3: GET SAXON POM FROM "MAVEN POM" (own branch) ## Not able to build via Saxon Maven pom.xml - Saxon is build originally by ANT # Creating new branch for Saxon with the pom.xml to avoid merge conflicts -git checkout -b Saxon-HE-v${SAXON_NEXT_VERSION} +git checkout Saxon-HE-pom.xml-only wget https://repo1.maven.org/maven2/net/sf/saxon/Saxon-HE/${SAXON_NEXT_VERSION}/Saxon-HE-${SAXON_NEXT_VERSION}.pom # -f gives no error if no pom.xml exists rm -f pom.xml @@ -99,25 +95,27 @@ git add . # The echo absorts the error if there is nothing to commit git commit -m"Saxon ${SAXON_NEXT_VERSION} original pom.xml: Overtaking from Maven repository the pom.xml." || echo "No changes to commit on pom.xml" +### UPDATE-SAXON-4: FORK SAXON UPSTREAM as RELEASE branch and update pom.xml (original and building one from feature branch on top) +git checkout ${UPSTREAM_BRANCH} +git checkout -b Saxon-HE-v${SAXON_NEXT_VERSION} +git show Saxon-HE-pom.xml-only:pom.xml > pom.xml +git add . +git commit -m"Saxon ${SAXON_NEXT_VERSION} original pom.xml: Overtaking from Maven repository the pom.xml." || echo "No changes to commit on pom.xml" # Git-branch-copy: Overwriting the incomplete saxon pom.xml with our new pom.xml from the feature branch (to avoid rebase conflicts) -git show Saxon-HE-v${SAXON_CURRENT_VERSION}:pom.xml > pom.xml +git show ${FEATURE_BRANCH}:pom.xml > pom.xml # Adjusting build version according to above SAXON_NEXT_VERSION # sed flag -i for in-place editing, substitute line 6 - NOTE: using ' for literal and " for variable sed -i 's/'"${SAXON_CURRENT_VERSION}"'<\/version>/'"${SAXON_NEXT_VERSION}"'<\/version>/g' pom.xml git add . # The echo absorts the error if there is nothing to commit -git commit -am"Saxon ${SAXON_NEXT_VERSION} with buildable pom.xml." || echo "No changes to commit on pom.xml" - +git commit -am"Saxon ${SAXON_NEXT_VERSION} with our buildable pom.xml." || echo "No changes to commit on pom.xml" ### REBASE-FEATURE-BRANCH: Rebase to latest Saxon release! - -## Adding release branch for existing SAXON version -git checkout ${FEATURE_BRANCH} -git checkout -b Saxon-HE-accuracy-v${SAXON_CURRENT_VERSION} - ## Trying to rebase our changes on top of latest SAXON release git checkout ${FEATURE_BRANCH} +## Add last version branch before rebasing the new SAXON version and by git rebase lossing all existing commits (new hash by rebase) +git checkout -b Saxon-HE-accuracy-v${SAXON_CURRENT_VERSION} git rebase ${UPSTREAM_BRANCH} sed -i 's/'"${SAXON_CURRENT_VERSION}"'<\/version>/'"${SAXON_NEXT_VERSION}"'<\/version>/g' pom.xml git add .