protegeproject / swrlapi-drools-engine

Drools implementation of a SWRLAPI-based OWL 2 RL reasoner and SWRL rule engine
Other
26 stars 13 forks source link

Maven Central: missing dependencies #7

Open jannvck opened 7 years ago

jannvck commented 7 years ago

When using swrlapi-drools-engine 1.1.3 in SBT, I get unresolved dependencies which are not found:

I have tried several former versions of swrlapi-drools-engine which are all affected by these missing dependencies as well.

martinjoconnor commented 7 years ago

Both dependencies are on Maven Central. I am pretty sure SBT also uses Maven Central for artifact resolution so I am not sure what is going on.

Can you build the 1.1.2 version of the SWRLAPI project as per instructions here:

https://github.com/protegeproject/swrlapi-project

jannvck commented 7 years ago

Thank you for your answer. I also saw that they are on Maven Central, but anyways resolution fails for some reason ("not found"). Maybe it's an SBT specific problem, I have not tried other build tools.

I will try building the 1.1.2 version tomorrow!

jannvck commented 7 years ago

The build fails while trying to execute mvn clean install in swrlapi-project folder:

[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Child module /Users/jan/coding/swrlapi/swrlapi-project/../swrlapi-builtin-library-example of /Users/jan/coding/swrlapi/swrlapi-project/pom.xml does not exist @ 
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[ERROR] Child module /Users/jan/coding/swrlapi/swrlapi-project/../swrlapi-builtin-library-example of /Users/jan/coding/swrlapi/swrlapi-project/pom.xml does not exist @ 

    at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:422)
    at org.apache.maven.graph.DefaultGraphBuilder.collectProjects(DefaultGraphBuilder.java:419)
    at org.apache.maven.graph.DefaultGraphBuilder.getProjectsForMavenReactor(DefaultGraphBuilder.java:410)
    at org.apache.maven.graph.DefaultGraphBuilder.build(DefaultGraphBuilder.java:83)
    at org.apache.maven.DefaultMaven.buildGraph(DefaultMaven.java:491)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:219)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    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]   The project edu.stanford.swrl:swrlapi-project:1.1.2 (/Users/jan/coding/swrlapi/swrlapi-project/pom.xml) has 1 error
[ERROR]     Child module /Users/jan/coding/swrlapi/swrlapi-project/../swrlapi-builtin-library-example of /Users/jan/coding/swrlapi/swrlapi-project/pom.xml does not exist
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/ProjectBuildingException
martinjoconnor commented 7 years ago

My mistake. Remove the following line from the POM:

<module>../swrlapi-builtin-library-example</module>

I will try to get a new release out soon that fixes this.

jannvck commented 7 years ago

There's somehow more progress but in the end there's still some error:

Results :

Failed tests: 
  SQWRLCoreIT.TestSQWRLOrderByTime:1509 expected:<p[2]> but was:<p[3]>

Tests run: 552, Failures: 1, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-failsafe-plugin:2.19.1:verify (default) @ swrlapi-integration-tests ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] SWRLAPI ............................................ SUCCESS [ 46.731 s]
[INFO] Drools-based SWRL Rule Engine ...................... SUCCESS [ 41.055 s]
[INFO] SWRLTab Protege 5.0+ Plugin ........................ SUCCESS [ 20.194 s]
[INFO] SWRLAPI Example .................................... SUCCESS [ 53.746 s]
[INFO] Standalone SWRLTab ................................. SUCCESS [ 45.647 s]
[INFO] SWRLAPI Integration Tests .......................... FAILURE [06:28 min]
[INFO] SWRLAPI Project Builder ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10:07 min
[INFO] Finished at: 2016-12-07T14:53:57+01:00
[INFO] Final Memory: 64M/492M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (default) on project swrlapi-integration-tests: There are test failures.
[ERROR] 
[ERROR] Please refer to /disk/sim/home/novacek/dev/swrlapi/swrlapi-integration-tests/target/failsafe-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/MojoFailureException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :swrlapi-integration-tests
martinjoconnor commented 7 years ago

You can ignore for the moment. I am running the tests in parallel and the non-thread-safe Date and DateFormat classes used by the temporal built-ins can generate this error.

I plan to fix this issue.

jannvck commented 7 years ago

I don't see how this is related to the SBT problem. Do you have any idea why the dependency resolution fails?

EDIT:

As the build was successful with maven I think this is a SBT related issue and can therefore be closed. It might be related to this issue: https://github.com/sbt/sbt/issues/1690

Trying to remove the ~/.sbt and ~/.ivy2 folders and reinstalling SBT 0.13.13 made no difference.