Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to version 1.0.2 result in problems to load dtd files #46

Closed
romani opened this issue Apr 12, 2018 · 12 comments
Closed

upgrade to version 1.0.2 result in problems to load dtd files #46

romani opened this issue Apr 12, 2018 · 12 comments
Assignees
Labels

Comments

@romani
Copy link

romani commented Apr 12, 2018

found at checkstyle/checkstyle#5713
CIs logs https://travis-ci.org/checkstyle/checkstyle/jobs/365341659#L1322

xsd parsing works fine, but all dtds reference result in exception.
IT https://github.com/mojohaus/xml-maven-plugin/blob/master/src/it/mojo-1438-validate/pom.xml does not have dtd, even it is present on filesystem https://github.com/mojohaus/xml-maven-plugin/blob/master/src/it/mojo-1438-validate/src/main/dtd/sample.dtd

steps to reproduce:

git clone https://github.com/checkstyle/checkstyle.git
# change in pom.xml 
#         <artifactId>xml-maven-plugin</artifactId>
#-        <version>1.0.1</version>
#+        <version>1.0.2</version>
$ mvn -X xml:validate
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T00:58:13-07:00)
Maven home: /opt/maven/default
Java version: 1.8.0_162, vendor: Oracle Corporation
Java home: /opt/jdk/jdk1.8.0_162/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.10.0-693.11.1.el7.x86_64", arch: "amd64", family: "unix"
[DEBUG] Created new class realm maven.api
[DEBUG] Importing foreign packages into class realm maven.api
[DEBUG]   Imported: javax.annotation.* < plexus.core
[DEBUG]   Imported: javax.enterprise.inject.* < plexus.core
[DEBUG]   Imported: javax.enterprise.util.* < plexus.core
[DEBUG]   Imported: javax.inject.* < plexus.core
[DEBUG]   Imported: org.apache.maven.* < plexus.core
[DEBUG]   Imported: org.apache.maven.artifact < plexus.core
[DEBUG]   Imported: org.apache.maven.classrealm < plexus.core
[DEBUG]   Imported: org.apache.maven.cli < plexus.core
[DEBUG]   Imported: org.apache.maven.configuration < plexus.core
[DEBUG]   Imported: org.apache.maven.exception < plexus.core
[DEBUG]   Imported: org.apache.maven.execution < plexus.core
[DEBUG]   Imported: org.apache.maven.execution.scope < plexus.core
[DEBUG]   Imported: org.apache.maven.lifecycle < plexus.core
[DEBUG]   Imported: org.apache.maven.model < plexus.core
[DEBUG]   Imported: org.apache.maven.monitor < plexus.core
[DEBUG]   Imported: org.apache.maven.plugin < plexus.core
[DEBUG]   Imported: org.apache.maven.profiles < plexus.core
[DEBUG]   Imported: org.apache.maven.project < plexus.core
[DEBUG]   Imported: org.apache.maven.reporting < plexus.core
[DEBUG]   Imported: org.apache.maven.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.rtinfo < plexus.core
[DEBUG]   Imported: org.apache.maven.settings < plexus.core
[DEBUG]   Imported: org.apache.maven.toolchain < plexus.core
[DEBUG]   Imported: org.apache.maven.usability < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.* < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authentication < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.authorization < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.events < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.observers < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.proxy < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.repository < plexus.core
[DEBUG]   Imported: org.apache.maven.wagon.resource < plexus.core
[DEBUG]   Imported: org.codehaus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.* < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.classworlds < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.component < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.configuration < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.container < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.context < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.lifecycle < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.logging < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.personality < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
[DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
[DEBUG]   Imported: org.eclipse.aether.* < plexus.core
[DEBUG]   Imported: org.eclipse.aether.artifact < plexus.core
[DEBUG]   Imported: org.eclipse.aether.collection < plexus.core
[DEBUG]   Imported: org.eclipse.aether.deployment < plexus.core
[DEBUG]   Imported: org.eclipse.aether.graph < plexus.core
[DEBUG]   Imported: org.eclipse.aether.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.installation < plexus.core
[DEBUG]   Imported: org.eclipse.aether.internal.impl < plexus.core
[DEBUG]   Imported: org.eclipse.aether.metadata < plexus.core
[DEBUG]   Imported: org.eclipse.aether.repository < plexus.core
[DEBUG]   Imported: org.eclipse.aether.resolution < plexus.core
[DEBUG]   Imported: org.eclipse.aether.spi < plexus.core
[DEBUG]   Imported: org.eclipse.aether.transfer < plexus.core
[DEBUG]   Imported: org.eclipse.aether.version < plexus.core
[DEBUG]   Imported: org.fusesource.jansi.* < plexus.core
[DEBUG]   Imported: org.slf4j.* < plexus.core
[DEBUG]   Imported: org.slf4j.helpers.* < plexus.core
[DEBUG]   Imported: org.slf4j.spi.* < plexus.core
[DEBUG] Populating class realm maven.api
[INFO] Error stacktraces are turned on.
[DEBUG] Message scheme: color
[DEBUG] Message styles: debug info warning error success failure strong mojo project
[DEBUG] Reading global settings from /opt/maven/default/conf/settings.xml
[DEBUG] Reading user settings from  ~/.m2/settings.xml
[DEBUG] Reading global toolchains from /opt/maven/default/conf/toolchains.xml
[DEBUG] Reading user toolchains from  ~/.m2/toolchains.xml
[DEBUG] Using local repository at  ~/.m2/repository
[DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for  ~/.m2/repository
[INFO] Scanning for projects...
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1336967, ConflictMarker.markTime=611463, ConflictMarker.nodeCount=84, ConflictIdSorter.graphTime=683825, ConflictIdSorter.topsortTime=1275631, ConflictIdSorter.conflictIdCount=45, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=10120314, ConflictResolver.conflictItemCount=71, DefaultDependencyCollector.collectTime=375204747, DefaultDependencyCollector.transformTime=17122170}
[DEBUG] org.sonatype.plugins:nexus-staging-maven-plugin:jar:1.6.8:
[DEBUG]    org.sonatype.nexus.maven:nexus-common:jar:1.6.8:compile
[DEBUG]       org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:compile
[DEBUG]          org.sonatype.plexus:plexus-cipher:jar:1.7:compile
[DEBUG]    com.google.guava:guava:jar:14.0.1:compile
[DEBUG]    org.sonatype.nexus:nexus-client-core:jar:2.14.3-02:compile
[DEBUG]       org.sonatype.nexus.plugins:nexus-restlet1x-model:jar:2.14.3-02:compile
[DEBUG]          org.apache.maven:maven-model:jar:3.0.4:compile
[DEBUG]       org.slf4j:slf4j-api:jar:1.7.7:compile
[DEBUG]       com.google.code.findbugs:jsr305:jar:2.0.1:compile
[DEBUG]       com.intellij:annotations:jar:9.0.4:compile
[DEBUG]       commons-io:commons-io:jar:2.4:compile
[DEBUG]       com.thoughtworks.xstream:xstream:jar:1.4.7:compile
[DEBUG]          xmlpull:xmlpull:jar:1.1.3.1:compile
[DEBUG]          xpp3:xpp3_min:jar:1.1.4c:compile
[DEBUG]       joda-time:joda-time:jar:2.2:compile
[DEBUG]       commons-lang:commons-lang:jar:2.6:compile
[DEBUG]       commons-beanutils:commons-beanutils-core:jar:1.8.3:compile
[DEBUG]       org.sonatype.sisu.siesta:siesta-client:jar:1.7:compile
[DEBUG]          org.sonatype.sisu.siesta:siesta-common:jar:1.7:compile
[DEBUG]             javax.ws.rs:jsr311-api:jar:1.1.1:compile
[DEBUG]             com.sun.jersey:jersey-core:jar:1.17.1:compile
[DEBUG]             javax.validation:validation-api:jar:1.1.0.Final:compile
[DEBUG]          com.sun.jersey:jersey-client:jar:1.17.1:compile
[DEBUG]          com.sun.jersey.contribs:jersey-apache-client4:jar:1.17.1:compile
[DEBUG]       org.sonatype.sisu.siesta:siesta-jackson:jar:1.7:compile
[DEBUG]          com.fasterxml.jackson.core:jackson-annotations:jar:2.3.1:compile
[DEBUG]          com.fasterxml.jackson.core:jackson-core:jar:2.3.1:compile
[DEBUG]          com.fasterxml.jackson.core:jackson-databind:jar:2.3.1:compile
[DEBUG]          com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.3.1:compile
[DEBUG]             com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.3.1:compile
[DEBUG]          com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.3.1:compile
[DEBUG]       org.apache.httpcomponents:httpclient:jar:4.3.5:compile
[DEBUG]          commons-codec:commons-codec:jar:1.6:compile
[DEBUG]       org.apache.httpcomponents:httpcore:jar:4.3.2:compile
[DEBUG]       org.slf4j:jcl-over-slf4j:jar:1.7.7:compile
[DEBUG]       javax.inject:javax.inject:jar:1:compile
[DEBUG]    org.sonatype.spice.zapper:spice-zapper:jar:1.3:compile
[DEBUG]       org.fusesource.hawtbuf:hawtbuf-proto:jar:1.9:compile
[DEBUG]          org.fusesource.hawtbuf:hawtbuf:jar:1.9:compile
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:3.0.8:compile
[DEBUG]    org.codehaus.plexus:plexus-interpolation:jar:1.15:compile
[DEBUG]    org.sonatype.aether:aether-api:jar:1.13.1:compile
[DEBUG]    ch.qos.logback:logback-core:jar:1.1.2:runtime
[DEBUG]    ch.qos.logback:logback-classic:jar:1.1.2:runtime
[DEBUG] Created new class realm extension>org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8
[DEBUG] Importing foreign packages into class realm extension>org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm extension>org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8
[DEBUG]   Included: org.sonatype.plugins:nexus-staging-maven-plugin:jar:1.6.8
[DEBUG]   Included: org.sonatype.nexus.maven:nexus-common:jar:1.6.8
[DEBUG]   Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4
[DEBUG]   Included: org.sonatype.plexus:plexus-cipher:jar:1.7
[DEBUG]   Included: com.google.guava:guava:jar:14.0.1
[DEBUG]   Included: org.sonatype.nexus:nexus-client-core:jar:2.14.3-02
[DEBUG]   Included: org.sonatype.nexus.plugins:nexus-restlet1x-model:jar:2.14.3-02
[DEBUG]   Included: com.google.code.findbugs:jsr305:jar:2.0.1
[DEBUG]   Included: com.intellij:annotations:jar:9.0.4
[DEBUG]   Included: commons-io:commons-io:jar:2.4
[DEBUG]   Included: com.thoughtworks.xstream:xstream:jar:1.4.7
[DEBUG]   Included: xmlpull:xmlpull:jar:1.1.3.1
[DEBUG]   Included: xpp3:xpp3_min:jar:1.1.4c
[DEBUG]   Included: joda-time:joda-time:jar:2.2
[DEBUG]   Included: commons-lang:commons-lang:jar:2.6
[DEBUG]   Included: commons-beanutils:commons-beanutils-core:jar:1.8.3
[DEBUG]   Included: org.sonatype.sisu.siesta:siesta-client:jar:1.7
[DEBUG]   Included: org.sonatype.sisu.siesta:siesta-common:jar:1.7
[DEBUG]   Included: javax.ws.rs:jsr311-api:jar:1.1.1
[DEBUG]   Included: com.sun.jersey:jersey-core:jar:1.17.1
[DEBUG]   Included: javax.validation:validation-api:jar:1.1.0.Final
[DEBUG]   Included: com.sun.jersey:jersey-client:jar:1.17.1
[DEBUG]   Included: com.sun.jersey.contribs:jersey-apache-client4:jar:1.17.1
[DEBUG]   Included: org.sonatype.sisu.siesta:siesta-jackson:jar:1.7
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-annotations:jar:2.3.1
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-core:jar:2.3.1
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-databind:jar:2.3.1
[DEBUG]   Included: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.3.1
[DEBUG]   Included: com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.3.1
[DEBUG]   Included: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.3.1
[DEBUG]   Included: org.apache.httpcomponents:httpclient:jar:4.3.5
[DEBUG]   Included: commons-codec:commons-codec:jar:1.6
[DEBUG]   Included: org.apache.httpcomponents:httpcore:jar:4.3.2
[DEBUG]   Included: org.slf4j:jcl-over-slf4j:jar:1.7.7
[DEBUG]   Included: org.sonatype.spice.zapper:spice-zapper:jar:1.3
[DEBUG]   Included: org.fusesource.hawtbuf:hawtbuf-proto:jar:1.9
[DEBUG]   Included: org.fusesource.hawtbuf:hawtbuf:jar:1.9
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.0.8
[DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.15
[DEBUG]   Included: ch.qos.logback:logback-core:jar:1.1.2
[DEBUG]   Included: ch.qos.logback:logback-classic:jar:1.1.2
[DEBUG] Extension realms for project com.puppycrawl.tools:checkstyle:jar:8.10-SNAPSHOT: [ClassRealm[extension>org.sonatype.plugins:nexus-staging-maven-plugin:1.6.8, parent: sun.misc.Launcher$AppClassLoader@33909752]]
[DEBUG] Created new class realm project>com.puppycrawl.tools:checkstyle:8.10-SNAPSHOT
[DEBUG] Populating class realm project>com.puppycrawl.tools:checkstyle:8.10-SNAPSHOT
[DEBUG] Looking up lifecycle mappings for packaging jar from ClassRealm[project>com.puppycrawl.tools:checkstyle:8.10-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]
[DEBUG] Extension realms for project org.sonatype.oss:oss-parent:pom:9: (none)
[DEBUG] Looking up lifecycle mappings for packaging pom from ClassRealm[plexus.core, parent: null]
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[DEBUG] Resolving plugin prefix xml from [com.revere.jshell, com.revere.maven.plugins, org.apache.maven.plugins, org.codehaus.mojo]
[DEBUG] Resolved plugin prefix xml to org.codehaus.mojo:xml-maven-plugin from POM com.puppycrawl.tools:checkstyle:jar:8.10-SNAPSHOT
[DEBUG] === REACTOR BUILD PLAN ================================================
[DEBUG] Project: com.puppycrawl.tools:checkstyle:jar:8.10-SNAPSHOT
[DEBUG] Tasks:   [xml:validate]
[DEBUG] Style:   Regular
[DEBUG] =======================================================================
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building checkstyle 8.10-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[DEBUG] Resolving plugin prefix xml from [com.revere.jshell, com.revere.maven.plugins, org.apache.maven.plugins, org.codehaus.mojo]
[DEBUG] Resolved plugin prefix xml to org.codehaus.mojo:xml-maven-plugin from POM com.puppycrawl.tools:checkstyle:jar:8.10-SNAPSHOT
[DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
[DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
[DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
[DEBUG] === PROJECT BUILD PLAN ================================================
[DEBUG] Project:       com.puppycrawl.tools:checkstyle:8.10-SNAPSHOT
[DEBUG] Dependencies (collect): []
[DEBUG] Dependencies (resolve): []
[DEBUG] Repositories (dependencies): [mvn.reveredata.com (http://mvn.reveredata.com/maven, default, releases+snapshots), sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots, default, snapshots), central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] Repositories (plugins)     : [mvn.reveredata.com (http://mvn.reveredata.com/maven, default, releases+snapshots), nexus-codehaus-snapshot (https://oss.sonatype.org/content/repositories/codehaus-snapshots/, default, releases+snapshots), sevntu-maven (http://sevntu-checkstyle.github.io/sevntu.checkstyle/maven2, default, releases+snapshots), central (https://repo.maven.apache.org/maven2, default, releases)]
[DEBUG] -----------------------------------------------------------------------
[DEBUG] Goal:          org.codehaus.mojo:xml-maven-plugin:1.0.2:validate (default-cli)
[DEBUG] Style:         Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <basedir default-value="${project.basedir}"/>
  <catalogHandling default-value="passThrough">${xml.catalogHandling}</catalogHandling>
  <catalogs>
    <catalog>config/catalog.xml</catalog>
  </catalogs>
  <project default-value="${project}"/>
  <settings default-value="${settings}"/>
  <skip default-value="false">${xml.skip}</skip>
  <validationSets>
    <validationSet>
      <dir>config</dir>
      <excludes>
        <exclude>java.header</exclude>
        <exclude>java_regexp.header</exclude>
        <exclude>org.eclipse.jdt.core.prefs</exclude>
        <exclude>intellij-idea-inspections.properties</exclude>
      </excludes>
    </validationSet>
    <validationSet>
      <dir>src/site/resources/files</dir>
      <systemId>src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd</systemId>
    </validationSet>
    <validationSet>
      <dir>src/site</dir>
      <includes>
        <include>site.xml</include>
      </includes>
      <systemId>http://maven.apache.org/xsd/decoration-1.0.0.xsd</systemId>
    </validationSet>
    <validationSet>
      <dir>src/test/resources</dir>
      <includes>
        <include>com/puppycrawl/tools/checkstyle/packagenamesloader/InputPackageNamesLoaderFile.xml</include>
        <include>com/puppycrawl/tools/checkstyle/treewalker/InputTreeWalkerNotJava.xml</include>
      </includes>
      <systemId>src/main/resources/com/puppycrawl/tools/checkstyle/packages_1_0.dtd</systemId>
    </validationSet>
    <validationSet>
      <dir>src/main/resources</dir>
      <includes>
        <include>google_checks.xml</include>
        <include>sun_checks.xml</include>
      </includes>
      <systemId>src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_3.dtd</systemId>
    </validationSet>
  </validationSets>
</configuration>
[DEBUG] =======================================================================
[INFO] 
[INFO] --- xml-maven-plugin:1.0.2:validate (default-cli) @ checkstyle ---
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=287723, ConflictMarker.markTime=177834, ConflictMarker.nodeCount=67, ConflictIdSorter.graphTime=506572, ConflictIdSorter.topsortTime=42252, ConflictIdSorter.conflictIdCount=31, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=3363839, ConflictResolver.conflictItemCount=66, DefaultDependencyCollector.collectTime=135858736, DefaultDependencyCollector.transformTime=4425757}
[DEBUG] org.codehaus.mojo:xml-maven-plugin:jar:1.0.2:
[DEBUG]    org.apache.maven:maven-plugin-api:jar:3.0:compile
[DEBUG]       org.apache.maven:maven-model:jar:3.0:compile
[DEBUG]       org.apache.maven:maven-artifact:jar:3.0:compile
[DEBUG]       org.sonatype.sisu:sisu-inject-plexus:jar:1.4.2:compile
[DEBUG]          org.sonatype.sisu:sisu-inject-bean:jar:1.4.2:compile
[DEBUG]             org.sonatype.sisu:sisu-guice:jar:noaop:2.1.7:compile
[DEBUG]    org.apache.maven:maven-core:jar:3.0:compile
[DEBUG]       org.apache.maven:maven-settings:jar:3.0:compile
[DEBUG]       org.apache.maven:maven-settings-builder:jar:3.0:compile
[DEBUG]       org.apache.maven:maven-repository-metadata:jar:3.0:compile
[DEBUG]       org.apache.maven:maven-model-builder:jar:3.0:compile
[DEBUG]       org.apache.maven:maven-aether-provider:jar:3.0:runtime
[DEBUG]       org.sonatype.aether:aether-impl:jar:1.7:compile
[DEBUG]          org.sonatype.aether:aether-spi:jar:1.7:compile
[DEBUG]       org.sonatype.aether:aether-api:jar:1.7:compile
[DEBUG]       org.sonatype.aether:aether-util:jar:1.7:compile
[DEBUG]       org.codehaus.plexus:plexus-interpolation:jar:1.14:compile
[DEBUG]       org.codehaus.plexus:plexus-classworlds:jar:2.2.3:compile
[DEBUG]       org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
[DEBUG]       org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
[DEBUG]          org.sonatype.plexus:plexus-cipher:jar:1.4:compile
[DEBUG]    org.codehaus.plexus:plexus-utils:jar:3.0.22:compile
[DEBUG]    org.codehaus.plexus:plexus-resources:jar:1.0.1:compile
[DEBUG]       org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[DEBUG]          junit:junit:jar:4.12:test
[DEBUG]             org.hamcrest:hamcrest-core:jar:1.3:test
[DEBUG]          classworlds:classworlds:jar:1.1-alpha-2:compile
[DEBUG]    xml-resolver:xml-resolver:jar:1.2:compile
[DEBUG]    org.codehaus.plexus:plexus-io:jar:2.6.1:compile
[DEBUG]       commons-io:commons-io:jar:2.2:compile
[DEBUG] Created new class realm plugin>org.codehaus.mojo:xml-maven-plugin:1.0.2
[DEBUG] Importing foreign packages into class realm plugin>org.codehaus.mojo:xml-maven-plugin:1.0.2
[DEBUG]   Imported:  < project>com.puppycrawl.tools:checkstyle:8.10-SNAPSHOT
[DEBUG] Populating class realm plugin>org.codehaus.mojo:xml-maven-plugin:1.0.2
[DEBUG]   Included: org.codehaus.mojo:xml-maven-plugin:jar:1.0.2
[DEBUG]   Included: org.sonatype.sisu:sisu-inject-bean:jar:1.4.2
[DEBUG]   Included: org.sonatype.sisu:sisu-guice:jar:noaop:2.1.7
[DEBUG]   Included: org.sonatype.aether:aether-util:jar:1.7
[DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.14
[DEBUG]   Included: org.codehaus.plexus:plexus-component-annotations:jar:1.5.5
[DEBUG]   Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3
[DEBUG]   Included: org.sonatype.plexus:plexus-cipher:jar:1.4
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.0.22
[DEBUG]   Included: org.codehaus.plexus:plexus-resources:jar:1.0.1
[DEBUG]   Included: xml-resolver:xml-resolver:jar:1.2
[DEBUG]   Included: org.codehaus.plexus:plexus-io:jar:2.6.1
[DEBUG]   Included: commons-io:commons-io:jar:2.2
[DEBUG] Configuring mojo org.codehaus.mojo:xml-maven-plugin:1.0.2:validate from plugin realm ClassRealm[plugin>org.codehaus.mojo:xml-maven-plugin:1.0.2, parent: sun.misc.Launcher$AppClassLoader@33909752]
[DEBUG] Configuring mojo 'org.codehaus.mojo:xml-maven-plugin:1.0.2:validate' with basic configurator -->
[DEBUG]   (f) basedir =  ~/java/github/checkstyle/checkstyle
[DEBUG]   (f) catalogHandling = passThrough
[DEBUG]   (f) catalogs = [config/catalog.xml]
[DEBUG]   (f) project = MavenProject: com.puppycrawl.tools:checkstyle:8.10-SNAPSHOT @  ~/java/github/checkstyle/checkstyle/pom.xml
[DEBUG]   (f) settings = org.apache.maven.execution.SettingsAdapter@378bd86d
[DEBUG]   (f) skip = false
[DEBUG]   (s) dir =  ~/java/github/checkstyle/checkstyle/config
[DEBUG]   (s) excludes = [java.header, java_regexp.header, org.eclipse.jdt.core.prefs, intellij-idea-inspections.properties]
[DEBUG]   (s) dir =  ~/java/github/checkstyle/checkstyle/src/site/resources/files
[DEBUG]   (s) systemId = src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd
[DEBUG]   (s) dir =  ~/java/github/checkstyle/checkstyle/src/site
[DEBUG]   (s) includes = [site.xml]
[DEBUG]   (s) systemId = http://maven.apache.org/xsd/decoration-1.0.0.xsd
[DEBUG]   (s) dir =  ~/java/github/checkstyle/checkstyle/src/test/resources
[DEBUG]   (s) includes = [com/puppycrawl/tools/checkstyle/packagenamesloader/InputPackageNamesLoaderFile.xml, com/puppycrawl/tools/checkstyle/treewalker/InputTreeWalkerNotJava.xml]
[DEBUG]   (s) systemId = src/main/resources/com/puppycrawl/tools/checkstyle/packages_1_0.dtd
[DEBUG]   (s) dir =  ~/java/github/checkstyle/checkstyle/src/main/resources
[DEBUG]   (s) includes = [google_checks.xml, sun_checks.xml]
[DEBUG]   (s) systemId = src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_3.dtd
[DEBUG]   (f) validationSets = [org.codehaus.mojo.xml.validation.ValidationSet@6331250e, org.codehaus.mojo.xml.validation.ValidationSet@a10c1b5, org.codehaus.mojo.xml.validation.ValidationSet@644abb8f, org.codehaus.mojo.xml.validation.ValidationSet@1a411233, org.codehaus.mojo.xml.validation.ValidationSet@70325d20]
[DEBUG] -- end configuration --
Setting resolver verbosity to maximum.
Parse catalog: ./xcatalog
Loading catalog: ./xcatalog
Default BASE: file:/// ~/java/github/checkstyle/checkstyle/xcatalog
Catalog does not exist: file:/// ~/java/github/checkstyle/checkstyle/xcatalog
Parse catalog:  ~/java/github/checkstyle/checkstyle/config/catalog.xml
Loading catalog:  ~/java/github/checkstyle/checkstyle/config/catalog.xml
Default BASE: file: ~/java/github/checkstyle/checkstyle/config/catalog.xml
system: http://checkstyle.sourceforge.net/dtds/configuration_1_0.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_0.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/configuration_1_0.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_0.dtd
system: http://checkstyle.sourceforge.net/dtds/configuration_1_1.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_1.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/configuration_1_1.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_1.dtd
system: http://checkstyle.sourceforge.net/dtds/configuration_1_2.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_2.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/configuration_1_2.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_2.dtd
system: http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_3.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/configuration_1_3.dtd
system: http://checkstyle.sourceforge.net/dtds/packages_1_0.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/packages_1_0.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/packages_1_0.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/packages_1_0.dtd
system: http://checkstyle.sourceforge.net/dtds/suppressions_1_0.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/suppressions_1_0.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd
system: http://checkstyle.sourceforge.net/dtds/suppressions_1_1.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_1.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/suppressions_1_1.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_1.dtd
system: http://checkstyle.sourceforge.net/dtds/suppressions_1_2.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_2.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/suppressions_1_2.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_2.dtd
system: http://checkstyle.sourceforge.net/dtds/suppressions_1_1_xpath_experimental.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_1_xpath_experimental.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/suppressions_1_1_xpath_experimental.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_1_xpath_experimental.dtd
system: http://checkstyle.sourceforge.net/dtds/suppressions_1_2_xpath_experimental.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_2_xpath_experimental.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/suppressions_1_2_xpath_experimental.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_2_xpath_experimental.dtd
system: http://checkstyle.sourceforge.net/dtds/import_control_1_0.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_0.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/import_control_1_0.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_0.dtd
system: http://checkstyle.sourceforge.net/dtds/import_control_1_1.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_1.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/import_control_1_1.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_1.dtd
system: http://checkstyle.sourceforge.net/dtds/import_control_1_2.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_2.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/import_control_1_2.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_2.dtd
system: http://checkstyle.sourceforge.net/dtds/import_control_1_3.dtd
  ./../src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_3.dtd
SYSTEM: http://checkstyle.sourceforge.net/dtds/import_control_1_3.dtd
  file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/checks/imports/import_control_1_3.dtd
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/assembly-bin.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/assembly-src.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/build.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/checkstyle_non_main_files_suppressions.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/deploy-settings.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/import-control-test.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/intellij-idea-inspection-scope.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/pmd-main.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/sevntu_suppressions.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/version-number-rules.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/import-control.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/checkstyle_sevntu_checks.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/pmd.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/suppressions-xpath.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/ant-phase-compile.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/checkstyle_checks.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/suppressions.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/ant-phase-verify.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/checkstyle_non_main_files_checks.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/default_sonar_profile.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/intellij-idea-inspections.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/spotbugs-exclude.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/pmd-test.xml
[DEBUG] Parsing  ~/java/github/checkstyle/checkstyle/config/catalog.xml
[DEBUG] Loading schema with public Id null, system Id src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd
resolveSystem(src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd)
[DEBUG] The resource 'file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd' was not found with resourceLoader org.codehaus.plexus.resource.loader.JarResourceLoader.
[DEBUG] The resource 'file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd' was not found with resourceLoader org.codehaus.plexus.resource.loader.ThreadContextClasspathResourceLoader.
[DEBUG] The resource 'file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd' was not found with resourceLoader org.codehaus.plexus.resource.loader.FileResourceLoader.
[DEBUG] The resource 'file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd' was found as file: ~/java/github/checkstyle/checkstyle/src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.894 s
[INFO] Finished at: 2018-04-12T14:49:43-07:00
[INFO] Final Memory: 16M/304M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:xml-maven-plugin:1.0.2:validate (default-cli) on project checkstyle: Failed to load schema with public ID null, system ID src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd: The markup in the document preceding the root element must be well-formed. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:xml-maven-plugin:1.0.2:validate (default-cli) on project checkstyle: Failed to load schema with public ID null, system ID src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd: The markup in the document preceding the root element must be well-formed.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    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:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to load schema with public ID null, system ID src/main/resources/com/puppycrawl/tools/checkstyle/suppressions_1_0.dtd: The markup in the document preceding the root element must be well-formed.
    at org.codehaus.mojo.xml.ValidateMojo.getSchema (ValidateMojo.java:128)
    at org.codehaus.mojo.xml.ValidateMojo.validate (ValidateMojo.java:272)
    at org.codehaus.mojo.xml.ValidateMojo.execute (ValidateMojo.java:318)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    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:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
Caused by: org.xml.sax.SAXParseException: The markup in the document preceding the root element must be well-formed.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException (ErrorHandlerWrapper.java:203)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError (ErrorHandlerWrapper.java:177)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (XMLErrorReporter.java:400)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (XMLErrorReporter.java:327)
    at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError (XMLScanner.java:1472)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next (XMLDocumentScannerImpl.java:872)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next (XMLDocumentScannerImpl.java:602)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next (XMLNSDocumentScannerImpl.java:112)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument (XMLDocumentFragmentScannerImpl.java:505)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse (XML11Configuration.java:842)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse (XML11Configuration.java:771)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse (XMLParser.java:141)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse (AbstractSAXParser.java:1213)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse (SAXParserImpl.java:643)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument (XSDHandler.java:2280)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema (XSDHandler.java:565)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema (XMLSchemaLoader.java:610)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar (XMLSchemaLoader.java:569)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar (XMLSchemaLoader.java:535)
    at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema (XMLSchemaFactory.java:254)
    at javax.xml.validation.SchemaFactory.newSchema (SchemaFactory.java:638)
    at org.codehaus.mojo.xml.ValidateMojo.getSchema (ValidateMojo.java:123)
    at org.codehaus.mojo.xml.ValidateMojo.validate (ValidateMojo.java:272)
    at org.codehaus.mojo.xml.ValidateMojo.execute (ValidateMojo.java:318)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:309)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:194)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:107)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:955)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:290)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:194)
    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:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356)
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
@rosslamont
Copy link
Contributor

