Open adamretter opened 1 month ago
Since default Schematron implementation in XSpec has changed, xspec-maven-plugin isn't anymore compatible with XSpec !
I've seen this this past week-end, and I have to work on this.
Registered as #80
@cmarchand Any thoughts on how to get it to work with the older version of XSpec?
Just add a dependency to a pre 3.0 to the plugin :
<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.4</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>xspec-tests</id>
<phase>test</phase>
<goals><goal>run-xspec</goal></goals>
</execution>
</executions>
</plugin>
Thanks very much @cmarchand. I can confirm that your suggestion above works. It seems that my problem when using XSpec 2.3.2
came from trying to also use Saxon 12.5. Just for completeness of reporting in this issue - if I take what you suggested and update it to use Saxon 12.5, I see this this error
[INFO] --- xspec:2.2.0:run-xspec (xspec-tests) @ cityehr-quick-start-guide ---
[ERROR] Exception while creating XmlStuff
io.xspec.maven.xspecMavenPlugin.utils.XSpecPluginException
at io.xspec.maven.xspecMavenPlugin.utils.XmlStuff.<init> (XmlStuff.java:154)
at io.xspec.maven.xspecMavenPlugin.XSpecRunner.init (XSpecRunner.java:130)
at uk.org.adamretter.maven.XSpecMojo.execute (XSpecMojo.java:368)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
Caused by: java.lang.NullPointerException
at io.xspec.maven.xspecMavenPlugin.resolver.Resolver.resolve (Resolver.java:96)
at io.xspec.maven.xspecMavenPlugin.utils.XmlStuff.resolveSrc (XmlStuff.java:429)
at io.xspec.maven.xspecMavenPlugin.utils.XmlStuff.createXsltExecutables (XmlStuff.java:270)
at io.xspec.maven.xspecMavenPlugin.utils.XmlStuff.<init> (XmlStuff.java:148)
at io.xspec.maven.xspecMavenPlugin.XSpecRunner.init (XSpecRunner.java:130)
at uk.org.adamretter.maven.XSpecMojo.execute (XSpecMojo.java:368)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:255)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:201)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:361)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:314)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for cityEHR Documentation 1.0.0-SNAPSHOT:
[INFO]
[INFO] cityEHR Documentation Parent POM ................... SUCCESS [ 0.333 s]
[INFO] cityEHR Quick Start Guide .......................... FAILURE [ 33.644 s]
[INFO] cityEHR Documentation .............................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
@cmarchand To try and help, I sent a PR to update the README.md with your information above - https://github.com/xspec/xspec-maven-plugin-1/pull/81
Yes. The plugin isn't compatible with Saxon 12.5.
And thanks for the PR !
@cmarchand Ah ha! Good to know, thank you. As I had previously seen this PR go in that claimed Saxon 12 support, I thought it might be compatible - https://github.com/xspec/xspec-maven-plugin-1/pull/75
Are there some things I could help with perhaps?
@adamretter could you please check #80 ?
I can't figure out at all how to get version 2.2.0 of the plugin working with xspec 2.3.2 or 3.1.2. My xspec is is in
src/text/xspec
pom.xml
:Yields the error:
I note that the file
io/xspec/xspec/impl/lib/iso-schematron/iso_dsdl_include.xsl
does not exist in theio.xspec.xspec:xspec:3.1.2:jar
file. Downgrading from xspec 3.1.2 to 2.3.2 in the dependency section of the plugin, and adding a missing dependency uponorg.xmlresolver:xmlresolver:5.2.2:jar
, then yields the following error instead:So I am quite stuck as I can't seem to get this to work... any ideas?