Re: removing version in manifest file

2010-02-03 Thread eyal edri
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
 artifactIdmaven-war-plugin/artifactId
 configuration

   archive
 manifest
   addClasspathtrue/addClasspath
   classpathLayoutTypecustom/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


Re: removing version in manifest file

2010-02-03 Thread eyal edri
OK, found the missing dependencies:

dependency
groupIdorg.apache.maven/groupId
artifactIdmaven-archiver/artifactId
version2.4/version
   /dependency
dependency
  groupIdcommons-lang/groupId
  artifactIdcommons-lang/artifactId
  version2.1/version
/dependency
dependency
  groupIdorg.codehaus.plexus/groupId
  artifactIdplexus-utils/artifactId
  version1.1/version
/dependency


but still something is not playing with this conf:


  plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-jar-plugin/artifactId
configuration
  archive
!-- define class path and main class --
manifest
  addClasspathtrue/addClasspath
  classpathPrefix/usr/lib/ctch/java/classpathPrefix
  classpathLayoutTypecustom/classpathLayoutType


customClasspathLayout${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}/customClasspathLayout


/manifest
  /archive
/configuration
  /plugin

it only gives me 'null' values...



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