Thanks, I've now got a failing test case.

@rosslamont
Copy link
Contributor

Caused by fix for issue #10. At the moment I suspect there may be a feature on the standard jaxp SchemaFactory which allows it to accept dtds and return an empty schema (which is what the old Xerces SchemaFactory did). But alternatively we may need to detect upfront that the file is a dtd.

@rosslamont
Copy link
Contributor

Actually this is not a bug, its the correct behaviour.

The default language for validation is XMLSchema, and your config is referring to DTDs. The only reason it used to work is due to an old bug in Xerces 2.9.1 which silently ignored faulty schema.

The correct way to do this is to have a DOCTYPE decl in your XML document and configure your validation set as follows:

<validationSet>
              <dir>src/main/xml</dir>
              <!--systemId>src/main/dtd/sample.dtd</systemId-->
              <validating>true</validating>
</validationSet>

I've raised issue #48 to consider the possibility of doing DTD validation of arbitrary documents (which will be a long time coming) and #47 to improve the documentation.

@romani
Copy link
Author

romani commented Apr 17, 2018

@rosslamont , does it mean that there is no way right now to validate xml by DTD that is located only in repository (not somewhere in web) ?

Web links to DTD become valid only after release, to validate all files before we used catalog file to let validate by mean of local DTD files.

