xspec / xspec-maven-plugin-1

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

Missing commons-io dependency #73

Open Glodenox opened 2 years ago

Glodenox commented 2 years ago

We seem to be running into an issue when a project doesn't have a dependency on commons-io by itself:

Execution default-cli of goal io.xspec.maven:xspec-maven-plugin:2.2.0:run-xspec failed: A required class was missing while executing io.xspec.maven:xspec-maven-plugin:2.2.0:run-xspec: org/apache/commons/io/output/NullOutputStream

I suspect this is a result of setting the Maven dependencies as provided in https://github.com/xspec/xspec-maven-plugin-1/commit/a433c1b24cf1fe9394effe0f425ed95805d4a08b. commons-io was a transitive dependency from maven-core via maven-shared-utils. I see only 3 uses of commons-io in the project, so either adding the dependency explicitly or removing those 3 uses would solve this issue.

src/main/java/io/xspec/maven/xspecMavenPlugin/utils/XSpecCompiler.java:59 src/main/java/io/xspec/maven/xspecMavenPlugin/XSpecRunner.java:38 src/test/java/io/xspec/maven/xspecMavenPlugin/utils/ProcessedFileTest.java:31

Glodenox commented 2 years ago

As a temporary workaround, we've added the missing dependency to the plugin in our configuration:

          <dependencies>
            <dependency>
              <groupId>commons-io</groupId>
              <artifactId>commons-io</artifactId>
              <version>2.11.0</version>
            </dependency>
          </dependencies>