xspec / xspec-maven-plugin-1

XSpec Maven Plugin
BSD 3-Clause "New" or "Revised" License
5 stars 11 forks source link

Problem with Maven 3.9 #77

Open andreas-hu opened 5 months ago

andreas-hu commented 5 months ago

When using Maven 3.9, the build fails with the following error: no execution has been done. processedFiles is null

Reverting to Maven 3.8 solved the problem for me, but is not future-proof.

For reference, here is my pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>my-content-transformation</groupId>
  <artifactId>my-content-transformation</artifactId>
  <version>1.0</version>

  <properties>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.release>11</maven.compiler.release>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>io.xspec.maven</groupId>
        <artifactId>xspec-maven-plugin</artifactId>
        <version>2.2.0</version>
        <dependencies>
          <dependency>
            <groupId>net.sf.saxon</groupId>
            <artifactId>Saxon-HE</artifactId>
            <version>10.9</version>
          </dependency>
          <dependency>
            <groupId>io.xspec</groupId>
            <artifactId>xspec</artifactId>
            <version>2.3.2</version>
          </dependency>

          <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.11.0</version>
          </dependency>
          <dependency>
            <groupId>org.xmlresolver</groupId>
            <artifactId>xmlresolver</artifactId>
            <version>6.0.4</version>
          </dependency>
        </dependencies>

        <configuration>
          <catalogFile>catalog.xml</catalogFile>
          <saxonOptions>
            <!-- See https://github.com/xspec/xspec-maven-plugin-1/wiki -->
          </saxonOptions>
        </configuration>
        <executions>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>run-xspec</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.2.5</version>
      </plugin>

    </plugins>
  </build>

</project>
biberfab commented 1 month ago

We had the same problem - the plugin uses the plexus-utils that were removed from maven 3.9 (see: https://maven.apache.org/docs/3.9.0/release-notes.html ) in https://github.com/xspec/xspec-maven-plugin-1/blob/6e0c050f9deba003d998502df770b1875c051626/src/main/java/io/xspec/maven/xspecMavenPlugin/utils/CatalogWriter.java#L88C67-L88C78

You should be able to fix it with adding this as a plugin-dependency:

<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.5.1</version>
</dependency>