Neo4j-spatial maven build failure - java

I know there is a similar question to this (to question: Neo4j Spatial: can't run spatial), however that question seems to be solved when installing dependencies. I think that is not the solution to my case.
After installing Neo4j and installing maven
$ brew install neo4j
$ brew install maven
making a directory called spatial and cloning neo4j-spatial to this folder.
$ git clone https://github.com/neo4j-contrib/spatial.git
Then i tried to maven install this git clone.
/spatial$ mvn install
After a lot of test it returns a "Build failure"
Results :
Failed tests:
ProgressLoggingListenerTest.testProgressLoggingListnerWithAllLogs:38->testProgressLoggingListenerWithSpecifiedWaits:62
Argument(s) are different! Wanted:
forwardingPrintStream.println(
"100.00 (10/10) - Completed test"
);
-> at org.neo4j.gis.spatial.ProgressLoggingListenerTest.testProgressLoggingListenerWithSpecifiedWaits(ProgressLoggingListenerTest.java:62)
Actual invocation has different arguments:
forwardingPrintStream.println(
"10,00 (1/10) - Running test"
);
-> at org.neo4j.gis.spatial.rtree.ProgressLoggingListener.lambda$new$1(ProgressLoggingListener.java:45)
ProgressLoggingListenerTest.testProgressLoggingListnerWithOnlyStartAndEnd:46->testProgressLoggingListenerWithSpecifiedWaits:62
Argument(s) are different! Wanted:
forwardingPrintStream.println(
"100.00 (10/10) - Completed test"
);
-> at org.neo4j.gis.spatial.ProgressLoggingListenerTest.testProgressLoggingListenerWithSpecifiedWaits(ProgressLoggingListenerTest.java:62)
Actual invocation has different arguments:
forwardingPrintStream.println(
"10,00 (1/10) - Running test"
);
-> at org.neo4j.gis.spatial.rtree.ProgressLoggingListener.lambda$new$1(ProgressLoggingListener.java:45)
Tests run: 146, Failures: 2, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10:34 min
[INFO] Finished at: 2016-09-23T15:55:35+02:00
[INFO] Final Memory: 44M/558M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project neo4j-spatial: There are test failures.
[ERROR]
[ERROR] Please refer to /Volumes/Macintosh HD/Users/Tom/spatial/target/surefire-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
In my queeste to solve this "Build failure" I discovered that most maven install errors are due to dependencies. However these error messages do not indicate any missing dependencies?
I tried using mvn verify however this just seems to try to build the plugin again returning the same Build failure.
/spatial$ mvn verify
Two questions;
- Am I missing dependencies or is the problem in something else?
- If I am missing dependencies, what are they and how to install them?
Thanks in advance!

The tests depend on the locale of the build environment as it checks the result of number formatting with decimal number, expecting a point as the decimal separator:
"100.00 (10/10) - Completed test"
Your locale uses the comma as the decimal separator, based on the actual value reported:
"10,00 (1/10) - Running test"
You have 2 options:
Build the project without running the tests:
mvn install -Dmaven.test.skip
Change the locale for the build:
LANG=C mvn install
or
LANG=en_US mvn install

Related

How to deploy spring boot to heroku?

I wanted to deploy my application to heroku server and I am facing this problem. Any idea?
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.339 s
[INFO] Finished at: 2021-08-09T04:05:01Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project russion_spring_boot: Fatal error compiling: invalid target release: 11 -> [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/MojoExecutionException
! ERROR: Failed to build app with Maven
We're sorry this build is failing! If you can't find the issue in application code,
please submit a ticket so we can help: https://help.heroku.com/
! Push rejected, failed to compile Java app.
! Push failed
<properties>
<java.version>15.0.1</java.version>
</properties>
Logs depict the error - invalid target release: 11. Basically this error means that you have mentioned higher/mismatched version of Java in maven compiler's source and target java version settings in your pom.xml compared to the JDK which is being pointed out by JAVA_HOME environment variable.
To fix this error, just check the Java version in pom.xml and JAVA_HOME. They should match.
To know more about this issue, check this post - https://dzone.com/articles/how-to-fix-invalid-target-release-17-18-19-or-110

Alfresco-Addon Java

I want to develop a ticket-system Add-On for Alfresco,
I am new into Alfresco so I have some troubles getting started
I have downloaded maven and set the path var
Also for java and javac
And now I installed an simple Maven projects with the command
mvn archetype:generate -Dfilter=org.alfresco:
everything installed fine.
Then I tried used the command
mvn install
but there I get the error:
[INFO] Compiling 3 source files to E:\HTL\Alfresco\maven_projects\quick-
start-project\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: 5.473 s
[INFO] Finished at: 2018-04-17T15:58:33+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5:compile (default-compile) on project quick-start-project: 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
I also tried to run the run.bat file in my folder, but it closed after some time with an error!
Can anyone help me and has some tips for getting started in developing for Alfresco?
please try this
On your Eclipse IDE, go into Window > Preferences > Java > Installed JREs >
and check your installed JREs.
You should have an entry with a JDK there.
Select the Execution Env as show below.
Click OK
Then Right-Click on your Project -> Maven -> Update Project
and select jdk
refer this community link may help you

Maven Surefire plugin "error in starting fork" while building project with Intellij IDEA

I was trying building a Java plugin with Maven using Intellij IDEA until I came across an error:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.803 s
[INFO] Finished at: 2015-06-16T16:34:55-10:00
[INFO] Final Memory: 17M/216M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.18.1:test (default-test) on project mc-hyperchat: Error occurred in starting fork, check output in log -> [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
I realize that this is because of this line (that I found using the -X flag)
Forking command line: cmd.exe /X /C ""D:\Program Files\Java\jdk1.8.0_45\jre\bin\java" -jar C:\Users\<username>\Documents\+GIT\mc-hyperchat\target\surefire\surefirebooter8505511050498586005.jar C:\Users\<username>\Documents\+GIT\mc-hyperchat\target\surefire\surefire5990474653240919844tmp C:\Users\<username>\Documents\+GIT\mc-hyperchat\target\surefire\surefire_08408900793313340679tmp"
The system cannot find the path specified.
I happen to come across somebody else with the exact same problem:
Maven Surefire 2.13 fails to fork on Windows
The accepted answer seems to be that his JAVA_HOME environment variable was invalid, so I checked mine:
I also echoed the variable on the Command Prompt to make sure it didn't have any quotation marks in it (also me running cmd.exe to see another The system cannot find the path specified message):
I'm convinced my JAVA_HOME environment variable is correct. If that's the case, what else could've caused this problem?
I found this to be a windows related error -
Open the Registry Editor
Navigate to HKCU\Software\Microsoft\Command Processor\AutoRun and clear the values.
Also check HKLM\Software\Microsoft\Command Processor\AutoRun.

Ninja framework Install Error with Maven

I'm trying to learn Ninja framework for building RESTful web services at here
I got the following error when I run "mvn clean install" inside the newly created maven project folder:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.610 s
[INFO] Finished at: 2014-05-19T11:39:50-07:00
[INFO] Final Memory: 11M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project ninja: Fatal error compiling: invalid target release: 1.7 -> [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/MojoExecutionException
I am on Mac Mavericks with Java 8, if this matters. Thanks
well, it may sound silly, but I fixed the problem by adding JAVA_HOME to the path on my Mac, otherwise, maven still uses Java 1.6 (I've installed Java 1.8) on my computer.
export JAVA_HOME=$(/usr/libexec/java_home)

Maven Error No POM in this Project when performing archetype:generate

I am trying my hands on the Akka Pi java tutorials
I am trying to creaate a maven project as stated in the tutorial
but any time I enter the command to create a maven project I get an error.
Below are the command and the Error.
C:\Program Files\akka-2.0.2>mvn archetype:generate \
C:\Program Files\akka-2.0.2>mvn archetype:generate \
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.206s
[INFO] Finished at: Wed Sep 26 02:50:38 BST 2012
[INFO] Final Memory: 11M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM
in this directory (C:\Program Files\akka-2.0.2). Please verify you invoked Mave
n from the correct directory. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MissingProject
Exception
looks like maven is requesting for the POM file but it is not stated in the tutrials that I have to create a POM before generating the project.
I am actually new too maven so pardon me.
I am using maven version :3.0.4
and akka version 2.0.2
but the tutorial uses akka version 2.0.1 but i donn't think that is the problem
any suggestion please.
thank you
remove the \ then it should start to query for more informations.
I have no windows here, but on linux it shows the same behavior with
mvn archetype:generate /
HTH R
When some tutorials describes a mvn command to be executed that is covered in two rows or more, they might add an extra backslash at the new line (of the instruction) to indicate that the same command continues on next line.
This backslash should be removed BEFORE executing the command. For instance the command for setting up a Jersey Web Application might look like this:
mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes \
-DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersion=2.2
but should be launched as below, without backslash:
mvn archetype:generate -DarchetypeGroupId=org.glassfish.jersey.archetypes -DarchetypeArtifactId=jersey-quickstart-webapp -DarchetypeVersion=2.2
If NOT removing this extra backslash you might get the error you described above.

Categories