alfredas / AgentSpring

Agent Based Modeling framework based on Spring and Neo4J
24 stars 18 forks source link

Cannot install #13

Open Pixelkracht opened 10 years ago

Pixelkracht commented 10 years ago

Hi,

I'm on Windows 8.1 with JDK 1.8.0 and having trouble installing. Please let me know if I am doing something wrong. When I do mvn clean install I get the following error:

[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.0:compile (default) on project agentspring-engine: Compiler errors : [ERROR] error at (no source information available) [ERROR] C:\Agent based modelling\trunk\agentspring-engine\src\main\java\agentspring\HPCService.java:0::0 The type java.util.Comparator cannot be resolved. It is indirectly referenced from required .class files [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.0:compile (default) on project agentspring-engine: Compiler errors : error at (no source information available) C:\Agent based modelling\trunk\agentspring-engine\src\main\java\agentspring\HPCService.java:0::0 The type java.util.Comparator cannot be resolved. It is indirectly referenced from required .class files at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) 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:483) 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) Caused by: org.codehaus.mojo.aspectj.CompilationFailedException: Compiler errors : error at (no source information available) C:\Agent based modelling\trunk\agentspring-engine\src\main\java\agentspring\HPCService.java:0::0 The type java.util.Comparator cannot be resolved. It is indirectly referenced from required .class files at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:382) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) ... 19 more

There are also more than two hundred warnings similar to this one:

[WARNING] Could not transfer metadata org.springframework:spring-beans/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-beans/maven-metadata.xml , ReasonPhrase:Forbidden. Downloading: http://tinkerpop.com/maven2/org/springframework/spring-beans/3.0.8.BUILD-SNAPSHOT/maven-metadata.xml

And there's this (not sure if it's important):

[WARNING] Some problems were encountered while building the effective model for agentspring:agentspring-engine:jar:1.0.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework:spring-test:jar -> duplicate declaration of version ${spring.version} @ line 90, column 17
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for agentspring:agentspring-face:war:1.0.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.springframework:spring-test:jar -> duplicate declaration of version ${spring.version} @ line 73, column 21
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: javax.servlet:jstl:jar -> duplicate declaration of version 1.2 @ line 177, column 21
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.codehaus.mojo:tomcat-maven-plugin @ line 308, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 224, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 301, column 21
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] ```
JCRichstein commented 10 years ago

I'm sorry, none of us has ever tested AgentSpring with Windows 8.1 nor Java 1.8.0, and unfortunately I don't think we will check this combination of OS and Java version ourselves very soon. A first step you could try is to see if it works under Windows 8.1 with Java 7 or 6, and the next one to install ubuntu with either of these to Java versions on the computer or in a VirtualBox. If you do, please share the result here.

cbdavis commented 9 years ago

I'm running into the same issue under linux, and suspect that the problem is that the tinkerpop repository isn't at the same url anymore. I'm also seeing lots of errors like this:

[WARNING] Could not transfer metadata org.springframework:spring-core:3.2.1.BUILD-SNAPSHOT/maven-metadata.xml from/to tinkerpop-repository (http://tinkerpop.com/maven2): Access denied to: http://tinkerpop.com/maven2/org/springframework/spring-core/3.2.1.BUILD-SNAPSHOT/maven-metadata.xml , ReasonPhrase:Forbidden.

One partial solution seems to be to update agentspring-engine/pom.xml so that a newer version of spring-data-neo4j is used. In the AgentSpring pom.xml files I can't find any mention of the Tinkerpop URLs, but I suspect that they're probably mentioned on the neo4j repository for older versions of the code. In the pom.xml file for agentspring-engine, I've changed this:

<data-graph.version>2.0.1.RELEASE</data-graph.version>

to this:

<data-graph.version>2.1.0.RELEASE</data-graph.version>

This seems to be the lowest version number that doesn't reference tinkerpop when I run mvn clean install. I still get a few errors when compiling the code, but these are probably due to API changes.

Sanloremi commented 5 years ago

Hello everyone, I am currently using windows 10 and jdk 1.8 version. I am facing issues while installing the model into my system. On running 'mvn package' command I get a compilation error: image The following are the errors that I get while trying to run the code as JUnit Test: 1.Missing artifact agentspring:agentspring-engine:jar:1.0.0-SNAPSHOT 2.Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.0:compile (execution: default, phase: process-sources) 3.Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.0:test-compile (execution: default, phase: process-test-sources) 4.Project configuration is not up-to-date with pom.The container 'Maven Dependencies' references non existing library 'C:\Users\Sanlo.m2\repository\agentspring\agentspring-engine\1.0.0-SNAPSHOT\agentspring-engine-1.0.0-SNAPSHOT.jar'xml. Select: Maven->Update Project... from the project context menu or use Quick Fix.

As a solution to these issues, 1.I tried downloading manually the aspectJ plugin names 'aspectj-maven-plugin-1.0-beta-2'. And then added it to the external JARs in Java Build Path. But the Problem still persists. 2.I tried downloading JDK 12 and Maven 3.6.1, this doesn't solve the problem. And there was a compilation error. image

  1. Some Stackoverflow pages suggested to delete the .m2 repository and then try running 'mvn clean install'. image My Pom.xml is:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

4.0.0 nl.tudelft.tbm.energy emlab-generation 1.0.0-SNAPSHOT emlab-generation http://www.eeni.tbm.tudelft.nl UTF-8 1.6.12 1.6.3 agentspring agentspring-engine 1.0.0-SNAPSHOT org.apache.commons commons-math 2.1 colt colt 1.2.0 com.googlecode.jcsv jcsv 1.4.0 org.neo4j neo4j-kernel 1.6 test-jar test junit junit 4.8.1 test org.apache.maven.plugins maven-compiler-plugin 2.1 1.8 1.8 org.apache.maven.plugins maven-resources-plugin 2.4.2 ${project.build.sourceEncoding} org.apache.maven.plugins maven-surefire-plugin 2.12.2 true **/*Tests.java **/*Test.java **/Abstract*.java junit:junit org.apache.maven.plugins maven-eclipse-plugin 2.7 true false 2.0 org.eclipse.ajdt.core.ajbuilder org.springframework.aspects org.springframework.ide.eclipse.core.springbuilder org.eclipse.ajdt.ui.ajnature com.springsource.sts.roo.core.nature org.springframework.ide.eclipse.core.springnature org.apache.maven.plugins maven-idea-plugin 2.2 true true org.codehaus.mojo aspectj-maven-plugin 1.0 true org.springframework spring-aspects org.springframework.data spring-data-neo4j-aspects 1.6 1.6 compile test-compile org.codehaus.mojo aspectj-maven-plugin 1.0-beta-2 org.aspectj aspectjrt ${aspectj.version} org.aspectj aspectjtools ${aspectj.version} org.codehaus.mojo exec-maven-plugin 1.1 exec agentspring.HPCService org.apache.maven.plugins maven-shade-plugin 1.4 package shade agentspring.HPCService META-INF/spring.handlers META-INF/spring.schemas Enable this transformer if you have a queries.properties file in the same directory as the pom.xml queries.properties queries.properties org.apache.maven.plugins maven-assembly-plugin jar-with-dependencies service true org.codehaus.mojo exec-maven-plugin 1.1 exec agentspring.Service java.security.policyservice.policy hpc org.codehaus.mojo exec-maven-plugin 1.1 exec agentspring.HPCService Any suggestions are appreciated.