You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by youhaodeyi <yo...@gmail.com> on 2009/09/01 02:56:55 UTC
Re: How can I add path in classpath entry in Manifest file?
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: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/How-can-I-add-path-in-classpath-entry-in-Manifest-file--tp25218824p25232764.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How can I add path in classpath entry in Manifest file?
Posted by Alexander Vaysberg <wo...@vaisberg.de>.
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: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How can I add path in classpath entry in Manifest file?
Posted by youhaodeyi <yo...@gmail.com>.
Yes that's what I am looking for.
thanks for all your response.
Zhao Yi
Marco Huber wrote:
>
> 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: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/How-can-I-add-path-in-classpath-entry-in-Manifest-file--tp25218824p25251769.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How can I add path in classpath entry in Manifest file?
Posted by Marco Huber <mh...@project-team.de>.
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: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: How can I add path in classpath entry in Manifest file?
Posted by Alexander Vaysberg <wo...@vaisberg.de>.
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: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org