Unable to tag SCM when preparing a release using maven-release-plugin - maven-release-plugin

I'm having trouble preparing a release of my project using the maven release plugin.
SCM connection:
<scm>
<connection>scm:svn:https://subversion.assembla.com/svn/myrepo</connection>
<developerConnection>
scm:svn:https://subversion.assembla.com/svn/myrepo
</developerConnection>
</scm>
Release plugin config:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<providerImplementations>
<svn>javasvn</svn>
</providerImplementations>
</configuration>
<dependencies>
<dependency>
<groupId>com.google.code.maven-scm-provider-svnjava</groupId>
<artifactId>maven-scm-provider-svnjava</artifactId>
<version>2.0.3</version>
</dependency>
</dependencies>
</plugin>
All goes well until the SCM needs to be tagged:
Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project myproject: Unable to tag SCM
Provider message:
SVN tag failed.
Command output:
svn: E175002: unknown host
svn: E175002: OPTIONS request failed on '/svn/myrepo'
Any ideas?

Maybe the subversion repository is not available using https?
For me it worked changing to the svn protocol:
scm:svn:svn://subversion.assembla.com/svn/myrepo

Related

I cant perform mvn release:prepare

I am trying to perform mvn release:prepare with tfs and got error:
Command line - cmd.exe /X /C "tf status -login:[domain]\[username],null -workspace:workspace -recursive -format:detailed [pathToTheProject]"
[INFO] err - TF30063: You are not authorized to access [serverName].
I suspect that maven have problem with recognizing password or maybe I set my developerConnection wrong
My Scm:
<scm>
<developerConnection>scm:tfs:[domain]\\[username];[password]http[s]://server_name:workspace:$/TeamProject/Path/To/Project</developerConnection>
<url>[domain]\\[username];[password]http[s]://server_name:workspace:$/TeamProject/Path/To/Project</url>
</scm>
My build tag in maven:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-scm-plugin</artifactId>
<version>1.5</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-tfs</artifactId>
<version>1.9.5</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-tfs</artifactId>
<version>1.9.5</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
I cannot comment on your TFS config. But if you get an authentication failure for the SCM server, then you are probably lacking an entry like this for the server:
<server>
<id>myServer</id>
<username>theUserId</username>
<password>{encryptedPassword}</password>
</server>
This should be set in the settings.xml file used by your build server running your maven builds.
Check out the documentation on how to encrypt your passwords.
Try the SCM URL below:
scm:tfs:[[domain\\]username[;password]#]http[s]://server_name[:port][:isCheckinPoliciesEnabled]:workspace:$/TeamProject/Path/To/Project
You would get an Access Denied error if maven were not able to authenticate. Instead you get a TF30063 which is mostly related to a permission issue: have you checked that the user authenticating with TFS has read permission to the TFS version control?

Error when using groovy-eclipse-plugin and #Grab

Getting the following error when running mvn clean compile on a new system. It works fine on my local (windows) environment.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project visa-threatintel: Compilation failure: Compilation failure:
[ERROR] /path/to/Class.groovy:[2,2] 1. ERROR in /path/to/Class.groovy (at line 2)
[ERROR] #Grab(group="javax.mail", module="mail", version="1.5.0-b01", type="jar"),
[ERROR] ^^^
[ERROR] Groovy:Ambiguous method overloading for method org.apache.ivy.core.settings.IvySettings#load.
Both local and new system use Maven 3.2.5 and the POM is identical. Relevant excerpts below:
<groovy.version>2.2.1</groovy.version>
<ivy.version>2.4.0</ivy.version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<extensions>true</extensions>
<configuration>
<!-- http://maven.apache.org/plugins/maven-compiler-plugin/ -->
<source>1.6</source>
<target>1.6</target>
<compilerId>groovy-eclipse-compiler</compilerId>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>2.9.0-01</version>
</dependency>
<!-- 2.2.1 version isn't available as a release, so it needs to be acquired
from the codehaus nexus repository -->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-batch</artifactId>
<version>${groovy.version}-01-SNAPSHOT</version>
</dependency>
<!-- to allow #Grab annotations -->
<dependency>
<groupId>org.apache.ivy</groupId>
<artifactId>ivy</artifactId>
<version>${ivy.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/groovy</source>
</sources>
</configuration>
</execution>
I tried changing groovy version to 2.4.3 but got the same error. Anyone seen anything like this before?
Having just encountered a similar issue, I found that I had two issues:
Maven deps that failed a download
A maven dependency (maven-assembly-plugin) had failed a download.
Deleting the .lastUpdated files in your local m2 repository:
#> find ~/.m2/repository -name *.lastUpdated
~/.m2/repository/org/apache/maven/plugins/maven-assembly-plugin/2.2-beta-5/maven-assembly-plugin-2.2-beta-5.pom.lastUpdated
#> find ~/.m2/repository -name *.lastUpdated -delete
grapeConfig.xml & repository ssl certificate
Also your ~/.groovy/grapeConfig.xml file needs to be configured to tell groovy where to pull the dependencies from - in my case it was from a corporate nexus repository, which also meant i had to install the https certificate in the JRE cacerts file.
How to test
One suggestion to test you have everything set up correctly would be to call grape install on a test dependency and that will give you a clearer sense of what is wrong (grape is distributed as part of the groovy binaries, so include it on your path, or fully qualify its path):
grape install javax.mail mail 1.5.0-b01

Maven site warning: The repository url 'https://maven-repository.dev.java.net/nonav/repository' is invalid

I’m using Maven 3.2.3 on a multi-module project. I want to generate a checkstyle and findbugs report, so I have configured the following:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.13</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.3</version>
</plugin>
</plugins>
</reporting>
However, when I run
mvn site:site site:deploy
I repeatedly get the following warning …
[WARNING] The repository url 'https://maven-repository.dev.java.net/nonav/repository' is invalid - Repository 'java.net' will be blacklisted.
I have no reference to this repo in either my pom.xml files or my ~/.m2/settings.xml file. How can I track this down and ultimately resolve the warning?
You have to configure the reporting plugin, so that it does not look for repositories, as it builts the report.
in you pom add the following:
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.8</version>
<configuration>
<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
</configuration>
</plugin>
</plugins>
</reporting>
The reporting plugin throws the Warning even if you do not have set in your private or global maven settings or in any parent pom the "invalid" repositories. Maybe the plugin looks also for repository definitions in the dependencies of the project.
[WARNING] The repository url 'https://maven-repository.dev.java.net/nonav/repository' is invalid - Repository 'java.net' will be blacklisted.
[WARNING] The repository url 'http://maven.glassfish.org/content/groups/glassfish' is invalid - Repository 'glassfish-repo-archive' will be blacklisted.
[WARNING] The repository url 'https://maven.java.net/content/repositories/releases/' is invalid - Repository 'jvnet-nexus-releases' will be blacklisted.
[WARNING] The repository url 'https://maven.java.net/content/groups/public' is invalid - Repository 'release.maven.java.net' will be blacklisted.
[WARNING] The repository url 'http://repository.springsource.com/maven/bundles/external' is invalid - Repository 'spring-external' will be blacklisted.
I have maven project, where aggregation separate from inheritance:
maven module inheritance vs aggregation. In order
mvn project-info-reports:dependencies
works, aggregate pom must inherit parent.
To avoid blacklisted repository warnings, parent reporting must be configured as below mentioned, or it could be simple:
<properties>
...
<dependency.locations.enabled>false</dependency.locations.enabled>
</properties>

Maven SCM Plugin: Git SSH provider not found

I'm having a problem using the Maven SCM plugin with Git. I cannot get the plugin to work at all because it says the provider is not found. It gives me the following error when I run mvn scm:tag:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-scm-plugin:1.9:tag
(default-cli) on project hello-world-service-minimal: Cannot run tag command :
Can't load the scm provider. No such provider: 'git:ssh://git#git-eng.REDACTED.com'
. -> [Help 1]
My pom.xml looks like the following:
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>net.REDACTED</groupId>
<artifactId>hello-world-service-minimal</artifactId>
<version>1.0.13</version>
<packaging>pom</packaging>
<name>hello-world-service</name>
<properties>
<lang.java.source>1.7</lang.java.source>
<lang.java.target>1.7</lang.java.target>
<dep.junit>4.11</dep.junit>
</properties>
<scm>
<developerConnection>scm:git:ssh://git#git-eng.REDACTED.com|PROJECT_NAME/hello-world-service-minimal.git</developerConnection>
<url>scm:git:http://git-eng.REDACTED.com/PROJECT_NAME/hello-world-service-minimal/tree/master</url>
</scm>
<distributionManagement>
<repository>
<id>dev.release</id>
<url>file:${project.build.directory}/repository/</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.1</version>
</plugin>
<plugin>
<artifactId>maven-scm-plugin</artifactId>
<version>1.9</version>
<configuration>
<tag>${project.artifactId}-${project.version}</tag>
</configuration>
</plugin>
</plugins>
</build>
</project>
Anyone have any idea how to fix this? This is driving me crazy. I can't figure out what I am doing wrong at all.
The <url> tag is for a regular browsable URL. You need a <connection> tag (<connection> is for read access, <developerConnection> is for write access):
<scm>
<connection>scm:git:ssh://git#git-eng.REDACTED.com|PROJECT_NAME/hello-world-service-minimal.git</connection>
<developerConnection>scm:git:ssh://git#git-eng.REDACTED.com|PROJECT_NAME/hello-world-service-minimal.git</developerConnection>
<url>http://git-eng.REDACTED.com/PROJECT_NAME/hello-world-service-minimal/tree/master</url>
</scm>
See the Maven POM Reference for more information.

Trying to run a Maven package. Unable to find resource 'org.eclipse.m2e:lifecycle-mapping:pom:1.0.0'

This is working well on Windows, but not on Linux and I don't know what I'm doing wrong here.
After I go to my maven project directory, the one that contains the POM.xml file, and "mvn package -e" it, here is the console output:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building functionalTests
[INFO] task-segment: [package]
[INFO] ------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/org/eclipse/m2e/lifecycle-mapping/1.0.0/lifecycle-mapping-1.0.0.pom
[INFO] Unable to find resource 'org.eclipse.m2e:lifecycle-mapping:pom:1.0.0' in repository central (http://repo1.maven.org/maven2)
Downloading: http://repo1.maven.org/maven2/org/eclipse/m2e/lifecycle-mapping/1.0.0/lifecycle-mapping-1.0.0.pom
[INFO] Unable to find resource 'org.eclipse.m2e:lifecycle-mapping:pom:1.0.0' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.eclipse.m2e:lifecycle-mapping
Reason: POM 'org.eclipse.m2e:lifecycle-mapping' not found in repository: Unable to download the artifact from any repository
org.eclipse.m2e:lifecycle-mapping:pom:1.0.0
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project org.eclipse.m2e:lifecycle-mapping
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Unable to build project for plugin 'org.eclipse.m2e:lifecycle-mapping': POM 'org.eclipse.m2e:lifecycle-mapping' not found in repository: Unable to download the artifact from any repository
org.eclipse.m2e:lifecycle-mapping:pom:1.0.0
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project org.eclipse.m2e:lifecycle-mapping
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1557)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifecycle(DefaultLifecycleExecutor.java:1503)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:1282)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:534)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.InvalidPluginException: Unable to build project for plugin 'org.eclipse.m2e:lifecycle-mapping': POM 'org.eclipse.m2e:lifecycle-mapping' not found in repository: Unable to download the artifact from any repository
org.eclipse.m2e:lifecycle-mapping:pom:1.0.0
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project org.eclipse.m2e:lifecycle-mapping
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:293)
at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:205)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:184)
at org.apache.maven.plugin.DefaultPluginManager.loadPluginDescriptor(DefaultPluginManager.java:1642)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1540)
... 18 more
Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.eclipse.m2e:lifecycle-mapping' not found in repository: Unable to download the artifact from any repository
org.eclipse.m2e:lifecycle-mapping:pom:1.0.0
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
for project org.eclipse.m2e:lifecycle-mapping
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:605)
at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromRepository(DefaultMavenProjectBuilder.java:251)
at org.apache.maven.plugin.DefaultPluginManager.checkRequiredMavenVersion(DefaultPluginManager.java:277)
... 22 more
Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository
org.eclipse.m2e:lifecycle-mapping:pom:1.0.0
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:228)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:90)
at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository(DefaultMavenProjectBuilder.java:558)
... 24 more
Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository
at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWagonManager.java:404)
at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:216)
... 26 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Wed Sep 04 12:38:23 EEST 2013
[INFO] Final Memory: 4M/15M
This is my pom.xml file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.pragmaticqa.tests</groupId>
<artifactId>mailCheckerTest</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>functionalTests</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<displayProps>target/selenium/display.properties</displayProps>
</properties>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>2.33.0</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.7</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.33.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
<version>2.5</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>2.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>2.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<includes>
<include>**/*Test*.java</include>
</includes>
<systemPropertyVariables>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>true</skip>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
And this is the output of "mvn -version"
Apache Maven 2.2.1 (rdebian-1)
Java version: 1.6.0_27
Java home: /usr/lib/jvm/java-6-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-45-generic" arch: "i386" Family: "unix"
The root cause of your problem is the non-existing plugin lifecycle-mapping
Unable to download the artifact from any repository org.eclipse.m2e:lifecycle-mapping:pom:1.0.0
The solution to your problem is here: m2e lifecycle-mapping not found
EDIT
Suggestion to avoid using m2eclipse:
Define the plugin lifecycle-mapping in a dev profile and activate this profile only in eclipse. So when you will run it on your CI-Server (without the dev profile): the plugin won't be implied.
Add this to your pom.xml:
<profiles>
<profile>
<id>dev</id>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</plugin>
</build>
</profile>
</profiles>
You also need to remove the plugin from your default build section.
The dev profile won't be active by default, so the plugin won't run by default.
To run the build with the plugin you need to activate the profile. There are different way of doing this:
adding -Pdev to mvn command line
find a way under eclipse to activate a profile (no idea how to it, I'm not an eclipse user)
make the dev profile active by default in settings.xml (under $USER_HOME/.m2/settings.xml - if this file don't exists: create it by hand): this useful to activate the dev profile on a developer machine.
To do it, add the following line in settings.xml
<settings>
...
<activeProfiles>
<activeProfile>dev</activeProfile>
</activeProfiles>
</settings>
Note : for the last solution, you must ensure that the maven installation used by eclipse will use this settings.xml (once again, I'm not an eclipse user... so I don't know how to ensure that)
run mvn eclipse:eclipse from your project directory, this should resolve your m2e lifecycle plugin error.

Resources