Mojo

Validate and transform doesn't use resolver to resolve doctype declaration in source files

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: xml
  • Labels:
    None
  • Complexity:
    Intermediate
  • Testcase included:
    yes
  • Patch Submitted:
    Yes
  • Number of attachments :
    2

Description

When your source file contains a doctype declaration, the catalog is not used to resolve these declarations.

ie. the next file cannot be read, as the dtd can not be found, although I specified a local dtd for the COUNTER-DTD in the catalog.

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE DOC PUBLIC "COUNTER-DTD" "http://www.example.com/sample.dtd">
<DOC xmlns="xyz0"><HEADER>A sample document.</HEADER></DOC>

Activity

Hide
Nick Stolwijk added a comment -

The problem occured in both transform and validate, but both had another solution. The it tests in the patch show both errors and their solution.

Show
Nick Stolwijk added a comment - The problem occured in both transform and validate, but both had another solution. The it tests in the patch show both errors and their solution.
Hide
Matt Furniss added a comment -

Hi Nick, thanks. This helped a lot. But I did find a couple of problems with the patch.

1. Catalog files do not get a correct date stamp and thus updates are not detected. The catalog files are added as an array to the resolve list, they should actually be added as individual files.

2. Any DTDs referenced from the parent DTD are not resolved to a relative URL.

Show
Matt Furniss added a comment - Hi Nick, thanks. This helped a lot. But I did find a couple of problems with the patch. 1. Catalog files do not get a correct date stamp and thus updates are not detected. The catalog files are added as an array to the resolve list, they should actually be added as individual files. 2. Any DTDs referenced from the parent DTD are not resolved to a relative URL.
Hide
Robert Scholte added a comment -

Matt, could you attach the usecases/testcases, so we can verify the solution?

Show
Robert Scholte added a comment - Matt, could you attach the usecases/testcases, so we can verify the solution?
Hide
Julien HENRY added a comment -

It seems there are ITs included in the patch.

We have a project that need this patch and it is working fine for out needs.

Could you please apply it and push a new version.

Thanks

Show
Julien HENRY added a comment - It seems there are ITs included in the patch. We have a project that need this patch and it is working fine for out needs. Could you please apply it and push a new version. Thanks
Hide
Robert Scholte added a comment -

Patch has been refactored a little bit.
Fixed in rev. 12376
Thanks Nick

Show
Robert Scholte added a comment - Patch has been refactored a little bit. Fixed in rev. 12376 Thanks Nick
Hide
Nickolay Martinov added a comment -

Test fails if there is no Internet connection available because test tries to validate catalog file too. This can be easily fixed by excluding catalog file from the validation set.

{{
Parse catalog: /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml
Loading catalog: /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml
Default BASE: file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml
public: COUNTER-DTD
../dtd/sample.dtd
PUBLIC: COUNTER-DTD
file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/dtd/sample.dtd
public: -COUNTER-
../xsd/schema.xsd
PUBLIC: -COUNTER-
file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xsd/schema.xsd
[DEBUG] Loading schema with public Id -COUNTER-, system Id null
resolvePublic(-COUNTER-,null)
Resolved public: -COUNTER-
file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xsd/schema.xsd
[DEBUG] Validating /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/doc1.xml
resolveSystem(http://www.example.com/sample.dtd)
resolvePublic(COUNTER-DTD,http://www.example.com/sample.dtd)
Resolved public: COUNTER-DTD
file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/dtd/sample.dtd
[DEBUG] Validating /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml
resolveSystem(http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd)
resolvePublic(-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN,http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd)
resolveSystem(http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd)
[DEBUG] URLResourceLoader: Exception when looking for 'http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd
java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436)
at java.net.URL.openStream(URL.java:1010)
at org.codehaus.plexus.resource.loader.URLResourceLoader.getResource(URLResourceLoader.java:125)
at org.codehaus.plexus.resource.DefaultResourceManager.getResource(DefaultResourceManager.java:159)
at org.codehaus.mojo.xml.Resolver.resolve(Resolver.java:335)
at org.codehaus.mojo.xml.Resolver.resolveResource(Resolver.java:213)
at org.apache.xerces.util.DOMEntityResolverWrapper.resolveEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Validator.java:127)
at org.codehaus.mojo.xml.ValidateMojo.validate(ValidateMojo.java:174)
at org.codehaus.mojo.xml.ValidateMojo.validate(ValidateMojo.java:337)
at org.codehaus.mojo.xml.ValidateMojo.execute(ValidateMojo.java:362)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[DEBUG] The resource 'http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd' was not found with resourceLoader org.codehaus.plexus.resource.loader.URLResourceLoader.
[DEBUG] The resource 'http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd' was not found with resourceLoader org.codehaus.plexus.resource.loader.JarResourceLoader.
[DEBUG] The resource 'http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd' was not found with resourceLoader org.codehaus.plexus.resource.loader.FileResourceLoader.
[DEBUG] The resource 'http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd' was not found with resourceLoader org.codehaus.plexus.resource.loader.ThreadContextClasspathResourceLoader.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:35.604s
[INFO] Finished at: Wed Jan 04 11:45:50 MSK 2012
[INFO] Final Memory: 4M/249M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:xml-maven-plugin:1.0-nom:validate (default) on project it11: While parsing /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml: Unable to resolve: pType=http://www.w3.org/TR/REC-xml pNamespaceURI=null pPublicId=-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN pSystemId=http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd pBaseURI=file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:xml-maven-plugin:1.0-nom:validate (default) on project it11: While parsing /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml: Unable to resolve: pType=http://www.w3.org/TR/REC-xml pNamespaceURI=null pPublicId=-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN pSystemId=http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd pBaseURI=file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: While parsing /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml: Unable to resolve: pType=http://www.w3.org/TR/REC-xml pNamespaceURI=null pPublicId=-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN pSystemId=http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd pBaseURI=file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml
at org.codehaus.mojo.xml.ValidateMojo.validate(ValidateMojo.java:226)
at org.codehaus.mojo.xml.ValidateMojo.validate(ValidateMojo.java:337)
at org.codehaus.mojo.xml.ValidateMojo.execute(ValidateMojo.java:362)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.lang.IllegalStateException: Unable to resolve: pType=http://www.w3.org/TR/REC-xml pNamespaceURI=null pPublicId=-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN pSystemId=http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd pBaseURI=file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml
at org.codehaus.mojo.xml.Resolver.resolveResource(Resolver.java:227)
at org.apache.xerces.util.DOMEntityResolverWrapper.resolveEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Validator.java:127)
at org.codehaus.mojo.xml.ValidateMojo.validate(ValidateMojo.java:174)
... 23 more
}}

