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

Kenney Westerhof edited comment on MASSEMBLY-696 at 4/21/14 8:52 AM:
---------------------------------------------------------------------

I'm referencing old code because the bug has been in there that long.

I don't understand your question. What do you need the revision for?  And what 
revision exactly?

The patch will work against any revision after 1073964, when that line of code 
was introduced (svn blame/praise/annotate/ann). -And {{trunk}} is a symbolic 
name referencing the latest revision in any subversion repository- 
{color:grey}my bad, I should have said {{HEAD}}{color} (1588817 at the time of 
this writing); I was being sarcastic, my apologies, this doesn't always come 
across on digital media!

Also, it's really not necessary to make an integration test for this one. It's 
the _unit_ tests for that code that are incomplete as they only check Unix 
style pathnames, while the code explicitly attempts to deal with windows style 
paths aswell.

In any case, I've concocted an integration test as per your request. 

It took me quite a while to figure out what exactly triggers this code. It 
occurs when specifying {{<unpack>true</unpack>}} dependencies and either 
specifying a non-default value for {{<lineEnding/>}} or {{<filtered/>}}. I 
added some debug to the assembly plugin, and it breaks when {{fixRelativeRefs}} 
is called with {{.\log4j-1.2.17.jar/}}. That this doesn't happen more often is 
because most code calling {{fixRelativeRefs}} duplicates code from that method 
(i.e. stripping {{./}}, {{../}} etc).


was (Author: kenneyw):
I'm referencing old code because the bug has been in there that long.

I don't understand your question. What do you need the revision for?  And what 
revision exactly?

The patch will work against any revision after 1073964, when that line of code 
was introduced (svn blame/praise/annotate/ann). And {{trunk}} is a symbolic 
name referencing the latest revision in any subversion repository (1588817 at 
the time of this writing); I was being sarcastic, my apologies, this doesn't 
always come across on digital media!

Also, it's really not necessary to make an integration test for this one. It's 
the _unit_ tests for that code that are incomplete as they only check Unix 
style pathnames, while the code explicitly attempts to deal with windows style 
paths aswell.

In any case, I've concocted an integration test as per your request. 

It took me quite a while to figure out what exactly triggers this code. It 
occurs when specifying {{<unpack>true</unpack>}} dependencies and either 
specifying a non-default value for {{<lineEnding/>}} or {{<filtered/>}}. I 
added some debug to the assembly plugin, and it breaks when {{fixRelativeRefs}} 
is called with {{.\log4j-1.2.17.jar/}}. That this doesn't happen more often is 
because most code calling {{fixRelativeRefs}} duplicates code from that method 
(i.e. stripping {{./}}, {{../}} etc).

I've never had to do so much work to simply add {{\\}} to an obviously broken 
line of code! ;-) I could have commited the fix in svn this myself, but since 
I've not been involved in the project recently I though it wise to be polite 
and follow the proper channels.

> Internal Regexp Error with Windows Paths
> ----------------------------------------
>
>                 Key: MASSEMBLY-696
>                 URL: https://jira.codehaus.org/browse/MASSEMBLY-696
>             Project: Maven Assembly Plugin
>          Issue Type: Bug
>    Affects Versions: 2.5
>         Environment: Windows 7
> maven-assembly-plugin trunk@e785abb
>            Reporter: Kenney Westerhof
>         Attachments: MASSEMBLY-696.patch, MASSEMBLY-696.tar.gz
>
>
> On windows the Assembly plugin shows this error:
> {code}
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute 
> goal org.apache.maven.plugins:maven-assembly-plugin:2.5-SNAPSHOT:single 
> (default-cli) on project myproject: Execution default-cli of goal 
> org.apache.maven.plugins:maven-assembly-plugin:2.5-SNAPSHOT:single failed: 
> Unexpected internal error near index 1
> \
>  ^
>         at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
> ....
> Caused by: java.util.regex.PatternSyntaxException: Unexpected internal error 
> near index 1
> \
>  ^
>         at java.util.regex.Pattern.error(Pattern.java:1924)
>         at java.util.regex.Pattern.compile(Pattern.java:1671)
>         at java.util.regex.Pattern.<init>(Pattern.java:1337)
>         at java.util.regex.Pattern.compile(Pattern.java:1022)
>         at java.lang.String.split(String.java:2313)
>         at java.lang.String.split(String.java:2355)
>         at 
> org.apache.maven.plugin.assembly.utils.AssemblyFormatUtils.fixRelativeRefs(AssemblyFormatUtils.java:509)
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to