Why Maven generates a maven directory in a jar when two jars are merged?

I've merged sources from two artifacts/jars into separate single jar using assembly plugin. However, looking at the content of the new jar file at META-INF/maven there is a maven directory which contains packages from both of those jars.

Few questions:

1 - What is the purpose of that META-INF/maven dir? 2 - How/who generate that file and why? 3 - Is there an option to remove it from the archive and how? 4 - What is the impact if we removed it from the archive?

Here is my plugin:

<plugin>
  <artifactId>maven-assembly-plugin</artifactId>
    <executions>
      <execution>
        <id>merge-two-jars</id>
        <phase>prepare-package</phase>
        <goals>
          <goal>single</goal>
        </goals>
        <configuration>
          <finalName>com.ibm.scope.ext.system.agent-${scope.release}-${ibm.build.number}</finalName>
          <appendAssemblyId>false</appendAssemblyId>
      <descriptors>
                <descriptor>src/main/assembly/ppk-agent-merge-agent-common.xml</descriptor>
          </descriptors>
          <archive>
              <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
              <addMavenDescriptor>false</addMavenDescriptor>
          </archive>
        </configuration>
      </execution>
    </executions>

.....

Answers


  1. Informational purpose - maven feature
  2. Maven for informational purpose
  3. For JAR, EAR, and WAR Plugins. Use <archive><addMavenDescriptor>false</addMavenDescriptor></archive> to exclude META-INF/maven, MWAR-27
  4. No impact

Overriding Manifest

<project>
  [...]
  <build>
    [...]
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          [...]
          <archive>
             <addMavenDescriptor>false</addMavenDescriptor>
          </archive>
        </configuration>
        [...]
      </plugin>
      [...]
</project>

More about Maven Manifest: Maven Archiver


Need Your Help

sending data to particular client from twisted server

python python-2.7 twisted

I have written server part using twisted python. Now 4 clients are connected to server which send some data to server. If client 1 sends some data to server then server forwards that data to client...

Windows 7 not accepting self-signed SSL certificate

ssl ssl-certificate self-signed qbwc

I have a problem with a self-signed SSL certificate not being accepted on my Windows 7 box. I need this because the QuickBooks web connector will not address my CRM except over HTTPS, and the CRM is