-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--example not working #557
Comments
Same error also when trying to run on a real project. |
It appears that your
A suggest to you to fix your maven install by making the environment variable JAVA_HOME pointing to a JDK. After a quick look, I found a plenty solutions, e.g. this Cheers |
As I said, JAVA_HOME points to a Java 8 jdk, so it is correct. From mvn -version: The path shown in mvn -version is the correct jdk. It adds \jre, which is correct according to the stackoverflow link you gave above. |
Do you have more than one maven installation? Could you please look at the values of the following environment variables:
Sorry, read to fast. Best. |
I do have an older maven installation on my machine (3.3.9). Should I remove it? I do not have M2_HOME. Interestingly, according to 3.5 release notes, it is no longer supported: |
Could you? It will remove one of my doubt :)
Thank you for the pointer |
I deleted the old maven (I don't use it any more anyway). Still the same error when trying to run dspot. |
Hi @ltboye Could you retry and copy/paste the full logs of the execution? I added some logs. Since I cannot reproduce on my side the errors, it is complicated for me to understand what is happening. |
Sure, this is after building the latest from master: 2018-10-02 14:48:25,120 INFO eu.stamp_project.testrunner.EntryPoint - Path to runner Classes: E:\Dev\stamp\dspot\dspot\target\dspot.jar |
I am sorry, but I don't know. Is it possible that maven does not find its maven home because you are executing DSpot on I ran out of ideas, I am sorry. |
I will try to move DSpot to C:. Have you verified this version of DSpot working on Windows 10? |
I tried on C:, and it gives the same error. I hope in a little while someone at Tellu with a Linux system will try DSpot. |
Hi @danglotb Looking at this issue again, I have found two suggestions which may be worth trying. One is to run Maven with -Dtools_jar_location The other is to add this configuration to the maven-compiler-plugin in the pom: Is it possible for me to try these things by modifying the DSpot source? If you point out where, I can try to experiment. |
Hi @ltboye I am not sure that I understand your solution. But, if you want to add an option in the maven goals you can have a look to the More precisely, the method
I do not like the idea of modifying the |
Closing this issue. Please reopen it or open a new one. Thank you. |
Characteristics
Description
Starting to test DSpot again, I tried to run with --example as described in the readme. I get a compilation error (see below). I have JAVA_HOME pointing to a Java 8 jdk.
Command Line / Options
java -jar target/dspot-USED-VERSION-jar-with-dependencies.jar --example
[INFO] 2018-09-25 13:25:38 EntryPoint - Path to runner Classes: E:\Dev\stamp\dspot\dspot\target\dspot.jar
[INFO] 2018-09-25 13:25:38 EntryPoint - E:\Dev\stamp\dspot\dspot\target\dspot.jar
[INFO] 2018-09-25 13:25:38 EntryPoint - E:\Dev\stamp\dspot\dspot\target\dspot.jar
[INFO] 2018-09-25 13:25:38 EntryPoint - E:\Dev\stamp\dspot\dspot\target\dspot.jar
[WARN] 2018-09-25 13:25:38 AutomaticBuilderFactory - automaticBuilderName: unknown automatic builder specified in configuration, going to default.
[INFO] 2018-09-25 13:25:38 AutomaticBuilderFactory - Default: provided Maven automatic builder.
[INFO] 2018-09-25 13:25:38 MavenAutomaticBuilder - run maven clean test -DskipTests dependency:build-classpath -Dmdep.outputFile=target/dspot/classpath
[WARN] Maven will be executed in interactive mode, but no input stream has been configured for this MavenInvoker instance.
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< example:example >---------------------------
[INFO] Building test-projects 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ example ---
[INFO] Deleting E:\Dev\stamp\dspot\dspot\src\test\resources\test-projects\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ example ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory E:\Dev\stamp\dspot\dspot\src\test\resources\test-projects\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.7.0:compile (default-compile) @ example ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to E:\Dev\stamp\dspot\dspot\src\test\resources\test-projects\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.100 s
[INFO] Finished at: 2018-09-25T13:25:40+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project example: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
[ERROR]
[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
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: java.io.FileNotFoundException: E:\Dev\stamp\dspot\dspot\src\test\resources\test-projects\target\dspot\classpath (Systemet finner ikke angitt bane)
at eu.stamp_project.Main.runExample(Main.java:101)
at eu.stamp_project.Main.main(Main.java:38)
Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: E:\Dev\stamp\dspot\dspot\src\test\resources\test-projects\target\dspot\classpath (Systemet finner ikke angitt bane)
at eu.stamp_project.automaticbuilder.MavenAutomaticBuilder.compileAndBuildClasspath(MavenAutomaticBuilder.java:91)
at eu.stamp_project.program.InputConfiguration.initializeBuilder(InputConfiguration.java:150)
at eu.stamp_project.program.InputConfiguration.initialize(InputConfiguration.java:101)
at eu.stamp_project.program.InputConfiguration.initialize(InputConfiguration.java:71)
at eu.stamp_project.Main.runExample(Main.java:95)
... 1 more
Caused by: java.io.FileNotFoundException: E:\Dev\stamp\dspot\dspot\src\test\resources\test-projects\target\dspot\classpath (Systemet finner ikke angitt bane)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(Unknown Source)
at java.io.FileInputStream.(Unknown Source)
at java.io.FileReader.(Unknown Source)
at eu.stamp_project.automaticbuilder.MavenAutomaticBuilder.compileAndBuildClasspath(MavenAutomaticBuilder.java:88)
... 5 more
The text was updated successfully, but these errors were encountered: