Hi Wouter, On Thu, Jun 9, 2016 at 4:17 AM, <user-digest-h...@any23.apache.org> wrote:
> From: Wouter Beek <wou...@triply.cc> > To: user@any23.apache.org > Cc: > Date: Thu, 9 Jun 2016 14:16:37 +0300 > Subject: Issues while building and using Any23 > Hi Any23 maintainers, > > I'm trying to install from Git master. > Cool. Nice to hear more people running off of master branch. > I've come across the following > issues: > > 1. I had to add `<skipTests>true</skipTests>` to the Surefire plugin > configuration in `pom.xml` in order to suppress the test-related errors in > `mvn clean install`. Maybe these tests could be put behind `mvn test` so > that the casual user who compiles from sources does not have to bother with > them? (The tests also print a _lot_ of stuff to user output. Not all of > it seems useful under the default verbosity level.) > OK so we are aware of the tests failing this has to do with one of the underlying SAX parsers (which actually exists over in semargl) being very strict with its interpretation of the InputStream. There is an open pull request to address this but it needs more work. If you are interested then you can find current patch and discussion over at https://github.com/apache/any23/pull/24 Second issue regarding verbose nature of logs has been addressed and pushed to master branch cf. https://issues.apache.org/jira/browse/ANY23-293 This now also means that you only get INFO logging when running the Any23 core application. > > 2. Since my distro comes with JDK 1.8 (and switching JDK versions has > always been somewhat of a Black Art for me) I had to remove > `-XX:PermSize=128m` from the `<extraJvmArguments>` setting in `pom.xml`. > This JVM feature is no longer supported in Java 8, aparently. > We are not fully migrated to JDK1.8 yet. There are a bunch of Javadoc issues to deal with before we do that. Most likely we will do that for the 1.3 release of Any23 e.g. after the pending 1.2 release. > > 3. When I run `bin/any23` from the core package I always see the following > at the top of user output: > > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for > further details. > > To me this seems as if a default setup for the logging infrastructure is > currently missing? > This has also been fixed cf. https://issues.apache.org/jira/browse/ANY23-293 and https://issues.apache.org/jira/browse/ANY23-292 If you pull from master branch the logging will be much more eye friendly now! > > 4. The help flag does not seem to work for me in the CLI: > > $ any23 rover -h > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for > further details. > Exception in thread "main" com.beust.jcommander.ParameterException: > Unknown option: -h > at com.beust.jcommander.JCommander.parseValues(JCommander.java:735) > at com.beust.jcommander.JCommander.parse(JCommander.java:279) > at com.beust.jcommander.JCommander.parse(JCommander.java:262) > at com.beust.jcommander.JCommander.parseValues(JCommander.java:780) > at com.beust.jcommander.JCommander.parse(JCommander.java:279) > at com.beust.jcommander.JCommander.parse(JCommander.java:262) > at org.apache.any23.cli.ToolRunner.execute(ToolRunner.java:96) > at org.apache.any23.cli.ToolRunner.main(ToolRunner.java:69) > > Has something gone wrong during Maven install / can others reproduce this > error? > It works absolutely fine for me lmcgibbn@LMC-032857 /usr/local/any23/core/target/apache-any23-core-1.2-SNAPSHOT(master) $ ./bin/any23 -h Usage: any23 [options] [command] [command options] Options: -h, --help Display help information. Default: false --plugins-dir The Any23 plugins directory. Default: /Users/lmcgibbn/.any23/plugins -X, --verbose Produce execution verbose output. Default: false -v, --version Display version information. Default: false Commands: extractor Utility for obtaining documentation about metadata extractors. Usage: extractor [options] Extractor name Options: -a, --all shows a report about all available extractors Default: false -i, --input shows example input for the given extractor Default: false -l, --list shows the names of all available extractors Default: false -o, --outut shows example output for the given extractor Default: false microdata Commandline Tool for extracting Microdata from file/HTTP source. Usage: microdata [options] Input document URL, { http://path/to/resource.html|file:/path/to/localFile.html} mimes MIME Type Detector Tool. Usage: mimes [options] Input document URL, { http://path/to/resource.html|file:///path/to/local.file|inline:// some inline content} verify Utility for plugin management verification. Usage: verify [options] plugins-dir rover Any23 Command Line Tool. Usage: rover [options] input URIs {<url>|<file>}+ Options: -d, --defaultns Override the default namespace used to produce statements. -e, --extractors a comma-separated list of extractors, e.g. rdf-xml,rdf-turtle Default: [] -f, --format the output format Default: json -l, --log Produce log within a file. -n, --nesting Disable production of nesting triples. Default: false -t, --notrivial Filter trivial statements (e.g. CSS related ones). Default: false -o, --output Specify Output file (defaults to standard output) Default: java.io.PrintStream@6e1def -p, --pedantic Validate and fixes HTML content detecting commons issues. Default: false -s, --stats Print out extraction statistics. Default: false vocab Prints out the RDF Schema of the vocabularies used by Any23. Usage: vocab [options] Options: -f, --format Vocabulary output format Default: N-Quads (mimeTypes=text/x-nquads; ext=nq) > > 5. I am not able to parse an RDF document using the CLI Rover. Example: > > $ any23 rover -e rdf-jsonld example1.json > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for > further details. > > ------------------------------------------------------------------------ > Apache Any23 :: rover > > ------------------------------------------------------------------------ > { "quads" : []} > > ------------------------------------------------------------------------ > Apache Any23 FAILURE > Execution terminated with errors: No suitable extractors found for > source org.apache.any23.source.FileDocumentSource@6b4a4e18 > OK so when using the JSON-LD extractor your input data needs to a) either be pure JSON-LD, or b) JSON-LD contained within an HTML <script> An example of using the extractor on pure JSON-LD can be seen below lmcgibbn@LMC-032857 /usr/local/any23/core/target/apache-any23-core-1.2-SNAPSHOT(master) $ ./bin/any23 rover -e rdf-jsonld /usr/local/any23/core/src/main/resources/org/apache/any23/extractor/rdf/example-jsonld.jsonld ------------------------------------------------------------------------ Apache Any23 :: rover ------------------------------------------------------------------------ [2016-06-15 23:16:29,640] INFO 0[main] - org.apache.any23.rdf.PopularPrefixes.getPrefixes(PopularPrefixes.java:45) - Loading prefixes from /org/apache/any23/prefixes/prefixes.properties [2016-06-15 23:16:30,130] INFO 490[main] - org.apache.any23.extractor.SingleDocumentExtraction.run(SingleDocumentExtraction.java:221) - Processing file:/usr/local/any23/core/src/main/resources/org/apache/any23/extractor/rdf/example-jsonld.jsonld [2016-06-15 23:16:30,462] INFO 822[main] - org.apache.any23.cli.Rover.run(Rover.java:219) - Extractors used: [] [2016-06-15 23:16:30,462] INFO 822[main] - org.apache.any23.cli.Rover.run(Rover.java:220) - 0 triples, 344ms { "quads" : [[{ "type" : "uri", "value" : "http://me.markus-lanthaler.com/"}, "http://xmlns.com/foaf/0.1/knows", { "type" : "uri", "value" : " http://manu.sporny.org/about#manu"}, null], [{ "type" : "uri", "value" : " http://me.markus-lanthaler.com/"}, "http://xmlns.com/foaf/0.1/knows", { "type" : "bnode", "value" : "b0"}, null], [{ "type" : "uri", "value" : " http://me.markus-lanthaler.com/"}, "http://xmlns.com/foaf/0.1/name", {"type" : "literal", "value" : "Markus Lanthaler", "lang" : null, "datatype" : "http://www.w3.org/2001/XMLSchema#string"}, null], [{ "type" : "uri", "value" : "http://manu.sporny.org/about#manu"}, " http://xmlns.com/foaf/0.1/name", {"type" : "literal", "value" : "Manu Sporny", "lang" : null, "datatype" : " http://www.w3.org/2001/XMLSchema#string"}, null], [{ "type" : "bnode", "value" : "b0"}, "http://xmlns.com/foaf/0.1/name", {"type" : "literal", "value" : "Dave Longley", "lang" : null, "datatype" : " http://www.w3.org/2001/XMLSchema#string"}, null]]} ------------------------------------------------------------------------ Apache Any23 SUCCESS Total time: 0s Finished at: Wed Jun 15 23:16:30 PDT 2016 Final Memory: 75M/480M ------------------------------------------------------------------------ > > Can this be reproduced by someone else or did I make a mistake along the > Maven route? > Hopefully the above has solved your issues. Thank you for reporting it all. I hope we have helped you out a bit. > > Thanks for into to my issues! > > Thanks