Does it mean that release 1.0.1 also does not do validation ? and we are currently in illusion that plugin do validation.

@jochenw
Copy link
Member

jochenw commented Apr 17, 2018

@rosslamont I am almost sure, that DTD validation is possible. Lets check that.

@jochenw jochenw reopened this Apr 17, 2018
@rosslamont
Copy link
Contributor

Hi Roman,

It's definitely possible to do what you want provided that you have a DOCTYPE decl in your xml document and you've setup a catalog. In your case, you have the DOCTYPE decl and you have the catalog, so you will be fine if you make the config changes I suggested above. To be really clear, I only checked the first failing validationSet in the checkstyle project, so you'll have to check the remaining validationSets to make sure they have the DOCTYPE properly set (and you should double check your catalogs to make sure they have a mapping to your local build for each DTD).

Actually, to help there is a new config called catalogHandling which you can use to force the build to only use catalog entries. It might be helpful to turn it on. Here's an example:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>xml-maven-plugin</artifactId>
    <version>1.0.2</version>
    <configuration>
        <catalogHandling>strict</catalogHandling>
        ...
    </configuration>
</plugin>

@rosslamont
Copy link
Contributor

Hi Jochen,

I assure you its not possible via publicID and systemId in the plugin config. Standard DOCTYPE declaration and catalog work fine as I explain in my previous comment to Roman.

