1

After importing an existing Eclipse project into a Eclipse JEE Neon Workspace, Eclipse announces a Maven Configuration Problem regarding org.apache.maven.plugin.war.WarMojo.

Information regarding the environment:

Information regarding the project:

  • It's a simple JSF Project (HelloWorld; 1 Class; 1 Faclet).
  • It works well under Ubuntu 14.04/Eclipse Mars and Mac OS/Eclipse Neon.
  • Eclipse Neon/Ubuntu 16.04 marks a problem in the first line of the pom.xml, namely "org.apache.maven.plugin.war.WarMojo".
  • The pom.xml looks like (some parts are made anonymous with ***):

<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>***</groupId>
  <artifactId>***</artifactId>
  <packaging>war</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>***</name>
  <url>http://maven.apache.org</url>
  
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
   <dependency>
  <groupId>com.sun.faces</groupId>
  <artifactId>jsf-api</artifactId>
  <version>2.2.10</version>
   </dependency>
   <dependency>
  <groupId>com.sun.faces</groupId>
  <artifactId>jsf-impl</artifactId>
  <version>2.2.10</version>
   </dependency>   
  </dependencies>
  <build>
    <finalName>***</finalName>
  </build>
</project>

Many thanks for any help.

jhead
  • 11
  • 2
  • Cut paste of the actual Eclipse error? Also, did you try `right click on the project -> Maven -> Update Project...` FWIW your pom works just fine for me with STS & Ubuntu 16.04 – Mike Summers Sep 05 '16 at 13:41
  • @MikeSummers: Thanks for your reply. 1. Yes, I tryed Update Project... - but without success. 2. An excerpt from the log: `!ENTRY org.eclipse.m2e.logback.appender 2 0 2016-09-05 12:40:31.323 !MESSAGE Error injecting: org.apache.maven.plugin.war.WarMojo !STACK 0 java.lang.TypeNotPresentException: Type org.apache.maven.plugin.war.WarMojo not present ... Caused by: java.lang.ClassNotFoundException: org.apache.maven.plugin.war.WarMojo` – jhead Sep 05 '16 at 18:35
  • Two things come to mind: 1) You're not specifying the version of Java in your pom so check the Java version on both systems, 2) [add the war plugin to your pom](http://maven.apache.org/plugins/maven-war-plugin/index.html) – Mike Summers Sep 05 '16 at 19:17
  • @MikeSummers: Thanks again. 1) It did not help. I got some new Errors. For example: _Cannot change version of project facet Dynamic Web Module to 3.0._ 2) It also did not help. Other Errors occurred, for example: _org.codehaus.plexus.archiver.jar.Manifest.write(java.io.PrintWriter)_ It is quite frustrating. Mainly because Eclipse crashes frequently. – jhead Sep 06 '16 at 14:32
  • Sounds like things are pretty sideways. Try building a *new* basic war project and see if that works. Also, be sure you're not importing anything related to Eclipse with the imported project- no .classpath, .project, or .settings. – Mike Summers Sep 06 '16 at 16:48
  • I had to revert to Eclipse-Mars. Someone else has commented that Neon is broken with Maven - https://bugs.launchpad.net/ubuntu/+source/java-common/+bug/1552764/comments/21 – Randall Whitman Sep 22 '16 at 15:50

0 Answers0