Hi Janusz,
Glad to hear you're getting some good use from the SPDX Tools. What you described sounds like a bug to me - I'll look into it this weekend. It has been a while since I've worked with the RdfToHTML code, and I typically run it from my development environment rather than from the released Jar file so it is quite likely there is a bad file or directory reference in the code. I'll let you know what I find. Gary From: [email protected] [mailto:[email protected]] On Behalf Of Janusz Kwasny Sent: Monday, December 21, 2015 8:40 AM To: [email protected] Subject: Spdx-tools RdfToHtml Hi guys, I've just started evaluating spdx tools to see what it can do for my project (thanks for doing it by the way) and need some help. I hope you don't mind answering my question. Probably as many other users I've started with fossology and realized it would be good to have some form of report for fossology output. This brought me to spdx and spdx-tools. I've taken the results of fossology scan and exported it into spdx format. Then I've run it through spdx tools with RdfToSpreadsheet which worked quite well. I run into a problems however when I tried using RdfToHtml. I've done the following: 1. Downloaded spdx-tools (tried both 2.0.3 and 2.0.4 snapshot) 2. Compiled with Maven 3.0.4 3. Put spdx-tools-2.0.3-jar-with-dependencies.jar into runtime environment (Windows 7) 4. Copied resources folder into the same location where spdx-tools-2.0.3-jar-with-dependencies.jar is My rdf file is called lws.rdf so I've tried running command java -jar spdx-tools-2.0.3-jar-with-dependencies.jar RdfToHtml lws.rdf lws.html But it failed with exception: Exception in thread "main" com.google.common.util.concurrent.UncheckedExecutionException: com.github.mustachejava.MustacheException: Template PackageHTMLTemplate.html not found at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201) at com.google.common.cache.LocalCache.get(LocalCache.java:3934) at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:482 1) at com.github.mustachejava.DefaultMustacheFactory.compile(DefaultMustacheFactor y.java:174) at org.spdx.tools.RdfToHtml.rdfToHtml(RdfToHtml.java:217) at org.spdx.tools.RdfToHtml.rdfToHtml(RdfToHtml.java:346) at org.spdx.tools.RdfToHtml.main(RdfToHtml.java:158) at org.spdx.tools.Main.main(Main.java:35) Caused by: com.github.mustachejava.MustacheException: Template PackageHTMLTemplate.html not found at com.github.mustachejava.DefaultMustacheFactory.getReader(DefaultMustacheFact ory.java:85) at com.github.mustachejava.MustacheParser.compile(MustacheParser.java:27) at com.github.mustachejava.DefaultMustacheFactory$1.load(DefaultMustacheFactory .java:38) at com.github.mustachejava.DefaultMustacheFactory$1.load(DefaultMustacheFactory .java:35) at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCac he.java:3524) at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2 280) at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) ... 8 more templateDirName seems to be set correctly to resources\htmlTemplate and this folder exists (relative to location of lws.rdf). I've then played with it a little more, tried different things got a few more errors and finally got it working when I did the following: 1. Copy all templates from resources\htmlTemplate to the same directory where lws.rdf file is 2. Manually create directory tree (relative to the location of lws.rdf) lws.html\data\fossology\repository 3. Run java -jar spdx-tools-2.0.3-jar-with-dependencies.jar RdfToHtml lws.rdf lws.html So, I got it working however I'm wondering if there is something I've missed in the setup so that I don't need to do the tricks with manually creating output directories or copying template files. Is there something I can set so templates can stay in htmlTemplate folder and output tree created automatically? Thanks a lot, Janusz
_______________________________________________ Spdx-tech mailing list [email protected] https://lists.spdx.org/mailman/listinfo/spdx-tech
