Maven descriptor (META-INF / maven) duplicates archive entry

I have a problem with maven build. I have several ejb projects. After building the maven jar, the file contains the maven descriptor in META-INF / maven twice, i.e. If I extract the files to disk, 7zip asks to overwrite the files, although it is extracted to a new folder. If you specify the tag <addMavenDescriptor>false</addMavenDescriptor>in the archive tag of the ejb plugin, then maven decriptor is still created, but only once. Is there another place where I can turn off maven descriptor generation, or does anyone know the reason for duplicate generation?

Maven Version: 3.0.3

The structure of the project is similar:

-pom
  -ejb

Here is the pom.xml of the EJB module:

<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
    <artifactId>TestMavenDescriptors</artifactId>
    <groupId>de.test</groupId>
    <version>0.0.1-SNAPSHOT</version>
    <relativePath>..</relativePath>
</parent>

<artifactId>TestEJB</artifactId>
<packaging>ejb</packaging>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-ejb-plugin</artifactId>
            <version>2.3</version>
            <configuration>
                <ejbVersion>3.1</ejbVersion>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.0.2</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
    </plugins>
</build>

<dependencies>
    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>6.0</version>
        <scope>provided</scope>
    </dependency>
</dependencies>

Here is the pom.xml of the parent project.

<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/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>de.test</groupId>
  <artifactId>TestMavenDescriptors</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>pom</packaging>

  <modules>
    <module>TestEJB</module>
  </modules>

</project>
+5
source share
1 answer

, eclipse ( RAD 8) m2e. ( maven) , EJB . , EJB ( ), maven (pom packaged) ( EJB, EJB ) . , ?!

BTW: ( java ee) , .

+3

All Articles