I've got eclipse indigo installed with m2e
m2e - Maven Integration for Eclipse
1.0.100.20110804-1717
Right now I've checked out the frameworkview project with subclipse.
When I turn on maven for the project I get this error:
maven-resources-plugin prior to 2.4 is not supported by m2e.
Use maven-resources-plugin version 2.4 or later.
The parent pom where this is specified seems to be here:
http://source.concord.org/maven2/internal/org/concord/maven2-parent/11/maven2-parent-11.pom
Can we update the version numbers in this pom so I can build the project on eclipse indigo with m2e and still build with
whatever older versions other developers are using?
I updated the maven2-parent pom to version 12 and to use version 2.4 for the maven-resources-plugin:
java/misc/builds/maven2-parent/pom.xml
And also updated the 4.0-SNAPSHOT version of the maven2-svn pom to refer to v12 of the maven2-parent
trunk/common/java/pom.xml
http://trac.cosmos.concord.org/projects/changeset/25303
But it seems that something more is needed to get it recognized by Eclipse.
I think it should be looking here for maven2-parent but this doesn't exist yet:
http://source.concord.org/maven2/internal/org/concord/maven2-parent/12/maven2-parent-11.pom
Strange ... this already existed and was updated Aug 31, 2011:
http://source.concord.org/maven2/internal/org/concord/maven2-parent/12/maven2-parent-12.pom
So I bumped the version number to 13:
http://trac.cosmos.concord.org/projects/changeset/25304
So now if I understand this right there should be this generated ... somehow:
http://source.concord.org/maven2/internal/org/concord/maven2-parent/13/maven2-parent-13.pom
I'm still just trying to get sensor-native working on Windows ... I have Eclipse Indigo and m2e 1.0 installed (seems to be
causing trouble).
Now I am getting a new series of errors ...
For example building the sensor-vernier project has this complaint:
The import org.concord.sensor.labprousb.LabProUSB cannot be resolved
SensorSerialPortLabProUSB.java
/sensor-vernier/src/main/java/org/concord/sensor/vernier/labpro line 10 Java Problem
The following maven error is why the labpro-usb project isn't building:
Plugin execution not covered by lifecycle configuration:
org.concord.maven.plugin:multiple-src-dirs:0.1.0:adddirs
execution: default, phase: generate-sources pom.xml
/labpro-usb line 46
Maven Project Build Lifecycle Mapping Problem
Which refers to this section of the POM:
</resources>
<plugins>
<plugin>
<groupId>org.concord.maven.plugin</groupId>
<artifactId>multiple-src-dirs</artifactId>
<version>0.1.0</version>
<configuration>
<srcDirs>
<srcDir>src/swig/java</srcDir>
</srcDirs>
</configuration>
<executions>
<execution>
<goals>
<goal>adddirs</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Is this a custom plugin we created?
Could it be replaced with the plugins mentioned here (and would that help them2e problem)?
http://stackoverflow.com/questions/270445/maven-compile-with-multiple-src-directories
Some resources I found on the net which I don't understand very well:
http://forum.springsource.org/showthread.php?116189-STS-2.8.0-and-m2e-FAQ
At a minimum, the move to m2e v1.0 requires updating the .classpath and .project files.
However, this new version of m2e also requires more explicit management of how Maven
plugins are executed during Eclipse builds. Each pom.xml must explicitly state if,
when, and how its referenced maven plugins are executed in the IDE. If some plugins are
not stated, then m2e looks for installed project configurators (a special kind of
Eclipse plugin) that can handle the execution of the Maven plugin.
If m2e can't find anything that can manage the plugin's lifecycle, you get the dreaded:
"Plugin execution not covered" error in your pom.xml. A complete description of this
error can be found here:
http://wiki.eclipse.org/M2E_plugin_execution_not_covered
Which states (among other suggestions):
To solve these long-standing issues, m2e 1.0 requires explicit instructions what to do
with all Maven plugins bound to "interesting" phases (see M2E interesting lifecycle
phases) of a project build lifecycle. We call these instructions "project build
lifecycle mapping" or simply "lifecycle mapping" because they define how m2e maps
information from project pom.xml file to Eclipse workspace project configuration and
behaviour during Eclipse workspace build.
Project build lifecycle mapping can be configured in a project's pom.xml, contributed
by Eclipse plugins, or defaulted to the commonly used Maven plugins shipped with m2e.
We call these "lifecycle mapping metadata sources". m2e will create error marker like
below for all plugin executions that do not have lifecycle mapping in any of the
mapping metadata sources.
Plugin execution not covered by lifecycle configuration:
org.apache.maven.plugins:maven-antrun-plugin:1.3:run
(execution: generate-sources-input, phase: generate-sources)
m2e matches plugin executions to actions using combination of plugin groupId,
artifactId, version range and goal. There are three basic actions that m2e can be
instructed to do with a plugin execution -- ignore, execute and delegate to a project
configurator.
Anybody know what should be done to the pom to fix this?
Could not find artifact com.atlassian.maven.plugins:jarjar-maven-plugin:pom:0.0.4
in cc-repo-internal-plugin (http://source.concord.org/maven2/internal)
And indeed: http://source.concord.org/maven2/internal/com/ doesn't have an 'atlassian' directory ???
--
----
post message :cc-developers@googlegroups.com
unsubscribe: cc-developers-unsubscribe@googlegroups.com
more options: http://groups.google.com/group/cc-developers?hl=en
The .m2 dir on the Windows machine had no setings.xml so I added this and that problem seemed to go away:
<?xml version="1.0"?>
<settings>
<pluginGroups>
<pluginGroup>org.twdata.maven</pluginGroup>
</pluginGroups>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://source.concord.org/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<pluginRepositories>
<pluginRepository>
<id>twdata-m2-repository</id>
<name>twdata.org Maven 2 Repository</name>
<url>http://twdata-m2-repository.googlecode.com/svn/</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>concord-profile</activeProfile>
</activeProfiles>
</settings>
>Regarding the multiple src dirs, yes I created that. It was a very trivial plugin, so hopefully
>there is a built in way to do it now.
If I'm going to replcae it with something built-in now I need to understand what it is doing.
Here's one place it is used in the pom from sensor-native:
<build>
<sourceDirectory>src/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.concord.maven.plugin</groupId>
<artifactId>multiple-src-dirs</artifactId>
<version>0.1.0</version>
<configuration>
<srcDirs>
<srcDir>src/swig/java</srcDir>
</srcDirs>
</configuration>
<executions>
<execution>
<goals>
<goal>adddirs</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
I see only one src directory listed: src/swig/java ... is it just adding src/swig/java to what maven already considers the defaults?
Is there source and documentation for the plugin?
>Regarding the multiple src dirs, yes I created that. It was a very trivial plugin, so hopefully>there is a built in way to do it now.
If I'm going to replcae it with something built-in now I need to understand what it is doing.
--
----
post message :cc-dev...@googlegroups.com
unsubscribe: cc-developer...@googlegroups.com
more options: http://groups.google.com/group/cc-developers?hl=en
On Fri, Oct 28, 2011 at 1:50 AM, Stephen Bannasch <stephen....@deanbrook.org> wrote:
>Regarding the multiple src dirs, yes I created that. It was a very trivial plugin, so hopefully>there is a built in way to do it now.
If I'm going to replcae it with something built-in now I need to understand what it is doing.
As you guessed it just adds additional source directories to the single srcDir that maven supports.
Somehow the src of it got removed fromt the trunk of the repository.
There used to be a folder:
common/java/dev-tools/maven-plugins
which contained the multiple-src-dirs plugin.
Most recent changes ...
I committed and deployed v19 of maven2-parent since maven2-parent/18/maven2-parent-18.pom wasn't generated properly here:
I replaced multiple-sr-dirs with the build-helper-maven-plugin for sensor-native.
(This can be done in the rest of the places multiple-src-dirs is used when the problem occurs using m2e 1.0).
The pom for sensor-native still had a lifecycle error but now clicking the link to find new m2e connectors appeared when I had
the pom open for editing and I was able to install an m2e connector for build-helper-maven-plugin. After restarting Eclipse the
project built correctly.
I believe what we did before with the multiple-src-dir plugin was to
update the eclipse project files
to include the second src directory. So the multipel-src-dir plugin
was just for buliding the project
outside of eclipse.
It sounds like you found a way to get it to work inside of eclipse so
that is good, but you should
also check outside of eclipse. If it is all checked in, then
hopefully you can just check the hudson
project to see if it is building correctly.
Scott
-- Aaron
I accidently deployed the java/pom.xml jar once without using the '-N' parameter which prevents recursion (Scott had suggested preventing the recursion when deploying this jar).
Later I deployed w/o recursion:
$ mvn deploy -e -N
But ... I had to update both the mave2-pom and the maven2-svn several times since then.
I used Java 1.6.0_27.
Perhaps I should re-deploy the maven2-svn with recursion?
Or does it need to be deployed with Java 1.5 -- if so can I just add a param to the mvn deploy to specify Java 1.5?
Maven on Hudson uses Java 1.5 to build everything. I remember there
being some reason we couldn't use 1.6, but I can't remember the
specifics. I'm not sure how to tell your maven which jdk to use.
-- Aaron
I don't remember the exact class. But it sounds like TreeNode is one of them.
I don't know if we still need to support 1.5 or not. The limit will
be old OS X versions still being used
in schools.
Scott
Using the build-helper-maven-plugin works when using maven from the command line because it's also referenced just as itself asa plugin in the maven2-parent pom:
<pluginManagement>
<plugins>
...
<plugin>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
</plugin>
I just committed version elements for where it is used to prevent maven warnings when building from the command line.
I was using maven 3 form the command line.