I've spent hours going over it, including building a non-optimised version of xerces 2.9.1 and stepping through it, seeing how it silently throws and catches an exception when it tries to turn the dtd into an XMLSchema. (more recent xerces and the default xerces based JAXP implementation also throw the exception but don't catch it). It then goes on and returned an "EmptySchema" object which is then used to validate the document, which of course works fine as that schema allows any XML. I've also done some local test cases to assure myself that even if a totally nonsense DTD is used (ie syntactically incorrect), it is silently ignored.

Furthermore, there is documentation to suggest that it's not possible. The JAXP validation documentation states:

Note that because the XML DTD is strongly tied to the parsing process and has a significant effect on the parsing process, it is impossible to define the DTD validation as a process independent from parsing

There are also some comments on stackoverflow.

One possible solution would be to re-instate Xerces and use Xerces XNI to build a custom parser chain, but given the community's distaste for Xerces and bug #10, I don't think that's a good idea.

I'll leave this open if you wish to look into it yourself. I can also check my failing test case into a branch to save you some effort if you want to go down that path.

Ross

@romani
Copy link
Author

romani commented Apr 18, 2018

@rosslamont , thanks a lot for you help.
I would never figure out how to make it work, documentation definitely need to be extended.

All items you suggested are required to be in configs to make it work, see my commit above.

