How do I install the Neo4j-spatial plugin? - neo4j

Vanilla neo4j 2.2.0 install on a Ubuntu 14.04 system via their repository.
The instructions given on the neo4j-spatial website don't work. Does anyone have something that works no-questions-asked?
Is there some binary repository I can just apt-get install neo4j-spatial and not deal with this mess?
Thanks!
$ mvn install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Neo4j - Spatial Components
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.neo4j:neo4j-cypher-compiler-2.2
Reason: Error getting POM for 'org.neo4j:neo4j-cypher-compiler-2.2' from the repository: Unable to read local copy of metadata: Cannot read metadata from '/home/ubuntu/.m2/repository/org/neo4j/neo4j-cypher-compiler-2.2/2.2-SNAPSHOT/maven-metadata-oss.sonatype.org.xml': end tag name </body> must match start tag name <hr> from line 5 (position: TEXT seen ...</center>\r\n</body>... #6:8)
org.neo4j:neo4j-cypher-compiler-2.2:pom:2.2-SNAPSHOT
for project org.neo4j:neo4j-cypher-compiler-2.2

The Neo4j-Spatial Project was updated and released for Neo4j 2.2
The readme was also updated with the new binary download links.

Related

Bitbucket pipeline - error installing pre-commit ts-lint

I have a step in my pipeline that runs our configured pre-commit on Bitbucket:
...
- step:
name: Passing linters
image: python:3.7-slim-stretch
script:
- pip3 install "pre-commit==2.17.0"
- apt-get update && apt-get --assume-yes install git
- pre-commit run --all-files
No changes were made but it suddenly stopped working.
The pipeline result:
+ pre-commit run --all-files
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://github.com/psf/black:click==8.0.4.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/maximevast/pre-commit-tslint/.
[INFO] Initializing environment for https://github.com/maximevast/pre-commit-tslint/:tslint-react#4.1.0,tslint#5.20.1,typescript#4.0.2.
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/maximevast/pre-commit-tslint/.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/root/.cache/pre-commit/repo1234/node_env-default/bin/node', '/root/.cache/pre-commit/repo1234/node_env-default/bin/npm', 'install', '--dev', '--prod', '--ignore-prepublish', '--no-progress', '--no-save')
return code: 1
expected return code: 0
stdout: (none)
stderr:
/root/.cache/pre-commit/repo1234/node_env-default/bin/node: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /root/.cache/pre-commit/repo1234/node_env-default/bin/node)
/root/.cache/pre-commit/repo1234/node_env-default/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.25' not found (required by /root/.cache/pre-commit/repo1234/node_env-default/bin/node)
/root/.cache/pre-commit/repo1234/node_env-default/bin/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /root/.cache/pre-commit/repo1234/node_env-default/bin/node)
Check the log at /root/.cache/pre-commit/pre-commit.log
pre-commit utilizes nodeenv to bootstrap node environments
it does this by downloading a copy of node and provisioning an environment (when node is not available). a few days ago node 18.x was released and the prebuilt binaries require a relatively-recent version of glibc
there's a few ways you can work around this:
1. select a specific version of node using language_version / default_language_version
# using default_language_version
default_language_version:
node: 16.14.2
# on the hook itself
repos:
- repo: https://github.com/maximevast/pre-commit-tslint
rev: ...
hooks:
- id: tslint
language_version: 16.14.2
2. use a newer base image
stretch is a bit old, perhaps try instead 3.7-slim-buster instead ?
this will get you a more modern version of glibc
image: python:3.7-slim-buster
3. install node into your image
this will skip the "download node" step of pre-commit by default (specifically it'll default to language_version: system when a suitable node is detected)
this will vary based on your image setup
disclaimer: I created pre-commit

'mvn clean install': why does 'clean' run after 'install'?

If I run
mvn clean install why does maven do the clean after the install?
The reason I ask is because I want to grab the generated EAR from the workspace and not the repo location after jenkins has called maven
Here's a section of the console output:
[INFO] --- maven-install-plugin:2.4:install (default-install) # myProject.EAR ---
[INFO] Installing target/myProject.EAR-1.0.0.ear to /var/lib/jenkins/.m2/repository/uk/co/mycompany/myProject.EAR/1.0.0/myProject.EAR-1.0.0.ear
[INFO] Installing /var/lib/jenkins/jobs/MP/workspace/myProject.EAR/pom.xml to /var/lib/jenkins/.m2/repository/uk/co/mycompany/myProject.EAR/1.0.0/myProject.EAR-1.0.0.pom
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myProject 20.5.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # myProject ---
[INFO] Deleting /var/lib/jenkins/jobs/MP/workspace/myProject/target
[INFO]
When you run mvn clean install , it executes for each module, that is parent project and each submodule. Your log excerpt shows that it finished the install part for myProject.EAR project, and started working on the myProject, starting with clean as it prints (default-clean) # myProject .
This is also evident from the paths in the log: The first module is located at /var/lib/jenkins/jobs/MP/workspace/myProject.EAR, while the second module is located at /var/lib/jenkins/jobs/MP/workspace/myProject .
Perhaps you could describe what you're doing and what doesn't work, but this part of the build seems to work as designed .

How to calculate minimum set of jars required to compile Play application?

Our release engineering is dictating that we cannot use SBT. We have to use ANT.
We need a proper list of jars that are required to compile a PlayFramework application. We are using Play 2.3.4 and (i think!) Scala 2.10 --- this was what got downloaded from activator-1.2.3.
Any thoughts on how to figure out minimum essential set of jars?
Right now, there is an issue with Controller class and iteratees... (i imagine these are in some scala jars)
Questions:
what do the jar numbering scheme on jars in user's ivy cache have two sets of numbers - for eg, play-java-2.3.4-2.10. Does this mean it's Play framework rev 2.3.4 compiled with scala 2.10 ?
is there a minimum list?
tl;dr activator stage and then grab the jars from target/universal/stage/lib.
Play Framework offers stage task that can prepare your application to be run in place:
This cleans and compiles your application, retrieves the required
dependencies and copies them to the target/universal/stage directory.
It also creates a bin/<start> script where <start> is the project’s
name. The script runs the Play server on Unix style systems and there
is also a corresponding bat file for Windows.
After you've executed the stage task, you grab the jars from target/universal/stage and you should be fine to go offline or...cough, cough...ant.
[jars-needed-play] $ stage
[info] Packaging /Users/jacek/sandbox/jars-needed-play/target/scala-2.11/jars-needed-play_2.11-1.0-SNAPSHOT-sources.jar ...
[info] Done packaging.
[info] Updating {file:/Users/jacek/sandbox/jars-needed-play/}root...
[info] Wrote /Users/jacek/sandbox/jars-needed-play/target/scala-2.11/jars-needed-play_2.11-1.0-SNAPSHOT.pom
[info] Resolving jline#jline;2.11 ...
[info] Done updating.
[info] Main Scala API documentation to /Users/jacek/sandbox/jars-needed-play/target/scala-2.11/api...
[info] Compiling 5 Scala sources and 1 Java source to /Users/jacek/sandbox/jars-needed-play/target/scala-2.11/classes...
[info] Packaging /Users/jacek/sandbox/jars-needed-play/target/jars-needed-play-1.0-SNAPSHOT-assets.jar ...
[info] Done packaging.
model contains 17 documentable templates
[info] Main Scala API documentation successful.
[info] Packaging /Users/jacek/sandbox/jars-needed-play/target/scala-2.11/jars-needed-play_2.11-1.0-SNAPSHOT-javadoc.jar ...
[info] Done packaging.
[info] Packaging /Users/jacek/sandbox/jars-needed-play/target/scala-2.11/jars-needed-play_2.11-1.0-SNAPSHOT.jar ...
[info] Done packaging.
[success] Total time: 4 s, completed Oct 1, 2014 9:09:29 AM
[jars-needed-play] $ eval "ls target/universal/stage/lib" !
ch.qos.logback.logback-classic-1.1.1.jar
ch.qos.logback.logback-core-1.1.1.jar
...
xerces.xercesImpl-2.11.0.jar
xml-apis.xml-apis-1.4.01.jar
[info] ans: Int = 0

Why mvn archetype does not work for me?

I'm new on Maven and there's something wrong when I try to create a now project.
E:\java\MavenTest>mvn archetype:generate -DgroupId=com.mycompany.app -DartifacId
=my_app -DarchetypeArtifacId = maven_archetype_quickstart -DinteractiveMode=fals
e
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.108s
[INFO] Finished at: Wed May 15 23:55:57 CST 2013
[INFO] Final Memory: 7M/76M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM
in this directory (E:\java\MavenTest). Please verify you invoked Maven 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
The pom.xml should be generated automatically. But it does not work.
Any help will be highly appreciated.
The root cause are as the following: -
There is a space at -DarchetypeArtifacId = maven_archetype_quickstart
The archetypeArtifacId should be maven-archetype-quickstart
The -DarchetypeArtifacId is miss spelling, the correct is -DarchetypeArtifactId
Then please try the following: -
mvn archetype:generate
-DgroupId=com.mycompany.app
-DartifactId=my_app
-DarchetypeGroupId=org.apache.maven.archetypes
-DarchetypeArtifacId=maven-archetype-quickstart
-DarchetypeVersion=1.1
-DinteractiveMode=false
Please type above command in the single line.
I hope this may help.
Another answer will be related to the console that you are using to generate the maven project with the archetype:
For example:
With Powershell, the command of the answer doesn't work but with this command is working properly
mvn archetype:generate
"-DgroupId=com.mycompany.app
-DartifactId=my_app
-DarchetypeGroupId=org.apache.maven.archetypes
-DarchetypeArtifacId=maven-archetype-quickstart
-DarchetypeVersion=1.1
-DinteractiveMode=false"
because of the problems passing the arguments to the maven command.
This is gonna help somebody, it works for me!

Not created by default settings.xml in $/user/.m2/repository path using Maven

I tried below command its work properly
C:\Documents and Settings\users>mvn -v
Apache Maven 3.0 (r1004208; 2010-10-04 17:20:56+0530)
Java version: 1.6.0_21
Java home: C:\Program Files\Java\jdk1.6.0_21\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
and once I tried to compile simple HelloWorld.java program. Its give me below error...
C:\my-app>mvn compile
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Quick Start Archetype 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: repo1.maven.org/maven2/org/apache/maven/plugins/maven-resour
ces-plugin/2.4.3/maven-resources-plugin-2.4.3.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.454s
[INFO] Finished at: Thu Nov 18 13:08:50 IST 2010
[INFO] Final Memory: 1M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of i
ts dependencies could not be resolved: Could not transfer artifact org.apache.ma
ven.plugins:maven-resources-plugin:jar:2.4.3 from central (http://repo1.maven.or
g/maven2): Error transferring file: Connection refused: connect -> [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/PluginResoluti
onException
Please any one update me with proper solutions.
First, you really should format your questions better. Just cutting and pasting without any regard what it would look like when submitted doesn't help you in getting a quick and concise answer.
Second, what exactly is your question? You subject says one thing, but your text says another.
Now I'll take a stab at both your subject and your text.
As far as the subject is concerned, the settings.xml file is not automatically created by Maven. You have to create this and configure it the way you want. See this website for more info about the settings.xml.
As far as the text is concerned, looks like you do not have access to the Maven repo. This can because by a number things. The most obvious ones are:
The repository is not specified in the project's pom.xml file as described here.
The server you are running this on does not have access to http://repo1.maven.org/maven2/ due to firewall or internet connectivity reasons.
Double check that:
this was not an intermittent problem
you didn't get bad metadata (and clean up the entire ~/.m2/repository/org/apache/maven/plugins/maven-resources-plugin/)

Resources