Hi,

yes, that right. so you can added the jars to classpath with relative directory.

Marco Huber schrieb:
Hi,

I don't know if this is exactly what you are looking for, but I had to add a special path to my manifest classpath entry once. The solution was the following:

<plugin>
  <artifactId>maven-jar-plugin</artifactId>
    <configuration>
      <archive>
        <manifest>
          <addClasspath>true</addClasspath>
          <mainClass>....</mainClass>
        </manifest>
        <manifestEntries>
          <Class-Path>../conf/</Class-Path>
        </manifestEntries>
      </archive>
   </configuration>
</plugin>

This added all the dependencies and the conf path to the classpath.

HTH,
Marco

Alexander Vaysberg wrote:
Hi,

not only. Look heir: - http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html.

Worts:
Java Sun:

   * Class-Path :

     The value of this attribute specifies the relative URLs of the
     extensions or libraries that this application or extension needs.
     URLs are separated by one or more spaces. The application or
     extension class loader uses the value of this attribute to
     construct its internal search path.


That means you can in Manifest only jars added, but not a classpath. The classpath you mast added if you call the java, or added the jars to Manifest. That alls.

Alexander Vaysberg

youhaodeyi schrieb:
Hi,

I have read this but this is not what I want. I want to add path on
classpath. This only tells me how to add dependent on classpath.



Alexander Vaysberg wrote:
Hi,

you can it's using this tutorial: - http://maven.apache.org/shared/maven-archiver/examples/classpath.html. The jar-plugin has many of the properties. It's heir: - http://maven.apache.org/plugins/maven-jar-plugin/jar-mojo.html.

Alexander Vaysberg

youhaodeyi schrieb:
I have some resource files which should be defined in classpath entry in Manifest.mf in a jar. I found that I can use jar plugin to add dependency
on
classpath but I can't add a customize path on the classpath. How can I do
this with maven?

thanks.
---------------------------------------------------------------------
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]




---------------------------------------------------------------------
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