Maven
  1. Maven
  2. MNG-1348

includes on resource tag not documented as being a list

    Details

    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      according to the product documentation at http://maven.apache.org/maven2/maven-model/maven.html each resource should be able to specify includes. maven errors out unless the inclues is moved out of "resource" and into the "resources" tag.

      example model:
      <resources>
      <resource>
      <directory>src/main/wsdd</directory>
      <includes>*.wsdl</includes>
      </resource>
      </resources>

      exception:
      [INFO] Trace
      org.apache.maven.reactor.MavenExecutionException: Parse error reading POM
      at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:359)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:276)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:113)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)

      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: org.apache.maven.project.InvalidProjectModelException: Parse error re
      ading POM
      at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
      MavenProjectBuilder.java:1097)
      at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
      MavenProjectBuilder.java:1057)
      at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFi
      le(DefaultMavenProjectBuilder.java:291)
      at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMave
      nProjectBuilder.java:276)
      at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:509)
      at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:441)
      at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:345)
      ... 11 more
      Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: expected ST
      ART_TAG or END_TAG not TEXT (position: TEXT seen ...</directory>\r\n <inc
      ludes>*.wsdl</... @71:27)
      at org.codehaus.plexus.util.xml.pull.MXParser.nextTag(MXParser.java:1080
      )
      at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseResource(MavenXpp
      3Reader.java:3825)
      at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseBuild(MavenXpp3Re
      ader.java:621)
      at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel(MavenXpp3Re
      ader.java:2131)
      at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.j
      ava:4255)
      at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(Default
      MavenProjectBuilder.java:1093)

        Activity

        Hide
        Lester Ecarma added a comment -

        Actually, the correct format (as apparent from the source) should be

        <resources>
        <resource>
        <directory>src/main/wsdd</directory>
        <includes>
        <include>*.wsdl</include>
        </includes>
        </resource>
        </resources>

        The same follows for <excludes>.

        Show
        Lester Ecarma added a comment - Actually, the correct format (as apparent from the source) should be <resources> <resource> <directory>src/main/wsdd</directory> <includes> <include>*.wsdl</include> </includes> </resource> </resources> The same follows for <excludes>.
        Hide
        Dennis Lundberg added a comment -

        The documentation for resource now says:

        includes A list of patterns to include, e.g. */.xml.

        Show
        Dennis Lundberg added a comment - The documentation for resource now says: includes A list of patterns to include, e.g. * / .xml.

          People

          • Assignee:
            Dennis Lundberg
            Reporter:
            Ryan Sonnek
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: