Skip to content

Conversation

Copy link

Copilot AI commented Oct 26, 2025

Integration test target/ directories created during release builds were being included in the source-release.zip, as reported in the reproducible builds analysis.

Changes

  • Moved all integration test directories (it1-it20, xinclude-xsd, xinclude-xsl) from src/test/ to src/test/resources/
  • Added getTestResourcePath() helper method in AbstractXmlMojoTestCase to reference tests via target/test-classes/
  • Updated all test references in ValidateMojoTest and TransformMojoTest to use the new helper method
  • Fixed symbolic link in src/test/multimodule/xsd-import/validation/src/main/resources/xml to point to new location

This ensures that when integration tests run during release builds and create target/ directories, those artifacts are created under target/test-classes/ (which is excluded from source releases) rather than under src/test/ (which would be included). Source releases now contain only source files, not build artifacts like src/test/it4/target/generated-resources/xml/xslt/doc1.xml.

[!WARNING]

Original prompt

This section details on the original issue you should resolve

<filter_complete></filter_complete>

<issue_title>source-release.zip contains IT results</issue_title>
<issue_description>discovered while rebuilding 1.1.0 and 1.2.0 for Reproducible Builds: https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/codehaus/mojo/xml-maven-plugin/README.md

for example src/test/it4/target/generated-resources/xml/xslt/doc1.xml
see full https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/codehaus/mojo/xml-maven-plugin/xml-maven-plugin-1.1.0.diffoscope</issue_description>

Comments on the Issue (you are @copilot in this section)

Original prompt

This section details on the original issue you should resolve

<issue_title>source-release.zip contains IT results</issue_title>
<issue_description>discovered while rebuilding 1.1.0 and 1.2.0 for Reproducible Builds: https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/codehaus/mojo/xml-maven-plugin/README.md

for example src/test/it4/target/generated-resources/xml/xslt/doc1.xml
see full https://github.com/jvm-repo-rebuild/reproducible-central/blob/master/content/org/codehaus/mojo/xml-maven-plugin/xml-maven-plugin-1.1.0.diffoscope</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix source release zip to exclude IT results Exclude integration test artifacts from source-release.zip Oct 26, 2025
Copilot AI requested a review from slachiewicz October 26, 2025 10:07
@slawekjaranowski
Copy link
Member

@copilot we need move all directories like test/it* into test/resources and reference path to target/test-classes in test execution

Copy link
Author

Copilot AI commented Oct 27, 2025

@copilot we need move all directories like test/it* into test/resources and reference path to target/test-classes in test execution

Done. All integration test directories (it1-it20, xinclude-xsd, xinclude-xsl) have been moved from src/test/ to src/test/resources/. Tests now reference paths via target/test-classes using a new getTestResourcePath() helper method. Fixed the symlink in multimodule test. Tests pass with the same 1 pre-existing error as before. Commit: e064bac

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • java.sun.com
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.23.1/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.23.1/x64/codeql/xml/tools/xml-extractor.jar --fileList=/home/REDACTED/work/xml-maven-plugin/.codeql-scratch/dbs/java/working/files-to-index4527617579945286956.list --sourceArchiveDir=/home/REDACTED/work/xml-maven-plugin/.codeql-scratch/dbs/java/src --outputDir=/home/REDACTED/work/xml-maven-plugin/.codeql-scratch/dbs/java/trap/java (dns block)
  • www.example.com
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.23.1/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.23.1/x64/codeql/xml/tools/xml-extractor.jar --fileList=/home/REDACTED/work/xml-maven-plugin/.codeql-scratch/dbs/java/working/files-to-index4527617579945286956.list --sourceArchiveDir=/home/REDACTED/work/xml-maven-plugin/.codeql-scratch/dbs/java/src --outputDir=/home/REDACTED/work/xml-maven-plugin/.codeql-scratch/dbs/java/trap/java (dns block)
  • www.oasis-open.org
    • Triggering command: /opt/hostedtoolcache/CodeQL/2.23.1/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.23.1/x64/codeql/xml/tools/xml-extractor.jar --fileList=/home/REDACTED/work/xml-maven-plugin/.codeql-scratch/dbs/java/working/files-to-index4527617579945286956.list --sourceArchiveDir=/home/REDACTED/work/xml-maven-plugin/.codeql-scratch/dbs/java/src --outputDir=/home/REDACTED/work/xml-maven-plugin/.codeql-scratch/dbs/java/trap/java (dns block)
  • www.w3.org
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -jar /home/REDACTED/work/xml-maven-plugin/xml-maven-plugin/target/surefire/surefirebooter-20251027071425055_3.jar /home/REDACTED/work/xml-maven-plugin/xml-maven-plugin/target/surefire 2025-10-27T07-14-24_988-jvmRun1 surefire-20251027071425055_1tmp surefire_0-20251027071425055_2tmp (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@slawekjaranowski
Copy link
Member

@slachiewicz look ok for me

@slachiewicz slachiewicz marked this pull request as ready for review October 28, 2025 07:15
@slachiewicz slachiewicz deleted the copilot/fix-source-release-zip-issues branch November 11, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

source-release.zip contains IT results

2 participants