Robert Scholte created MANTRUN-206:
--------------------------------------

             Summary: Plugin fails with conditional property containing a 
Windows path.
                 Key: MANTRUN-206
                 URL: https://issues.apache.org/jira/browse/MANTRUN-206
             Project: Maven Antrun Plugin
          Issue Type: Bug
            Reporter: Robert Scholte


{code:xml}
<configuration>
  <target>
    <condition property="dir" 
value="${project.reporting.outputDirectory}/xsddoc">
      <matches string="${project.reporting.outputDirectory}" 
pattern="^${basedir}" />
    </condition>
  </target>
</configuration>
{code}
This fragment fails on Windows with something like:
{noformat}
Caused by: java.util.regex.PatternSyntaxException: Illegal/unsupported escape 
sequence near index 4
^E:\java-workspace\apache-maven-doxia\maven-doxia\doxia-modules\doxia-module-fml
    ^
    at java.util.regex.Pattern.error (Pattern.java:1957)
    at java.util.regex.Pattern.escape (Pattern.java:2473)
    at java.util.regex.Pattern.atom (Pattern.java:2200)
    at java.util.regex.Pattern.sequence (Pattern.java:2132)
    at java.util.regex.Pattern.expr (Pattern.java:1998)
    at java.util.regex.Pattern.compile (Pattern.java:1698)
    at java.util.regex.Pattern.<init> (Pattern.java:1351)
    at java.util.regex.Pattern.compile (Pattern.java:1054)
    at org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher.getCompiledPattern 
(Jdk14RegexpMatcher.java:67)
    at org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher.matches 
(Jdk14RegexpMatcher.java:94)
    at org.apache.tools.ant.taskdefs.condition.Matches.eval (Matches.java:117)
    at org.apache.tools.ant.taskdefs.ConditionTask.execute 
(ConditionTask.java:120)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute 
(DispatchUtils.java:106)
    at org.apache.tools.ant.TaskAdapter.execute (TaskAdapter.java:154)
    at org.apache.tools.ant.UnknownElement.execute (UnknownElement.java:292)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute 
(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform (Task.java:348)
    at org.apache.tools.ant.Target.execute (Target.java:435)
    at org.apache.tools.ant.Target.performTasks (Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets (Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget (Project.java:1364)
    at org.apache.maven.plugin.antrun.AntRunMojo.execute (AntRunMojo.java:313)
{noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to