Maven 2.x JAR Plugin

When 'index' and 'addClasspath' are both true, plugin fails.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.1
  • Fix Version/s: 2.4
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    1

Description

When both the 'index' and 'addClasspath' are true, the plugin fails to create jar with the following msg:

Embedded error: Problem creating jar: **/target/classes (Is a directory)

A typical configuration to produce the error would be:

<plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <configuration>
            <archive>
              <index>true</index>
              <manifest>
                <addClasspath>true</addClasspath>
              </manifest>
          </configuration>
        </plugin>

The issue below (about including dependency files in index) claims that it introduced this bug:
http://jira.codehaus.org/browse/MJAR-40

I'm posting this issue so that to ensure that version 2.2-SNAPSHOT does not suffer from the same problem.

Issue Links

Activity

Hide
Vitaliy Obmanyuk added a comment -

Any progress of that?
I have the same error with maven-rar-plugin on Linux (it works fine on Windows platform only).

Show
Vitaliy Obmanyuk added a comment - Any progress of that? I have the same error with maven-rar-plugin on Linux (it works fine on Windows platform only).
Hide
Rodolfo Rothganger added a comment -

I have the same problem, but only when a dependency with "provided" scope is informed.

Example:

<dependencies>
<dependency>
<groupId>javax.resource</groupId>
<artifactId>connector-api</artifactId>
<version>1.5</version>
<scope>provided</scope>
</dependency>
</dependencies>

Show
Rodolfo Rothganger added a comment - I have the same problem, but only when a dependency with "provided" scope is informed. Example: <dependencies> <dependency> <groupId>javax.resource</groupId> <artifactId>connector-api</artifactId> <version>1.5</version> <scope>provided</scope> </dependency> </dependencies>
Hide
Andrea Aime added a comment -

I'm trying to add index support to GeoTools build, using maven 2, and I'm facing exactly the same problem.

Show
Andrea Aime added a comment - I'm trying to add index support to GeoTools build, using maven 2, and I'm facing exactly the same problem.
Hide
Andrea Aime added a comment -

Don't know if this is of any help, this is the full trace of the problem. The module has no dependencies, besides one on junit marked as "provided", but it's part of a large multimodule build where most of the other modules would enjoy having an index

Show
Andrea Aime added a comment - Don't know if this is of any help, this is the full trace of the problem. The module has no dependencies, besides one on junit marked as "provided", but it's part of a large multimodule build where most of the other modules would enjoy having an index
Hide
Dennis Lundberg added a comment -

See MJAR-108 for a testcase.

Show
Dennis Lundberg added a comment - See MJAR-108 for a testcase.
Hide
Kristian Rosenvold added a comment -

This issue is fixed by updating plexus components to their latest versions.

Show
Kristian Rosenvold added a comment - This issue is fixed by updating plexus components to their latest versions.
Hide
Kristian Rosenvold added a comment -

Fixed in r1235030

Show
Kristian Rosenvold added a comment - Fixed in r1235030

People

Vote (8)
Watch (6)

Dates

  • Created:
    Updated:
    Resolved: