Nexus OSS 3.0 repository upgrade - maven

Recently Sonatype released new version 3.0 of the Nexus repository. On the first look, the new version has quite a bit new features, and most important for is support for npm modules.
However, I quickly realised that there is no way to migrate our current maven repository to a new version as the structure of the repository has been changed. The migration from the version 2 promised to be available in version 3.1, but I cannot find when it is going to happen. We need support for npm and I wonder if I'll start using 3.0 for npm only would it be possible to somehow merge my npm and maven repositories together once 3.1 released?

Nexus 2 does have support for npm, but npm in Nexus 3 has support for some features that nexus 2 doesn't. Go ahead and set up Nexus 3 for npm now, when 3.1 is out you'll be able to migrate your existing Nexus 2 repositories into the Nexus 3 instance.

Related

how to build maven with any version on demand?

I have a situation where my system has one maven installed (e.g version 3.7.1. I have some projects that needs that version so this version is my default and if I build a project using mvn the version 3.7.1 is used by default to build the project.
Now I have to work on a project where it needs maven version 3.8.1 and I am looking for a way to do it. I am planning to install the maven version 3.8.1 in same system and would like to call this maven while building the new project. Can anyone help me on how to add envionment variable for new maven and call it whenever necessary while building without removing the 3.7.1 version
Aside from having separate Maven installations on your system, you could also have a look at the Maven Wrapper.
The maven wrapper allows you to attach a small script to your code base, which downloads and runs a specific version of Maven. In this way there are no dependencies to any Maven installations on your system.
After placing the Maven Wrapper in your project, you would then simply run ./mvnw install instead of mvn install.
I am using SDKMAN to manage different versions of maven or java. SDKMAN is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems. It provides a convenient Command Line Interface (CLI) and API for installing, switching, removing and listing Candidates.
It is very convenient and this problem no longer exists for me.

which one is the latest version of maven to use

I am trying to use maven in our project and am new to it.
checking this https://maven.apache.org/download.cgi
3.6.0 version is latest version to download.
Someone was saying there is maven 4 is latest. Not sure where to download this from and can we use this for java 8.
Which one is latest version to use?
From https://maven.apache.org/download.cgi
Apache Maven 3.6.0 is the latest release and recommended version for
all users.
Works nicely with Java 8. Note that your IDE may bundle an older version in the unlikely case you run into problems.

Artifactory - Unlock Cocoapods, Nuget,

I have installed JFrog Artifactory OSS on my server to store all librairies which I have written.
I can create Maven repository but when I want to create a Cocoapods, a Nuget or a PHP Composer repository I can't do it (I can't select them on the list of repository type choice).
Do you know if it's a bug or if I need to upgrade to the Pro version ?
Sincerely,
KevSib
NuGet and PHP repository support requires the Pro version of Artifactory.
For more a comparison between the OSS/Pro/Enterprise version please take a look at the Artifactory feature matrix.

Installing neo4j-spatial on neo4j 2.3.1

I cloned the neo4j-contrib/spatial repo on github, but the recommended "mvn install" doesn't work--it breaks on a bunch of missing files and symbols (e.g. "package org.neo4j.index.impl.lucene does not exist").
The pom.xml file in the repo references neo4j 3.0.0, but I'm running neo4j 2.3.1 on Ubuntu 15.04. Neo4j 3.0.0 is not yet listed as a stable release.
There is a separate repo of releases for neo4j-spatial at neo4j-contrib/m2, including one targeting neo4j-2.3.0, but having cloned the repo, it's not clear whether or how to use this to get the mvn install to work.
Any tips?
Which branch are you trying to build? This branch is the release targeting Neo4j 2.3 and should build fine. If you aren't able to build please submit a Github issue with the error(s).
For installing the server plugin there are pre-compiled versions of the JAR files available here that you can just unzip and drop in the /plugins directory. The most recent targets Neo4j 2.3. This should work fine with Neo4j 2.3.1 (I used this neo4j-spatial release with Neo4j 2.3.1 for a project last week without any problems).

is there a way to selfupdate maven without re-downloading the newer version

Is there a way to update the maven distribution without re-downloading the newer version and fixing the new path in the environment path?
something like: mvn selfupdate (the macport style)
No, but the Maven install is only a very thin bootstrap anyway.....
Maven downloads most of it's functionality as plugins. This normally happens when you run your first build and stores them in a local repository under:
$HOME/.m2/repository
So the good news is that when you install the new version of Maven, it will re-use the plugins already downloaded (unless newer ones are required).
Finally if you have concerns about performance it's an excellent idea to install a Maven repository manager. Software like Nexus can proxy and cache external repositories like Maven Central and will significantly improve your build performance (and enable off-line builds). Nexus is very lightweight, I run it on my laptop.

Resources