There's already a bug reported
http://jira.codehaus.org/browse/MASSEMBLY-334 and there is ugly but
functional workaround: use maven-war-plugin's manifest mojo to
generate manifest file with classpath, and then configure archiver to
use generated manifest ( see this example
http://maven.apache.org/shared/maven-archiver/examples/manifestFile.html
)

Regards,
Stevo.

On Mon, Feb 7, 2011 at 1:20 PM, Benjamin Bentmann
<[email protected]> wrote:
> Kai Hackemesser wrote:
>
>> In the project we try to build a runnable jar that depends on libraries
>> that
>> are assembled into a lib folder. Under Maven 2(.2.1) we have no problem
>> with
>> that, the runnable jar works as designed. The same project build under
>> Maven
>> 3.0.2 currently builds the project without complaints, but in our
>> resulting
>> jar's MANIFEST.MF file the Class-Path entry is missing completely.
>
> It's a bug in the Assembly Plugin, just tried
>
>      <plugin>
>        <artifactId>maven-assembly-plugin</artifactId>
>        <version>2.2</version>
>        <executions>
>          <execution>
>            <id>deploy-assembly</id>
>            <phase>initialize</phase>
>            <goals>
>              <goal>single</goal>
>            </goals>
>            <configuration>
>              <attach>false</attach>
>              <descriptorRefs>
>                <descriptorRef>jar-with-dependencies</descriptorRef>
>              </descriptorRefs>
>              <archive>
>                <manifest>
>                  <addClasspath>true</addClasspath>
>                  <addExtensions>false</addExtensions>
>                </manifest>
>              </archive>
>            </configuration>
>          </execution>
>        </executions>
>      </plugin>
>
> on a simple POM with one dependency and the resulting JAR also lacks the
> Class-Path manifest entry, regardless of the Maven version used. I.e. the
> plugin doesn't properly resolve dependencies but relies on other plugins to
> do so.
>
>> Is this a known bug, is there a workaround known if so? Or do I need to
>> modify something in the assembly for this?
>
> For now, your only option seems to be to fill a bug at
>  http://jira.codehaus.org/browse/MASSEMBLY
> and wait for its fix.
>
>
> Benjamin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to