You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by jk...@apache.org on 2025/08/15 23:20:10 UTC
(xalan-java) branch XALANJ-2651-XALANTEST updated: It isn't the prettiest, but I have found a way to cleanly build and run ../xalan-test from within the mvn build. That's highly desirable if we're going to ship the testcases with the source archive, since it captures the results of the latest run of the tests as evidence of acceptability. I am not yet addressing how xalan-test gets checked out, other than presumably throwing an error if it hasn't been.
This is an automated email from the ASF dual-hosted git repository.
jkesselm pushed a commit to branch XALANJ-2651-XALANTEST
in repository https://gitbox.apache.org/repos/asf/xalan-java.git
The following commit(s) were added to refs/heads/XALANJ-2651-XALANTEST by this push:
new 468b85f5c It isn't the prettiest, but I have found a way to cleanly build and run ../xalan-test from within the mvn build. That's highly desirable if we're going to ship the testcases with the source archive, since it captures the results of the latest run of the tests as evidence of acceptability. I am not yet addressing how xalan-test gets checked out, other than presumably throwing an error if it hasn't been.
468b85f5c is described below
commit 468b85f5c9a8c991cd6507dafdef7e7ffb7e3e9d
Author: kubycsolutions <ke...@kubyc.solutions>
AuthorDate: Fri Aug 15 19:20:00 2025 -0400
It isn't the prettiest, but I have found a way to cleanly build and run ../xalan-test from within the mvn build. That's highly desirable if we're going to ship the testcases with the source archive, since it captures the results of the latest run of the tests as evidence of acceptability. I am not yet addressing how xalan-test gets checked out, other than presumably throwing an error if it hasn't been.
---
integration-tests/pom.xml | 129 ++++++++++++++++++++++++++++++++++------------
pom.xml | 10 ++++
2 files changed, 106 insertions(+), 33 deletions(-)
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index bb7b97ced..f6a5dcc51 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -61,49 +61,112 @@
</configuration>
</plugin>
+ <!-- Invoke sibling xalan-test project for conformance tests.
+
+ Warning: Some of the tasks and tools written for xalan-test
+ assumed they were being executed from the xalan-test/
+ directory, and the maven-antrun-plugin does not seem to
+ offer a good way to change "current directory" before
+ running, no matter whether <ant> or <subant> is used.
+ Similarly, some of the classpath setup for xalan-test was
+ being done in the front-end build.* scripts rather than in
+ the actual ant build.xml.
- <!-- Invoke sibling xalan-test project for conformance tests-->
+ We could/should at some point rationalize the test driver
+ But exec:exec does appear to allow setting <workingdirectory>,
+ and adding to the classpath via -lib.
+
+ It isn't as pretty as using the <antrun> task would be.
+ But it appears to do the job.
+
+ NOTE TOO: If we want to include the results of this test in
+ the source distribution archives, this needs to run before
+ "package". We may want to consider having
+ pre-integration-test ensure that xalan-test is indeed
+ available. See also
+ https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
+ -->
<plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>3.1.0</version>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>3.5.1</version>
<executions>
<execution>
- <id>xalan-test attempt</id>
- <phase>test</phase>
- <configuration>
- <target>
- <!-- <ant> task is simpler. I'd hoped it would let us shift
- current directory (so we didn't have to add baseDir
- references to supporting code that assumed execution
- with working directory xalan-test), but current evidence
- is no such luck.
- <subant> doesn't, but lets us control failonerror and
- verbose.
- I'm *guessing* we may want inheritall.
- -->
- <subant
- buildpath="../../xalan-test/build.xml"
- genericantfile="../../xalan-test/build.xml"
- inheritall="true"
- failonerror="true"
- verbose="true"
- >
- <target name="clean"/>
- <target name="jar"/>
- <target name="extensions.classes"/>
- <target name="smoketest"/>
- <target name="apitest"/>
- <target name="conf.xsltc"/>
- </subant>
- </target>
- </configuration>
+ <id>xalan-test attempt</id>
+ <phase>integration-test</phase>
<goals>
- <goal>run</goal>
+ <goal>exec</goal>
</goals>
</execution>
</executions>
+ <configuration>
+ <executable>ant</executable>
+ <workingDirectory>../../xalan-test</workingDirectory>
+ <addOutputToClasspath>true</addOutputToClasspath>
+ <addResourcesToClasspath>true</addResourcesToClasspath>
+ <arguments>
+ <!-- Make sure we're on Ant's classpath (something that
+ the front-end xalan-test/build scripts we doing).
+ This arguably should not be needed (especially now
+ that we should no longer need endorsed or boot path
+ overrides), but without it we don't resolve the
+ XSLTC transformer factory class. Yes, that means
+ the xalan-test ant build is sloppy. We knew that.
+ -->
+ <argument>-lib</argument>
+ <argument>../xalan-java/build:../build:../xalan-java/lib/endorsed:../lib/endorsed</argument>
+
+ <argument>clean</argument>
+ <argument>jar</argument>
+ <argument>extensions.classes</argument>
+ <argument>smoketest</argument>
+ <argument>apitest</argument>
+ <argument>conf.xsltc</argument>
+ </arguments>
+ </configuration>
</plugin>
+ <!-- <plugin> -->
+ <!-- <artifactId>maven-antrun-plugin</artifactId> -->
+ <!-- <version>3.1.0</version> -->
+ <!-- <executions> -->
+ <!-- <execution> -->
+ <!-- <id>xalan-test attempt</id> -->
+ <!-- <phase>test</phase> -->
+ <!-- <configuration> -->
+ <!-- <target> -->
+ <!-- <!-\- <ant> task is simpler. I'd hoped it would let us shift -->
+ <!-- current directory (so we didn't have to add baseDir -->
+ <!-- references to supporting code that assumed execution -->
+ <!-- with working directory xalan-test), but current evidence -->
+ <!-- is no such luck. -->
+ <!-- <subant> doesn't, but lets us control failonerror and -->
+ <!-- verbose. -->
+ <!-- I'm *guessing* we may want inheritall. -->
+ <!-- -\-> -->
+ <!-- <subant -->
+ <!-- buildpath="../../xalan-test/build.xml" -->
+ <!-- genericantfile="../../xalan-test/build.xml" -->
+ <!-- inheritall="true" -->
+ <!-- failonerror="true" -->
+ <!-- verbose="true" -->
+ <!-- > -->
+ <!-- <target name="clean"/> -->
+ <!-- <target name="jar"/> -->
+ <!-- <target name="extensions.classes"/> -->
+ <!-- <target name="smoketest"/> -->
+ <!-- <target name="apitest"/> -->
+ <!-- <target name="conf.xsltc"/> -->
+ <!-- </subant> -->
+ <!-- </target> -->
+ <!-- </configuration> -->
+ <!-- <goals> -->
+ <!-- <goal>run</goal> -->
+ <!-- </goals> -->
+ <!-- </execution> -->
+ <!-- </executions> -->
+ <!-- </plugin> -->
+
</plugins>
</build>
</project>
diff --git a/pom.xml b/pom.xml
index 0b6996048..a0a70f14a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -413,6 +413,16 @@
</executions>
</plugin>
+ <!-- Exec is currently our best bet for invoking the separate
+ xalan-test project's ant built, due to sensitivities that
+ currently has upon workingdir and classpath. See
+ integration-tests/
+ -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>3.5.1</version>
+ </plugin>
</plugins>
</pluginManagement>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xalan.apache.org
For additional commands, e-mail: commits-help@xalan.apache.org