You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thalmeiner Zsolt <th...@4dsoft.hu> on 2008/05/19 09:00:00 UTC
classpath fileseparator problem in generated manifest file under
winxp
Hello,
I'm building a Java project using Maven 2.0.9 and JVM 1.5.0_14 on
Windows XP.
My project depends on runtime from some jar files that are resides in
the same directory with my jar so I put this configuration to my pom.xml:
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-jar-plugin</artifactId>
> <version>2.2</version>
> <configuration>
> <archive>
> <manifest>
> <addClasspath>true</addClasspath>
> <classpathPrefix>.\</classpathPrefix>
> </manifest>
> </archive>
> </configuration>
> </plugin>
After build the manifest file in my jar file contains all dependencies
with prefix "./"
Is this a bug or I missed something?
Regards,
th
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: classpath fileseparator problem in generated manifest file under
winxp
Posted by Tim Kettler <ti...@udo.edu>.
What do you mean by working example? you project build is behaving
exactly as it should. Class-path entries in a jar manifest are
"...relative URLS .. " [1]
and a file URL per definition [2] (section 3.10) contains forward slashes.
If your library-jars are located in the same directory as the jar with
the class-path entry you don't need a prefix at all. If the jars are
located in a subdirectory called 'libs' you need to specify the prefix
as 'libs/'
-Tim
[1]
http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#Main%20Attributes
[2] http://www.rfc.net/rfc1738.html
Thalmeiner Zsolt schrieb:
> Can you send me a simple working example?
> Thank you in advance.
> th
>
> Paolo Compieta írta:
>> This is not a Maven problem.
>>
>> The classpath entry in the manifest file is platform independent, and all
>> paths are relative to the containing jar - you shouldn't even need the
>> "./"
>> prefix.
>> see http://mindprod.com/jgloss/jar.html#CLASSPATH
>>
>> Regards,
>> PC
>>
>>
>> Thalmeiner Zsolt wrote:
>>
>>> Using the <classpathPrefix>.\</classpathPrefix> tag I want to get ".\"
>>> (backslash) as prefix but the manifest file contains "./" (slash)
>>> prefixes. Unfortunatelly running the jar under WinXP doesn't recognizes
>>> paths with slashes :(
>>> I wrote to the list because I didn't found any information in doc
>>> pages to
>>> handle this problem.
>>>
>>> Regards,
>>> th
>>>
>>> ---------------------------------------------------------------------
>>> 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: classpath fileseparator problem in generated manifest file under
winxp
Posted by Thalmeiner Zsolt <th...@4dsoft.hu>.
Can you send me a simple working example?
Thank you in advance.
th
Paolo Compieta írta:
> This is not a Maven problem.
>
> The classpath entry in the manifest file is platform independent, and all
> paths are relative to the containing jar - you shouldn't even need the "./"
> prefix.
> see http://mindprod.com/jgloss/jar.html#CLASSPATH
>
> Regards,
> PC
>
>
> Thalmeiner Zsolt wrote:
>
>> Using the <classpathPrefix>.\</classpathPrefix> tag I want to get ".\"
>> (backslash) as prefix but the manifest file contains "./" (slash)
>> prefixes. Unfortunatelly running the jar under WinXP doesn't recognizes
>> paths with slashes :(
>> I wrote to the list because I didn't found any information in doc pages to
>> handle this problem.
>>
>> Regards,
>> th
>>
>> ---------------------------------------------------------------------
>> 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: classpath fileseparator problem in generated manifest file
under winxp
Posted by Paolo Compieta <pa...@gmail.com>.
This is not a Maven problem.
The classpath entry in the manifest file is platform independent, and all
paths are relative to the containing jar - you shouldn't even need the "./"
prefix.
see http://mindprod.com/jgloss/jar.html#CLASSPATH
Regards,
PC
Thalmeiner Zsolt wrote:
>
> Using the <classpathPrefix>.\</classpathPrefix> tag I want to get ".\"
> (backslash) as prefix but the manifest file contains "./" (slash)
> prefixes. Unfortunatelly running the jar under WinXP doesn't recognizes
> paths with slashes :(
> I wrote to the list because I didn't found any information in doc pages to
> handle this problem.
>
> Regards,
> th
>
> ---------------------------------------------------------------------
> 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/classpath-fileseparator-problem-in-generated-manifest-file-under-winxp-tp17312374p17314180.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: classpath fileseparator problem in generated manifest file under
winxp
Posted by Thalmeiner Zsolt <th...@4dsoft.hu>.
Using the <classpathPrefix>.\</classpathPrefix> tag I want to get ".\" (backslash) as prefix but the manifest file contains "./" (slash) prefixes. Unfortunatelly running the jar under WinXP doesn't recognizes paths with slashes :(
I wrote to the list because I didn't found any information in doc pages to handle this problem.
Regards,
th
Paolo Compieta írta:
> Using the
> <classpathPrefix>.\</classpathPrefix>
> tag, you're telling the Jar plugin to put that prefix - and it seems to
> behave correctly.
>
> always visit the plugin's doc pages for details:
> http://maven.apache.org/plugins/maven-jar-plugin/ Maven Jar Plugin
> http://maven.apache.org/shared/maven-archiver/examples/classpath.html Maven
> Archiver
>
> Regards,
> PC
>
>
> Thalmeiner Zsolt wrote:
>
>> Hello,
>>
>> I'm building a Java project using Maven 2.0.9 and JVM 1.5.0_14 on
>> Windows XP.
>> My project depends on runtime from some jar files that are resides in
>> the same directory with my jar so I put this configuration to my pom.xml:
>>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-jar-plugin</artifactId>
>>> <version>2.2</version>
>>> <configuration>
>>> <archive>
>>> <manifest>
>>> <addClasspath>true</addClasspath>
>>> <classpathPrefix>.\</classpathPrefix>
>>> </manifest>
>>> </archive>
>>> </configuration>
>>> </plugin>
>>>
>> After build the manifest file in my jar file contains all dependencies
>> with prefix "./"
>> Is this a bug or I missed something?
>>
>> Regards,
>> th
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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: classpath fileseparator problem in generated manifest file
under winxp
Posted by Paolo Compieta <pa...@gmail.com>.
Using the
<classpathPrefix>.\</classpathPrefix>
tag, you're telling the Jar plugin to put that prefix - and it seems to
behave correctly.
always visit the plugin's doc pages for details:
http://maven.apache.org/plugins/maven-jar-plugin/ Maven Jar Plugin
http://maven.apache.org/shared/maven-archiver/examples/classpath.html Maven
Archiver
Regards,
PC
Thalmeiner Zsolt wrote:
>
> Hello,
>
> I'm building a Java project using Maven 2.0.9 and JVM 1.5.0_14 on
> Windows XP.
> My project depends on runtime from some jar files that are resides in
> the same directory with my jar so I put this configuration to my pom.xml:
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-jar-plugin</artifactId>
>> <version>2.2</version>
>> <configuration>
>> <archive>
>> <manifest>
>> <addClasspath>true</addClasspath>
>> <classpathPrefix>.\</classpathPrefix>
>> </manifest>
>> </archive>
>> </configuration>
>> </plugin>
>
> After build the manifest file in my jar file contains all dependencies
> with prefix "./"
> Is this a bug or I missed something?
>
> Regards,
> th
>
>
>
> ---------------------------------------------------------------------
> 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/classpath-fileseparator-problem-in-generated-manifest-file-under-winxp-tp17312374p17313594.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