I recently upgraded Maven from 3.0.5 to 3.3.9.
Ever since, I can't build projects because of dependency failure when trying to find SNAPSHOTs.
The error is:
Could not find artifact bla:bla:war:9.81.6-SNAPSHOT -> [Help 1]
bla:bla has been built and put to my Archiva repo so I went to check there and I noticed a subtle difference in the version numbers between the project built with Maven 3.0.5 and 3.3.9.
3.0.5
3.3.9
You can see that with the later version of Maven, rather than having a -SNAPSHOT version, i get a timestamped version instead.
Endless Googling hasn't turned up any thing about this change so over to SO for answers!
If i take the full timestamped version specified in Archiva and put it in my POM, then I can build the project but obviously this is not how snapshots are supposed to work.
Related
I'm trying to build a project using batch file, and ran into this error:
[INFO] Error resolving version for 'org.apache.maven.plugins:maven-eclipse-plugin': Plugin requires Maven version 2.2.1
I do have maven version 2.2.1 installed on my computer. If I run "mvn -version" it shows maven 2.2.1.
Maven-Eclipse-Plugin is retired and should not be used anymore.
Maven 2.2.1 is even worse.
Upgrade and try again.
I am trying to build Eclipse BIRT (Oxygen/4.7.0 Release). But I am having difficulties and unable to proceed.
Steps I used:
Install Apache Maven 3.3.3 - since the build requires this version
Cloned the birt repository from Github
Checked out BIRT_4_7_0_Release_201706222054 tag
Executed mvn -DskipTests package in the root folder
Repositories on my local machine:
I have a clean m2 local repository (nothing in the repository)
I do use Eclipse Oomph to install various IDE (not projects) so bundle pools are present on my machine
Environment:
I am using JDK 1.8 (build 144) on macOS (10.11.6).
Result:
Cannot resolve project dependencies:
[ERROR] Software being installed: org.eclipse.birt.designer 4.7.0.qualifier
[ERROR] Missing requirement: org.eclipse.birt.feature.group 4.7.0.qualifier requires 'org.eclipse.gef.feature.group 3.2.0' but it could not be found
[ERROR] Cannot satisfy dependency: org.eclipse.birt.designer 4.7.0.qualifier depends on: org.eclipse.birt.feature.group 0.0.0
[ERROR]
Miscellaneous:
I also tried building for neon but that fails because the release milestones have moved and resolution fails (even after I change the release milestones URL).
Any help would be much appreciated. Thanks!
There are two separate issues in the build.
Firstly, it seems that the latest release tagged BIRT_4_7_0_Release_201706222054 has URLs and a feature that are out-of-date (as of the date of this answer). Building this revision will fail.
The solution is to build revision:
Update repository URL post Oxygen (1b32db99608d028b2cfabf65aa4a34a2c7ff3359).
Another option would be to cherrypick the following three fixes (all changes) on top of the release revision BIRT_4_7_0_Release_201706222054. This avoids all other changes that were made post Oxygen Release.
1b32db99608d028b2cfabf65aa4a34a2c7ff3359
92f2f74916bf6e2fa961285dcc0f5eaa7d2c50e2
eb8c612fc0ed0547601b5d1f9221755a44730abc
The second problem is Maven related. The top-level POM.xml requires definition of a toolchains. This needs to be defined in ~/.m2/toolchains.xml file or specified on the command-line with --global-toolchains. you can read about this in the Maven documentation here.
Lastly, the build requires Maven 3.3.3 as per Ben Gamble here. It did cause me a problem initially because I had 3.5.0 (prior to posting the question; mentioning this here for completeness).
Hope this will help anyone having similar problems.
I am new to Eclipse. I was installing Maven plugin in Eclipse Helios and I have gone through all the answers from stack but still I was not able to solve it. I used
http://download.eclipse.org/technology/m2e/releases/1.3
this link in the Eclipse -> Help > Install New software. Still I am getting bellow error. Can any one help me ?
Cannot complete the install because one or more required items could not be found.
Software being installed: m2e connector for the Maven Dependency Plugin 0.0.4.201410161303 (com.ianbrandt.tools.m2e.mdp.feature.feature.group 0.0.4.201410161303)
Missing requirement: m2e connector for Maven Dependency Plugin 0.0.4.201410161303 (com.ianbrandt.tools.m2e.mdp.core 0.0.4.201410161303) requires 'bundle org.eclipse.m2e.jdt 1.4.0' but it could not be found
Cannot satisfy dependency:
From: m2e connector for the Maven Dependency Plugin 0.0.4.201410161303 (com.ianbrandt.tools.m2e.mdp.feature.feature.group 0.0.4.201410161303)
To: com.ianbrandt.tools.m2e.mdp.core [0.0.4.201410161303]
Like Sudha Velan said, you try the eclipse marketplace(Help -> Eclipse Marketplace).
I prefer downloading the binary files from the maven homepage.
I'm attempting to use a Maven plugin that requires version 3.0+ :
http://davidb.github.io/scala-maven-plugin/index.html
But I receive this error :
[ERROR] Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.1.6:add-source (scala-compile-first) on project spring-hibernate-template: The plugin net.alchim31.maven:scala-maven-plugin:3.1.6 requires Maven version 3.0.4 -> [Help 1]
Is Heroku using an older version of Maven? If so can I update it for my app?
According to the Heroku Java buildpack, it's using Maven 3.0.3:
https://github.com/heroku/heroku-buildpack-java/blob/master/bin/compile#L56
You can double-check which buildpack you're using.
Update as of February 2016
Currently this buildpack uses Maven 3.3.9.
Original answer
As of September 2014 it's using Maven 3.0.5 so original problem here would be resolved now.
If you encounter too low Maven version problem you have to find/make your own custom buildpack with newer Maven.
I made a custom buildpack with Maven 3.1.1 you can use with this command:
heroku config:set BUILDPACK_URL=https://github.com/grzegorz-dubicki/heroku-buildpack-java.git#5e6b4a3
(This is a specific commit that works. I can't promise that HEAD of my repo will always work.
Of course you should fork it and use your own repo's address not to depend on my repo in the long run.)
Please publish your custom buildpack with other Maven versions here - especially if you manage to do that for Maven 3.2.x and if it turns out not to be trivial!
I've just set up a brand new installation of Eclipse Helios and have configured M2Eclipse to use an external (v 2.2.1) installation of Maven.
The system compiles fine on the command line, but from within M2Eclipse several of my project modules have an error:
Missing artifact javax.jms:jms:jar:1.1:test
I can get past the error by excluding the jms artifact from the Atomikos dependencies. But my main question is how can the two provide different results!
Even more odd is that I have another installation of Eclipse Helios and everything works fine.
The dependency resolver in m2eclipse is not using the external Maven installation, it has to use the embedded Maven version. So, I'd recommend to get the latest version of m2eclipse, as well as Maven 3.x version to minimize the difference in dependency resolution.
Additionally, it is possible that you had some alternative repositories defined in your maven 2.2.1 conf/settings.xml file. If you use the embedded maven3 these will be ignored.
You also can specify your maven 2.2.1 installation as the maven installation for m2eclipse.
I posted a similar question and finally found an answer. See m2eclipse says "Missing artifact" but I can build from cmdline!
You can find a different solution at http://getsatisfaction.com/sonatype/topics/_missing_artifact_from_m2eclipse_but_it_is_not_true
Same problem here: I use maven 2.2.1 as the installation to use from eclipse, as it is the one which works on the command line. Maven 3 does not work for this concrete project, complaining about some missing dependencies which, after much research, in my case turned out to come from old maven 1 repositories with legacy layout. Maven 3 hates these and will burst burst into cry when it finds them.
So maven 2 works just fine on the command line, but maven 3 does not. The problem with eclipse is that even if you specify maven 2 as the installation to build your projects, it uses maven 3 (the embedded installation) for dependency resolution, so if you are so unlucky to require a legacy repository you are screwed (I mean, eclipse won't help).