You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by ttjarl <tt...@gmail.com> on 2006/03/24 14:00:57 UTC

Manifest.mf Class-path

I have created a maven2 project with parent, EAR, WAR, EJB and a few JAR
POMs. There are also some dependencies and transitive dependencies.

I am not able to make maven generate the Class-path attribute in
manifest.mfin the jar-files.


What could I be doing wrong?



-jarl

Re: Manifest.mf Class-path

Posted by Yann Le Du <le...@gmail.com>.
Are you using <archive><manifest><addClasspath>true in your <plugin>s'
<configuration>s ?

- Yann

On 3/24/06, ttjarl <tt...@gmail.com> wrote:
>
> I have created a maven2 project with parent, EAR, WAR, EJB and a few JAR
> POMs. There are also some dependencies and transitive dependencies.
>
> I am not able to make maven generate the Class-path attribute in
> manifest.mfin the jar-files.
>
>
> What could I be doing wrong?
>
>
>
> -jarl
>
>

Re: Manifest.mf Class-path

Posted by Wayne Fay <wa...@gmail.com>.
You need to add this configuration node (below) to the
maven-xxx-plugin <plugin> node in the <build> section for each
appropriate module:

<configuration>
  <archive>
    <manifest>
      <addClasspath>true</addClasspath>
    </manifest>
  </archive>
</configuration>

Here's an example for EAR:
<build>
<plugins>
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-ear-plugin</artifactId>
  <configuration>
    <archive>
      <manifest>
        <addClasspath>true</addClasspath>
      </manifest>
    </archive>
  </configuration>
</plugin>
</plugins>
</build>

Repeat for maven-war-plugin, maven-jar-plugin, and maven-ejb-plugin
respectively.

Wayne


On 3/24/06, ttjarl <tt...@gmail.com> wrote:
> I have created a maven2 project with parent, EAR, WAR, EJB and a few JAR
> POMs. There are also some dependencies and transitive dependencies.
>
> I am not able to make maven generate the Class-path attribute in
> manifest.mfin the jar-files.
>
>
> What could I be doing wrong?
>
>
>
> -jarl
>
>