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!
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 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.
I'm trying to import and resolve the developer projects for the NatTable project as explained in their Getting Started tutorial.
I'm getting the following error on mvn -f [path to pom] clean install:
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession;
More details:
mvn --version works fine
%MAVEN_HOME% points to [devel]/maven-3.1.0
The NatTable project seems to have configured the Tycho build extension in a version which is not compatible with Maven 3.1.
Either ask the project to switch to a Tycho version which works with Maven 3.1 (0.18.1 or later), or downgrade your local Maven installation to 3.0.5.
The NatTable project recently updated to use Maven Tycho 0.19.0.
Thanks for the hint.
I have installed m2e in my Eclipse Indigo, through the Eclipse market place.
Do I need to install maven explicitly and set the M2_HOME environment variable?
Thanks!
No and no. m2e has an embedded Maven, but you don't have to use it.
See the FAQs about more details, it is called Maven Embedder:
What Maven version is used by plugin
Plugin is not actually using
Maven itself. It is using component that is part of Maven called Maven
Embedder. This component is not available for Maven 2.0.x. The
Embedder is used by the Maven command line interface (CLI) starting
from version 2.1 that includes number of improvements to allow it to
actually embed Maven.
The m2eclipse is currently using the Embedder component from Maven
3.0. If you want to execute particular version of Maven installed elsewhere, you can do so from the Maven launch configuration or select
it as default in Maven / Installations preference page.
m2e comes with its own copy of the relevant libraries.
Unless you have a specific requirement for a specific Maven version, you don't need a separate installation.
NO
m2e is all bundled up. Also, afaik, m2e uses Maven3.