i think i may have found the solution.

http://maven.apache.org/shared/maven-archiver/examples/classpath.html#Repository

you can use the <customClasspathLayout> tag:

<build>
    <plugins>
      <plugin>
         <artifactId>maven-war-plugin</artifactId>
         <configuration>

           <archive>
             <manifest>
               <addClasspath>true</addClasspath>
               <classpathLayoutType>custom</classpathLayoutType>
               
<customClasspathLayout>${artifact.artifactId}.${artifact.extension}</customClasspathLayout>

             </manifest>
           </archive>
         </configuration>
      </plugin>
    </plugins>
  </build>

but, they say it's avaliable only from ver 2.4, and i can't seem to
download it or 2.3-SNAPSHOT

when i define it in the parent pom pluginManagement tag.

any ideas?



On Wed, Feb 3, 2010 at 4:44 PM, eyal edri <eyal.e...@gmail.com> wrote:

> is there an option to tell the jar plugin, that when he creates the
> classPath entries in the MANIFEST file, it will strip the version numbers?
>
> here is it now:
>
> $ cat MANIFEST.MF (inside the jar file)
> Manifest-Version: 1.0
> Archiver-Version: Plexus Archiver
> Created-By: Apache Maven
> Built-By: me
> Build-Jdk: 1.6.0_16
> Main-Class: com.company.url.unknowns.IncreasePriority
> *Class-Path: /usr/lib/ctch/java/mail-1.4.1.jar /usr/lib/ctch/java/activ
>  ation-1.1.jar /usr/lib/ctch/java/DbUtil-0.0.14-SNAPSHOT.jar /usr/lib/
>  ctch/java/sqljdbc-2.0.jar /usr/lib/ctch/java/log4j-1.2.14.jar
> *
>
> here is what i need:
>
> Class-Path: /usr/lib/ctch/java/mail.jar /usr/lib/ctch/java/activ
>  ation.jar /usr/lib/ctch/java/DbUtil.jar /usr/lib/ctch/java/sqljdbc.jar
> /usr/lib/ctch/java/log4j.jar
>
>
> i looked in the maven archiver reference guide, but didn't find anything.
>
> i guess i could write a customize jar plugin if it's not supported.
>
>
> --
> Eyal Edri
>



-- 
Eyal Edri

Reply via email to