Show
Nickolay Martinov added a comment - Test fails if there is no Internet connection available because test tries to validate catalog file too. This can be easily fixed by excluding catalog file from the validation set. {{ Parse catalog: /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml Loading catalog: /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml Default BASE: file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml public: COUNTER-DTD ../dtd/sample.dtd PUBLIC: COUNTER-DTD file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/dtd/sample.dtd public: -COUNTER- ../xsd/schema.xsd PUBLIC: -COUNTER- file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xsd/schema.xsd [DEBUG] Loading schema with public Id -COUNTER-, system Id null resolvePublic(-COUNTER-,null) Resolved public: -COUNTER- file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xsd/schema.xsd [DEBUG] Validating /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/doc1.xml resolveSystem(http://www.example.com/sample.dtd) resolvePublic(COUNTER-DTD,http://www.example.com/sample.dtd) Resolved public: COUNTER-DTD file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/dtd/sample.dtd [DEBUG] Validating /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml resolveSystem(http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd) resolvePublic(-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN,http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd) resolveSystem(http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd) [DEBUG] URLResourceLoader: Exception when looking for 'http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436) at java.net.URL.openStream(URL.java:1010) at org.codehaus.plexus.resource.loader.URLResourceLoader.getResource(URLResourceLoader.java:125) at org.codehaus.plexus.resource.DefaultResourceManager.getResource(DefaultResourceManager.java:159) at org.codehaus.mojo.xml.Resolver.resolve(Resolver.java:335) at org.codehaus.mojo.xml.Resolver.resolveResource(Resolver.java:213) at org.apache.xerces.util.DOMEntityResolverWrapper.resolveEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source) at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source) at javax.xml.validation.Validator.validate(Validator.java:127) at org.codehaus.mojo.xml.ValidateMojo.validate(ValidateMojo.java:174) at org.codehaus.mojo.xml.ValidateMojo.validate(ValidateMojo.java:337) at org.codehaus.mojo.xml.ValidateMojo.execute(ValidateMojo.java:362) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) [DEBUG] The resource 'http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd' was not found with resourceLoader org.codehaus.plexus.resource.loader.URLResourceLoader. [DEBUG] The resource 'http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd' was not found with resourceLoader org.codehaus.plexus.resource.loader.JarResourceLoader. [DEBUG] The resource 'http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd' was not found with resourceLoader org.codehaus.plexus.resource.loader.FileResourceLoader. [DEBUG] The resource 'http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd' was not found with resourceLoader org.codehaus.plexus.resource.loader.ThreadContextClasspathResourceLoader. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2:35.604s [INFO] Finished at: Wed Jan 04 11:45:50 MSK 2012 [INFO] Final Memory: 4M/249M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:xml-maven-plugin:1.0-nom:validate (default) on project it11: While parsing /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml: Unable to resolve: pType=http://www.w3.org/TR/REC-xml pNamespaceURI=null pPublicId=-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN pSystemId=http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd pBaseURI=file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:xml-maven-plugin:1.0-nom:validate (default) on project it11: While parsing /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml: Unable to resolve: pType=http://www.w3.org/TR/REC-xml pNamespaceURI=null pPublicId=-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN pSystemId=http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd pBaseURI=file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: While parsing /home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml: Unable to resolve: pType=http://www.w3.org/TR/REC-xml pNamespaceURI=null pPublicId=-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN pSystemId=http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd pBaseURI=file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml at org.codehaus.mojo.xml.ValidateMojo.validate(ValidateMojo.java:226) at org.codehaus.mojo.xml.ValidateMojo.validate(ValidateMojo.java:337) at org.codehaus.mojo.xml.ValidateMojo.execute(ValidateMojo.java:362) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more Caused by: java.lang.IllegalStateException: Unable to resolve: pType=http://www.w3.org/TR/REC-xml pNamespaceURI=null pPublicId=-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN pSystemId=http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd pBaseURI=file:/home/jenkins/ci/slv/workspace/NOM_6_build/build/xml-maven-plugin/target/it/mojo-1438-validate/src/main/xml/catalog.xml at org.codehaus.mojo.xml.Resolver.resolveResource(Resolver.java:227) at org.apache.xerces.util.DOMEntityResolverWrapper.resolveEntity(Unknown Source) at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source) at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source) at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source) at javax.xml.validation.Validator.validate(Validator.java:127) at org.codehaus.mojo.xml.ValidateMojo.validate(ValidateMojo.java:174) ... 23 more }}
Hide
Nickolay Martinov added a comment -

Patch to fix test failure when there is no Internet connection available

Show
Nickolay Martinov added a comment - Patch to fix test failure when there is no Internet connection available

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: