2

When I scan my XML file from the command line, I see a "No JSR 303 Bean Validation provider available.":

C:\Dev\jqassistant.distribution-1.0.0>.\bin\jqassistant.cmd scan -f ..\Main\PC_MES\docs\javadoc\publishedApi.xml -s jqassistant\xml
Using JQASSISTANT_HOME 'C:\Dev\jqassistant.distribution-1.0.0\bin\..'.
[main] INFO com.buschmais.jqassistant.core.plugin.impl.PluginConfigurationReaderImpl - Loaded jQAssistant plugins [CDI, Common, Core Analysis, EJB3, Facelet, JAX-RS, JPA 2, JUnit, Java, Java 8, Java EE 6, Maven 2 Repository, Maven 3, OSGi, RDBMS, TestNG, Tycho, XML].
Opening store in directory 'C:\Dev\jqassistant.distribution-1.0.0\jqassistant\xml'
[main] INFO com.buschmais.xo.impl.XOManagerFactoryImpl - No JSR 303 Bean Validation provider available.
[main] INFO com.buschmais.xo.neo4j.impl.datastore.EmbeddedNeo4jDatastore - Creating index for label Pom on property 'fqn'.
... <some more infos about index creation>

The resulting database contains only one node, a file node, but no nodes for the XML contents of the file. The file has no corresponding DTD, it looks like this:

<?xml version="1.0"?>
<publishedAPI>
  <class name="MyClass">
    <constructor signature="void &lt;init&gt;()"></constructor>
    <method signature="void Save(Time, java.lang.String, AccessPrivilege)"></method>
  </class>
</publishedAPI>
Sven Thiel
  • 21
  • 2

1 Answers1

1

XML files might be quite large and scanning may take lot of time, therefore per default only known XML documents (e.g. beans.xml, persistence.xml) are parsed.

You can force scanning a single XML content by specifying a scope, e.g. on the command line:

jqassistant.sh scan -f xml:document::myFile.xml

or in the configuration of the Maven plugin:

<configuration>
  <scanIncludes>
    <scanInclude>
      <path>${project.build.directory}/myFile.xml</path>
      <scope>xml:document</scope>
    </scanInclude>
  </scanIncludes>
</configuration>

The warning "No JSR 303 Bean Validation provider available." is issued by eXtended Objects, the object/graph mapping framework behind jQAssistant - it does not indicate any problem in this case, maybe the severity of the message could be reduced to "info"

Dirk Mahler
  • 1,186
  • 1
  • 6
  • 7
  • 1
    Note that this solution provides a "raw" XML representation with nodes for elements, attributes, namespaces etc.It could make sense to provide a more specific data model for a specific kind of XML files by writing a plugin as described in the [documentation](http://buschmais.github.io/jqassistant/doc/1.0.0/#_custom_scanner_plugin) which allows queries like `match (p:PluginAPI:Xml)-[:DECLARES]->(c:Class) where ... return ...` – Dirk Mahler Jul 18 '15 at 16:53