Guillaume Boué commented on MDEP-541:

Can you explain what is your use-case? {{dependency:build-classpath}} is mainly 
used to generate the classpath so that it can be used as argument for {{java 
 represents the system specific separator between paths.

The {{Class-Path}} entry inside the Manifest is normally generated by 
{{maven-archiver}}, that for example [the {{maven-jar-plugin}} 

> Allow for a space character as a pathSeparator in dependency:build-classpath
> ----------------------------------------------------------------------------
>                 Key: MDEP-541
>                 URL: https://issues.apache.org/jira/browse/MDEP-541
>             Project: Maven Dependency Plugin
>          Issue Type: Improvement
>          Components: build-classpath
>            Reporter: Giedrius Noreikis
> Currently, the {{dependency:build-classpath}} goal does not allow a space 
> character to be specified as a {{pathSeparator}}, which is necessary to 
> generate {{Class-Path}} values for manifests.
> Because of a check {{isPathSepSet = StringUtils.isNotEmpty( pathSeparator )}} 
> in {{BuildClasspathMojo.java}}, the parameter gets ignored in this case, and 
> the classpath is built with a default separator.
> The possible workaround is to fix the path with 
> {{build-helper:regex-property}}:
> {code:xml}
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>build-helper-maven-plugin</artifactId>
>         <executions>
>           <execution>
>             <id>fix-classpath-for-manifest</id>
>             <phase>prepare-package</phase>
>             <goals><goal>regex-property</goal></goals>
>             <configuration>
>               <name>appClasspath</name>
>               <value>${appClasspath}</value>
>               <regex>;</regex>
>               <replacement xml:space="preserve"> </replacement>
>               <failIfNoMatch>false</failIfNoMatch>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin>
> {code}
> but a fix would allow for a more straightforward solution.

This message was sent by Atlassian JIRA

Reply via email to