Uploaded image for project: 'Maven Antrun Plugin'
  1. Maven Antrun Plugin
  2. MANTRUN-206

Plugin fails with conditional property containing a Windows path.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Workaround
    • None
    • None
    • None

    Description

      <configuration>
        <target>
          <condition property="dir" value="${project.reporting.outputDirectory}/xsddoc">
            <matches string="${project.reporting.outputDirectory}" pattern="^${basedir}" />
          </condition>
        </target>
      </configuration>
      

      This fragment fails on Windows with something like:

      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)
      

      Attachments

        Issue Links

          Activity

            People

              gboue Guillaume Boué
              rfscholte Robert Scholte
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: