adamretter / xspec-maven-plugin

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

Build fails when src/test/xspec does not exist #1

Closed sburkard closed 9 years ago

sburkard commented 9 years ago

Currently the Maven build fails with

Execution default of goal uk.org.adamretter.maven:xspec-maven-plugin:1.0.1:run-xspec failed. NullPointerException

when the xspec-test-directory (default src/test/xspec) does not exist.

This is typically the case when the plugin is configured in a parent POM of multiple projects, but not all subprojects have xspec-tests.

I don't know if this is a fork of your project, but the problem seems to be fixed here: https://github.com/daisy/xspec-maven-plugin/commit/20ec78add7499b32c11bc2b5456ec05af5bff79a

adamretter commented 9 years ago

If I recall correctly then the Daisy plugin is not the same (and therefore not a fork), I think these were independent efforts. Are you able to send a PR that fixes the issue?

adamretter commented 9 years ago

Closed by https://github.com/adamretter/xspec-maven-plugin/pull/2

adamretter commented 9 years ago

Closed by https://github.com/adamretter/xspec-maven-plugin/pull/2

adamretter commented 9 years ago

@sburkard I just released version 1.1 with your fix. It should appear in Maven Central in a couple hours.

sburkard commented 9 years ago

@adamretter Thanks a lot, but now I receive an error that JRE 8 is required to run the plugin. Can you build the new version for lower JRE versions (as the previous version 1.0.1)?

Caused by: java.lang.UnsupportedClassVersionError: uk/org/adamretter/maven/XSpecMojo : Unsupported major.minor version 52.0
adamretter commented 9 years ago

@sburkard I updated the pom.xml to use the latest version of the Maven API and plugins, this requires Java 8. Java 6 and Java 7 are officially EOL. Do you really need support for an earlier version of Java?

sburkard commented 9 years ago

@adamretter Yes, we are still running on Java 7 and this will not change soon. I guess we are not the only company that is not using the latest and greatest major releases ;-)

adamretter commented 9 years ago

@sburkard Yeah I guess that is true enough. I just published version 1.2 which will drop the project back to Java 7. It should appear in Maven central in the next 2 hours.

sburkard commented 9 years ago

@adamretter Thanks a lot. Works perfect now.

I can configure your plugin in parent POM and in modules where the testdir does not exist, I get the following message

[INFO] --- xspec-maven-plugin:1.2:run-xspec (default) @ ...
[INFO] Found 0 XSpecs...
```