score:-1

use the steps given in this link. it worked for me.

step - 1 right click on your project in eclipse

step - 2 click properties

step - 3 select maven in the left hand side list.

step - 4 you will notice "pom.xml" in the active maven profiles text box on the right hand side. clear it and click apply.

step - 5 run as -> maven clean -> maven install

hope it helps!

score:0

i also faced the similar issues, changing the version from 2.0.0.release to 1.5.10.release worked for me, please try it before downgrading the maven version

<parent>
<groupid>org.springframework.boot</groupid>
<artifactid>spring-boot-starter-parent</artifactid>
<version>1.5.10.release</version>
</parent>
<dependencies>
 <dependency>
 <groupid>org.springframework.boot</groupid>
 <artifactid>spring-boot-starter-web</artifactid>
 </dependency>  
</dependencies>

score:0

i solved this error in pom.xml by adding the below code

spring-rest-demo org.apache.maven.plugins maven-war-plugin 2.6

score:0

i had also faced the same issue and it got resolved by commenting the version element in pom.xml as show.

org.apache.maven.archiver.[mavenarchiver](https://maven.apache.org/shared/maven-archiver/apidocs/org/apache/maven/archiver/mavenarchiver.html).getmanifest(org.apache.maven.project.mavenproject, org.apache.maven.archiver.mavenarchiveconfiguration)

<plugins>
  <plugin>
    <artifactid>maven-compiler-plugin</artifactid>
    <!-- <version>3.5.1</version> -->
    <configuration>
      <source>1.7</source>
      <target>1.7</target>
    </configuration>
  </plugin>
  <plugin>
    <artifactid>maven-war-plugin</artifactid>
    <!-- <version>3.1.0</version> -->
    <configuration>
      <warsourcedirectory>webcontent</warsourcedirectory>
      <failonmissingwebxml>false</failonmissingwebxml>
    </configuration>
  </plugin>
</plugins>

score:4

upgrade your m2e extensions instead downgrade.

from help > install new software.., add a new repository (via the add.. option)

specify name for your plugin and add path http://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-mavenarchiver/0.17.2/n/latest/

once you are done with installation, please restart eclipse and update your project.

score:7

i had the same problem with a spring boot project. the solution was to downgrade the spring-boot-starter-parent dependency version from 2.0.0.release to 1.5.10.release(you can move to any stable version)

from:

<parent>
    <groupid>org.springframework.boot</groupid>
    <artifactid>spring-boot-starter-parent</artifactid>
    <version>2.0.0.release</version>
    <relativepath/> <!-- lookup parent from repository -->
</parent>

to

<parent>
        <groupid>org.springframework.boot</groupid>
        <artifactid>spring-boot-starter-parent</artifactid>
        <version>1.5.10.release</version>
        <relativepath/> <!-- lookup parent from repository -->
    </parent>

score:7

i had also faced the same issue and it got resolved by changing the version from 3.2.0 to 2.6 as shown in below pom.xml snippet

<plugin>
    <groupid>org.apache.maven.plugins</groupid>
    <artifactid>maven-war-plugin</artifactid>
    <version>2.6</version>
    <configuration>
        <warsourcedirectory>src/main/webapp</warsourcedirectory>
        <warname>spring4mvc</warname>
        <failonmissingwebxml>false</failonmissingwebxml>
    </configuration>
</plugin>

score:11

i had exactly the same problem. my environment was:

  • spring sts 3.7.3.release
  • build id: 201602250940
  • platform: eclipse mars.2 (4.5.2)

the symptoms of the problems were:

  1. there was a red error flag on my pm file. and the description of the error was as described in the original question asked here.
  2. there were known compilation problems in the several java files in the project, but eclipse still was not showing them flagged as error in the editor pane as well as the project explorer tree on the left side.

the solution (described above) about updating the m2e extensions worked for me.

better solution (my recommondation):

score:14

i had the same problem with a spring boot project. the solution was to downgrade the jar maven-jar-plugin from 3.2 to 2.6 . i had just to add this to the project pom:

<properties>        
    <maven-jar-plugin.version>2.6</maven-jar-plugin.version>
</properties>

score:16

i found my answer! i looked into the pom for any plugins that have a dependency on the maven-archiver and found the maven-jar-plugin does. it was using the latest 3.0.0 version. when i downgraded to 2.6 it seems to fix the issue :-)

score:198

i encountered the same issue after updating the maven-jar-plugin to its latest version (at the time of writing), 3.0.2.
eclipse 4.5.2 started flagging the pom.xml file with the org.apache.maven.archiver.mavenarchiver.getmanifest error and a maven > update project.. would not fix it.

easy solution: downgrade to 2.6 version
indeed a possible solution is to get back to version 2.6, a further update of the project would then remove any error. however, that's not the ideal scenario and a better solution is possible: update the m2e extensions (eclipse maven integration).

better solution: update eclipse m2e extensions
from help > install new software.., add a new repository (via the add.. option), pointing to the following url:

  • https://repo1.maven.org/maven2/.m2e/connectors/m2eclipse-mavenarchiver/0.17.2/n/latest/

then follow the update wizard as usual. eclipse would then require a restart. afterwards, a further update project.. on the concerned maven project would remove any error and your maven build could then enjoy the benefit of the latest maven-jar-plugin version.


additonal notes
the reason for this issue is that from version 3.0.0 on, the concerned component, the maven-archiver and the related plexus-archiver has been upgraded to newer versions, breaking internal usages (via reflections) of the m2e integration in eclipse. the only solution is then to properly update eclipse, as described above.
also note: while eclipse would initially report errors, the maven build (e.g. from command line) would keep on working perfectly, this issue is only related to the eclipse-maven integration, that is, to the ide.


Related Query

More Query from same tag