Paresh Patel
Paresh Patel

Reputation: 11

create manifest without classpath entries in ejb-client jar, but have classpath entries in main ejb jar using maven-ejb-plugin

I am using maven-ejb-plugin to generate the ejb jar and the client jar. Also I am using archive to generate the manifest file. But the problem is I need the classpath entries in the ejb jar but not in the client jar. Is there any configuration available to addClasspath only in the main jar and in the client jar do not set the class path? Thanks in advance.

Upvotes: 1

Views: 1454

Answers (1)

Pascal Thivent
Pascal Thivent

Reputation: 570595

I don't think that's supported. If this is an option, exclude the manifest file from the client jar:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-ejb-plugin</artifactId>
  <version>2.2.1</version>
  <configuration>
    <clientExcludes>
      <clientexclude>META-INF/MANIFEST.MF</clientexclude>
    </clientExcludes>
    ...
  </configuration>
</plugin>

If not, I'm afraid you'll have to do some post processing (to unpack, modify the manifest, repackage the archive) with the antrun plugin.

Upvotes: 1

Related Questions