Reputation: 4293
Few days back my maven project was running fine. Out of nowhere I started getting this weird error.
org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.maven.project.MavenProject, org.apache.maven.archiver.MavenArchiveConfiguration)
I am attaching image also to show how it actually shows this error.
My pom file looks like this...
<?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>
<parent>
<artifactId>SS</artifactId>
<groupId>com.rolta.dss</groupId>
<version>5.2.0.16</version>
</parent>
<artifactId>AndroidImpl</artifactId>
<packaging>apk</packaging>
<name>AndroidImpl</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<platform.version></platform.version>
<android.plugin.version>3.8.2</android.plugin.version>
<jdk.version>6</jdk.version>
<jdk>${env.JAVA_HOME}</jdk>
</properties>
<dependencies>
<dependency>
<groupId>com.rolta.dss</groupId>
<artifactId>Core</artifactId>
<version>5.2.0.16</version>
</dependency>
<dependency>
<groupId>com.rolta.support</groupId>
<artifactId>android-support</artifactId>
<version>v13</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.12</version>
</dependency>
<dependency>
<groupId>com.google.android</groupId>
<artifactId>android</artifactId>
<version>4.1.1.4</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>${env.BUILD_NAME}</finalName>
<sourceDirectory>src</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<version>3.9.0-rc.2</version>
<extensions>true</extensions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.jayway.maven.plugins.android.generation2</groupId>
<artifactId>android-maven-plugin</artifactId>
<configuration>
<sdk>
<platform>19</platform>
</sdk>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<showDeprecation>true</showDeprecation>
<showWarnings>true</showWarnings>
<executable>${jdk}/bin/javac</executable>
<fork>true</fork>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<jvm>${jdk}/bin/java</jvm>
<forkMode>once</forkMode>
</configuration>
</plugin>
</plugins>
</build>
</project>
I have tried removing .m2 folder, checked if any of the dependency was missing in .m2 folder(everything is present). When i do maven clean and maven install i get build success message. I have also checked jdk version(it's 1.6).Even i tried in new eclipse still the issue persists.
Is there anything else which i am missing? Thanks in advance.
Upvotes: 3
Views: 8240
Reputation: 4293
While searching the cause of the issue i stumbled on this link eclipse issue with the pom
So I checked my current version of the m2e plugin and the sonatype version it was something
m2e - Maven Integration for Eclipse 1.4.0.20130601-0317 org.eclipse.m2e.feature.feature.group and
0.17.0.201502101659 org.sonatype.m2e.mavenarchiver.feature.feature.group Sonatype, Inc. respectively.
I checked current version this way (Help > about eclipse > installation details)
Then i uninstalled those two plugins and issue was resolved.
To uninstall (Help > about eclipse > installation details > select the plugin > uninstall)
I uninstalled them because i wanted to upgrade the m2e to the latest version i.e 1.6 update m2e link
I was unable to upgrade due to someother reason so i tried uninstalling the previous version and thought of updating the latest one. But once I uninstalled the previous version issue was resolved.
Upvotes: 1
Reputation: 2624
The issue is related with the m2e-plugin in eclipse. You can verify by running maven from commandline (which you already did), which should give no error.
It's because of UTF-8 formatted (BOM at the beginning) pom.
https://github.com/tesla/m2eclipse-mavenarchiver/issues/6
You could try with the latest: https://otto.takari.io/content/sites/m2e.extras/m2eclipse-mavenarchiver/0.17.0/N/LATEST/
Upvotes: 4