Suggestions:

  1. document "catalogHandling", or just provide examples of usage.
  2. " true ....." special validating flag in validation set. I thought if I define validationSet it already meant I need to validate it. Some documentation/examples should be updated.

@rosslamont
Copy link
Contributor

Hi Roman,

Documentation for "catalogHandling" is already there (http://www.mojohaus.org/xml-maven-plugin/validation.html). Do you think that needs improvement?

I will work on the other documentation issue in issue #47

Yes and some more examples would be great.

Best Regards
Ross

@romani
Copy link
Author

romani commented May 2, 2018

validating flag need a bit more attention, in my understanding xsd and DTD is kind of the same, so it is not clear why it was required.
Now when reading documentation for catalog , smth become more clear, so looks like just extension for examples will show it in action so become clear.

@rosslamont
Copy link
Contributor

Hi Roman, the doc in v 1.0.3 should make it clearer when released, but to help you understand, JAXP 1.2 introduced a new validation API, which supported external validations, principally xsd, but theoretically any pluggable validation language such as Relax-NG or Schematron. SAX and DOM also have a much simpler validation mechanism which predates JAXP which only supports a hard-wired DTD and XSD validator. Unfortunately the new validation API does not support DTD, but is supposed to be the "preferred" way of doing things. So there is an overlap for XSD which works on both approaches.

This is why the mojo config is quite messy and why we have the validation flag, as that flag drives the old-style SAX validation approach, necessary to get a DTD validation.

@romani
Copy link
Author

romani commented May 4, 2018

thanks a lot, it would be good to see such explanation in web site close to example or flag.
Looks like my knowledge in xml/xsd/dtd become obsolete, and I lost somewhere in past.

I am pretty sure that most users will never know such nuance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants