maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Gran (JIRA)" <j...@codehaus.org>
Subject [jira] Issue Comment Edited: (MDEP-325) build-classpath adds a newline character when dependency artifact name starts with letter n
Date Fri, 04 Nov 2011 18:34:51 GMT

    [ https://jira.codehaus.org/browse/MDEP-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=282825#comment-282825
] 

Thomas Gran edited comment on MDEP-325 at 11/4/11 1:34 PM:
-----------------------------------------------------------

I have added a patch witch:

o Fixes so the pathSeparator is left untouched by the replacment of the fileSeparator.
o The unit tests are updated.
o The fixdoes not escape '\'with another '\' when outputToFilterFile. See comments on this
bug. 

To escape the '\' when outputFilterFile is set, is not so easy. You should not replace '\'
in the prefix, pathSeparator or fileSeparator (when set), because this would make it impossible
to use '\n' and so on. Then only doing it in the file name seems a bit odd. Futher this would
break the backward compabillity. In most cases setting the fileSeparator to a double '\' or
'/' would be a good workaround. 



      was (Author: thomasgran):
    o This patch fixes so the pathSeparator is left untouched by the replacment of the fileSeparator.
o The unit tests are updated.
o The fixdoes not escape '\'with another '\' when outputToFilterFile. See comments on this
bug. 
  
> build-classpath adds a newline character when dependency artifact name starts with letter
n
> -------------------------------------------------------------------------------------------
>
>                 Key: MDEP-325
>                 URL: https://jira.codehaus.org/browse/MDEP-325
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: Bug
>          Components: build-classpath
>    Affects Versions: 2.1, 2.2, 2.3
>            Reporter: L. Compère
>            Assignee: Brian Fox
>         Attachments: MDEP-325.patch
>
>
> I'm using a combination of the maven-dependency-plugin and the maven-assembly-plugin
to insert a classpath in a filtered resource.
> It so happens that one of the dependencies to be added to the classpath is "neethi-2.0.4.jar".
> The build-classpath goal of the dependency plugin writes the following in a file (all
on one line):
> classpath=%MM_ENV_PATH%J/Lib/\httpcore-nio-4.0-beta1.jar;%MM_ENV_PATH%J/Lib/\neethi-2.0.4.jar;%MM_ENV_PATH%J/Lib/\axiom-api-1.2.7.jar;%MM_ENV_PATH%J/Lib/\axiom-dom-1.2.7.jar;
> When the assembly plugin uses the content of the file generated by the build-classpath
goal of the dependency plugin, it translates the \n found in "%MM_ENV_PATH%J/Lib/\neethi-2.0.4.jar;"
into a NEWLINE character... causing my classpath to be broken as such (on two lines):
> %MM_ENV_PATH%J/Lib/\httpcore-nio-4.0-beta1.jar;%MM_ENV_PATH%J/Lib/
> eethi-2.0.4.jar;%MM_ENV_PATH%J/Lib/\axiom-api-1.2.7.jar;%MM_ENV_PATH%J/Lib/\axiom-dom-1.2.7.jar;
> notice how neethi-2.0.4.jar has become eethi-2.0.4.jar....
> Has anyone had such a problem?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message