Java Optaplanner-网站资源不存在

Java Optaplanner-网站资源不存在,java,optaplanner,Java,Optaplanner,我正在为我的项目制作一个可运行的jar,当它开始生成基准测试报告时,我不断遇到这个错误: Exception in thread "main" java.lang.IllegalStateException: The websiteResource (twitterbootstrap/css/bootstrap-responsive.css) does not exist. at org.optaplanner.benchmark.impl.report.WebsiteResourceU

我正在为我的项目制作一个可运行的jar,当它开始生成基准测试报告时,我不断遇到这个错误:

Exception in thread "main" java.lang.IllegalStateException: The websiteResource (twitterbootstrap/css/bootstrap-responsive.css) does not exist.
    at org.optaplanner.benchmark.impl.report.WebsiteResourceUtils.copyResource(WebsiteR esourceUtils.java:57)
    at org.optaplanner.benchmark.impl.report.WebsiteResourceUtils.copyResourcesTo(WebsiteResourceUtils.java:33)
    at org.optaplanner.benchmark.impl.report.BenchmarkReport.writeHtmlOverviewFile(BenchmarkReport.java:738)
    at org.optaplanner.benchmark.impl.report.BenchmarkReport.writeReport(BenchmarkReport.java:287)
    at org.optaplanner.benchmark.impl.DefaultPlannerBenchmark.benchmarkingEnded(DefaultPlannerBenchmark.java:315)
    at org.optaplanner.benchmark.impl.DefaultPlannerBenchmark.benchmark(DefaultPlannerBenchmark.java:109)
由于我在drools和benchmarkConfig路径前面添加了
“resources/”
,所以其他一切都可以正常工作

因为有更多的资源只用于基准测试,我可能也需要为它们做同样的事情


如何访问基准测试的资源?

听起来像是从源代码构建IDE(Eclipse/IntelliJ/NetBeans/…),并且您的项目没有正确设置为也将
*.css
文件复制为类路径资源(因此它在某个地方有一个特定的css排除)


使用现代IntelliJ IDEA版本,打开
pom.xml
文件,这绝对不会发生。对于现代的Eclipse/NetBeans版本,我也这么认为。

听起来像是在用IDE(Eclipse/IntelliJ/NetBeans/…)从源代码构建,并且您的项目没有正确设置为也将
*.css
文件复制为类路径资源(因此它在某个地方有一个特定的css排除)


使用现代IntelliJ IDEA版本,打开
pom.xml
文件,这绝对不会发生。对于现代的Eclipse/NetBeans版本,我认为也是如此。

这是哪个版本?如果您使用的是从optaplanner.org的zip或Maven Central下载的optaplanner-benchmark.jar,那么这种情况永远不会发生。这是一只虫子,但我以前从未见过它。你是从源代码还是其他任何东西构建的?我使用的是GitHub版本,也许这就是原因?对于“GitHub版本”,你的意思是说你使用mvn从源代码构建?这应该也行,我经常从IntelliJ的源代码运行基准测试程序。这是哪个版本?如果您使用的是从optaplanner.org的zip或Maven Central下载的optaplanner-benchmark.jar,那么这种情况永远不会发生。这是一只虫子,但我以前从未见过它。你是从源代码还是其他任何东西构建的?我使用的是GitHub版本,也许这就是原因?对于“GitHub版本”,你的意思是说你使用mvn从源代码构建?这应该也行,我经常从IntelliJ的源代码运行benchmarker。很抱歉延迟回复评论。是的,我正在用EclipseIDE构建。我猜我没有正确地设置我的项目,因为我怀疑这种事情是否会发生。很抱歉延迟回复评论。是的,我正在用EclipseIDE构建。我猜测我没有正确地设置我的项目,因为我怀疑这种事情会发生。