I gave up working with m2eclipse following the suggestion of a bartender and tried using
maven from the command line. So I downloaded a maven distribution, unzipped into a folder. Found the server.xml file and put that in the ~/.m2/ and ~/.m2/Repository folder though that is all eclipse stuff I am thinking. Output from mvn -v
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sat Jul 18 02:53:36 GMT 2009
[INFO] Final Memory: 1M/3M
[INFO] ------------------------------------------------------------------------
C:\maven\examples\ch03-simple>mvn -v
Apache Maven 2.2.0 (r788681; 2009-06-26 13:04:01+0000)
Java version: 1.5.0_09
Java home: C:\Sun_15\SDK\jdk\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows nt (unknown)" version: "6.0" arch: "x86" Family: "windows"
So I have to think I've done the set up right. I believe there is a catch about the jre has to be part of a jdk in maven. I had postponed the spring book that originally motivated me to look at maven and started reading an Oreilly maven book. I unzipped their simple examples and tried mvn install. I got error:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile': Unable to load the mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' in the plugin 'org.apache.maven.plugins:maven-compiler-plugin'. A required class is missing: org/codehaus/plexus/compiler/AbstractCompiler
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager executing goal 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile': Unable to load the mojo 'org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile' in the plugin 'org.apache.maven.plugins:maven-compiler-plugin'. A required class is missing: org/codehaus/plexus/compiler/AbstractCompiler
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:682)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
being clever I thought I'd put maven-compiler-plugin-2.0.2.jar in Maven_home/lib. Then I get error:
[INFO] Internal error in the plugin manager getting plugin 'org.apache.maven.plugins:maven-site-plugin': Plugin 'org.apache.maven.plugins:maven-site-plugin:2.0-beta-7' has an invalid descriptor:
1) Plugin's descriptor contains the wrong artifact ID: maven-compiler-plugin
2) Plugin's descriptor contains the wrong version: 2.0.2
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Internal error in the plugin manager getting plugin 'org.apache.maven.plugins:maven-site-plugin': Plugin 'org.apache.maven.plugins:maven-site-plugin:2.0-beta-7' has an invalid descriptor:
1) Plugin's descriptor contains the wrong artifact ID: maven-compiler-plugin
2) Plugin's descriptor contains the wrong version: 2.0.2
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1543)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.getMojoDescriptor(DefaultLifecycleExecutor.java:1808)
I guess I thought the simple examples would be easier. I am using windows vista which I doubt is making things easier for me. I'm wondering if there was part of the set up I missed.
Mike