maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anders Hammar <and...@hammar.net>
Subject Re: how to use space as pathSeparator in dependency:generate-resources?
Date Mon, 21 Jun 2010 11:44:21 GMT
Have your tried the unicode char?
\u0020

/Anders

On Mon, Jun 21, 2010 at 12:36, Christophe Bliard <
cbliard@besancon.parkeon.com> wrote:

> Hi,
>
> I am trying to export the classpath in a file as a space-separated list
> of jar by using the dependency:generate-resources plugin. Here is the
> pluging configuration
>
>  <plugin>
>    <artifactId>maven-dependency-plugin</artifactId>
>    <executions>
>      <execution>
>        <phase>generate-resources</phase>
>        <goals>
>          <goal>build-classpath</goal>
>        </goals>
>      </execution>
>    </executions>
>    <configuration>
>      <pathSeparator> </pathSeparator>
>      <prefix>lib</prefix>
>      <outputFilterFile>true</outputFilterFile>
>      <outputFile>${project.build.directory}/cp.properties</outputFile>
>    </configuration>
>  </plugin>
>
> This produces the following output:
>
>
> classpath=lib/logback-classic-0.9.21.jar:lib/commons-cli-1.1.jar:lib/slf4j-api-1.6.0.jar
>
> and the pathSeparator is not taken into account. If I use something like
> <pathSeparator>" "</pathSeparator> instead, I have somthing like
>
> classpath=lib/logback-classic-0.9.21.jar" "lib/commons-cli-1.1.jar"
> "lib/slf4j-api-1.6.0.jar
>
> It looks like the spaces are stripped and the pathSeparator is empty,
> leading the dependency:generate-resources plugin to use the system
> default path separator.
>
> How can I do to use space as a separator?
>
> My goal is to generate a custom MANIFEST.MF file with a classpath
> containing the maven classpath + the lib/classes/ firectory. For this I
> generate a cp.properties file with the classpath, read it with the
> read-project-properties goal of properties-maven-plugin, then use it in
> the maven-jar-plugin to have a custom "Class-Path" entry in the manifest
> file:
>  <plugin>
>    <groupId>org.apache.maven.plugins</groupId>
>    <artifactId>maven-jar-plugin</artifactId>
>    <configuration>
>      <archive>
>        <manifest>
>          <mainClass>com.archipel.reef.Main</mainClass>
>        </manifest>
>        <manifestEntries>
>          <Class-Path>${classpath}:lib/classes/</Class-Path>
>        </manifestEntries>
>      </archive>
>    </configuration>
>  </plugin>
> But if I want the classpath to be correct, it must use a space as path
> separator.
>
> Thanks
>
> Christophe Bliard
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message