Post new topic   This topic is locked: you cannot edit posts or make replies.
Author Message
cusdx
Veteran Member
Veteran Member
Joined: Oct 27, 2005
Posts: 118

I'm just trying Maven4MyEclipse for the first time. I've just set up a straightforward test project (called testMavenProject) based on the tutorial:

"Creating a Maven Project using Maven4MyEclipse".

The pom is created with a red cross and the following 5 errors are listed under problems - please can you advise? (I've also appended pom.xml):

Missing artifact javax.activation:activation:jar:1.0.2:provided
Missing artifact javax.mail:mail:jar:1.3.1:provided
Missing artifact javax.xml:namespace:jar:1.1.0:provided
Project 'testMavenProject' is missing required library: "C:\Users\zoe james\.m2\repository\javax\activation\activation

Here is the pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>uk.ac.warwick</groupId>
<artifactId>testMavenProject</artifactId>
<packaging>war</packaging>
<name />
<version>0.0.1-SNAPSHOT</version>
<description />
<build>
<sourceDirectory>${basedir}/src</sourceDirectory>
<outputDirectory>${basedir}/WebRoot/WEB-INF/classes</outputDirectory>
<resources>
<resource>
<directory>${basedir}/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webappDirectory>${basedir}/WebRoot</webappDirectory>
<warSourceDirectory>${basedir}/WebRoot</warSourceDirectory>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-j2ee</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-jsr77</artifactId>
<version>3.2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis-saaj</artifactId>
<version>1.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>namespace</artifactId>
<version>1.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xmlParserAPIs</artifactId>
<version>2.6.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
</project>
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Registered Member
Registered Member
Joined: Apr 18, 2007
Posts: 8010

Can you go to MyEclipse > Installation Summary > Installation Details and paste the information here for me.

Also, can you switch to new workspace, create a new maven project and check if you are able to reproduce this issue.

Let me know what result you get.

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
cusdx
Veteran Member
Veteran Member
Joined: Oct 27, 2005
Posts: 118

Thanks for your reply. I've pasted the Installation Details below. I also tried recreating the problem in a new workspace as you suggested, and did reproduce the error.



*** Date:
24 February 2009 14:19:18 o'clock GMT

** System properties:
OS=WindowsVista
OS version=6.0.0
Java version=1.5.0_11


*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 7.0
Build id: 7.0-20081201


*** Eclipse details:
MyEclipse Enterprise Workbench

Version: 7.0
Build id: 7.0-20081201






Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\apps\Genuitec\MyEclipse 7.0\myeclipse.exe
-name
Myeclipse
--launcher.library
C:\apps\Genuitec\MyEclipse 7.0\../Common\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731\eclipse_1115.dll
-startup
C:\apps\Genuitec\MyEclipse 7.0\../Common\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
-clean
-configuration
configuration
-vm
C:\apps\Genuitec\Common\binary\com.sun.java.jre.win32.x86_1.5.0.011\bin\client\jvm.dll
 
 View user's profile Send private message  
Reply with quote Back to top
support-eugene
Registered Member
Registered Member
Joined: May 12, 2005
Posts: 472

It's a confusing workflow. MyEclipse should've initialized your repository when you created your web project but due to some Maven problem it didn't. Can your workstation access Internet and/or some Maven repository in your network? Note: MyEclipse uses core Maven tasks and if they were not downloaded Maven will not work.

To make MyEclipse do another attempt at initializing the repository:
1. Restart MyEclipse.
2. Create dummy web project with Maven support. You may delete it right after you created it.
3. Right-click your original web project and select Maven4MyEclipse -> Update Dependencies

_________________
Eugene
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
cusdx
Veteran Member
Veteran Member
Joined: Oct 27, 2005
Posts: 118

Yes, my workstation definitely has internet access. I can even access the internet from within myEclipse.

As soon as I set up the dummy web maven project, I get the following error message - I noticed it in the online demo so assume it doesn't matter:

"Some Maven goals may require a JDIK to execute properly; Please make sure that MavenJDK preference is pointing to a JDK..."

Behind that are flashing a lot of "BUILD FAILED" messages. I just managed to copy the end of one below, hope this gives a clue:
...
this strategy = org.codehaus.plexus.classworlds.strategy.DefaultStrategy
Number of imports: 6
import: Entry[import org/codehaus/plexus/util/xml/pull from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org/codehaus/plexus/util/xml/Xpp3Dom from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org.codehaus.plexus.util.xml.pull from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import org.codehaus.plexus.util.xml.Xpp3Dom from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import /default-report/xml from realm ClassRealm[plexus.core, parent: null]]
import: Entry[import /default-report.xml from realm ClassRealm[plexus.core, parent: null]]


-----------------------------------------------------
[ERROR]

Maven encountered an error while looking up the following Mojo:
Group-Id: org.apache.maven.plugins
Artifact-Id: maven-install-plugin
Version: 2.2
Mojo: install-file
brought in via: Direct invocation

Referenced from project:
Group-Id: dummy
Artifact-Id: dummy
Version: 0.0.1-SNAPSHOT
From file: C:\Workspaces\MyEclipse 7.0\dummy\pom.xml
Reason: Unable to lookup component 'org.apache.maven.plugin.Mojo', it could not be created.
role: org.apache.maven.plugin.Mojo
roleHint: org.apache.maven.plugins:maven-install-plugin:2.2:install-file
classRealm: /plugins/org.apache.maven.plugins:maven-install-plugin:2.2@48/thread:main

Root cause: org/codehaus/plexus/digest/DigesterException



[INFO] ------------------------------------------------------------------------
[INFO] For more information, run with the -e flag
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILED
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Wed Mar 04 10:11:57 GMT 2009
 
 View user's profile Send private message  
Reply with quote Back to top
support-eugene
Registered Member
Registered Member
Joined: May 12, 2005
Posts: 472

It looks like you have corrupted Maven local repository. Can you rename ~/.m2 folder so the Maven tries to recreate it?

_________________
Eugene
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-eugene
Registered Member
Registered Member
Joined: May 12, 2005
Posts: 472

cusdx wrote:
As soon as I set up the dummy web maven project, I get the following error message - I noticed it in the online demo so assume it doesn't matter:

"Some Maven goals may require a JDIK to execute properly; Please make sure that MavenJDK preference is pointing to a JDK..."


Note: Maven goals like compile will not execute unless you select proper JDK on the Maven preference page. MyEclipse build will still work though.

I tried - import goal works on JRE so this is not a cause of the problem you see. Did you use some other Maven version on your workstation?

_________________
Eugene
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
cusdx
Veteran Member
Veteran Member
Joined: Oct 27, 2005
Posts: 118

Eugene,

Thanks for your work on this. This is looking better. Through recreating the maven repository I have discovered that I had a J2EE specification level/ compiler compliance clash - I'd selected J2EE spec of EE 5.0 but hadn't changed the compiler compliance. Now a lot more good things are happening.

The complaint about the JDK for maven appears to be because although I had selected a JDK for maven (jdk1.6.0_12), I needed to change the default selected JRE to match - I did this and that warning has gone.

I am still getting some "missing artifact" messages though, both in the initial build and when I do "update dependencies". They are in red:

04/03/09 14:03:14 GMT: Missing artifact javax.activation:activation:jar:1.0.2:provided
04/03/09 14:03:14 GMT: Missing artifact javax.mail:mail:jar:1.3.1:provided
04/03/09 14:03:14 GMT: Missing artifact javax.xml:namespace:jar:1.0.1:provided

Although it says "provided", if I update dependencies again they come up again.

Is this an issue?

Zoe
 
 View user's profile Send private message  
Reply with quote Back to top
support-eugene
Registered Member
Registered Member
Joined: May 12, 2005
Posts: 472

Did you try to create web project after you redid Maven local repository? Note: you need to restart MyEclipse before doing this :(

_________________
Eugene
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
cusdx
Veteran Member
Veteran Member
Joined: Oct 27, 2005
Posts: 118

Looks like I might be in business now. I tried again and got some bits in red (below), but when I updated the dependencies on the existing project - no red! Many thanks for your help.

04/03/09 16:33:12 GMT: Missing artifact javax.faces:jsf-api:jar:1.2_04:provided
04/03/09 16:33:12 GMT: Missing artifact javax.faces:jsf-impl:jar:1.2_04:provided

and

04/03/09 16:37:04 GMT: Error on removing indexing context local; Cannot delete C:\Workspaces\MyEclipse 7.0\.metadata\.plugins\org.maven.ide.eclipse\nexus\local\_0.cfs
04/03/09 16:37:04 GMT: Error on adding indexing context local; Cannot overwrite: C:\Workspaces\MyEclipse 7.0\.metadata\.plugins\org.maven.ide.eclipse\nexus\local\_0.cfs
 
 View user's profile Send private message  
Reply with quote Back to top
All times are GMT - 6 Hours
Post new topic   This topic is locked: you cannot edit posts or make replies.
® 2014 - Genuitec, LLC.