Maven 1.x Eclipse Plugin
  1. Maven 1.x Eclipse Plugin
  2. MPECLIPSE-21

Generate excludes for classpath from Maven's source modifications

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I'm using Maven's source code modifications to exclude certain
      directories from the build. It would be great if this can be generated by your plugin.
      My solution may not be perfect, but I would greatly appreciate it if something similar to my contribution would make it into to the plugin.

      Here's how I modified "classpath.jelly":

      <j:if test="$

      {sourcesPresent}

      ">
      <maven:makeRelativePath var="srcDir" basedir="$

      {basedir}

      " path="$

      {pom.build.sourceDirectory}

      "/>
      <j:set var="exluding" value=""/>
      <j:forEach var="sm" items="$

      {pom.build.sourceModifications}

      ">
      <j:forEach var="exclude" items="$

      {sm.excludes}

      ">
      <j:set var="excluding" value="$

      {excluding},${exclude}"/>
      </j:forEach>
      </j:forEach>
      <j:set var="excluding">${excluding.substring(1)}</j:set>
      <classpathentry kind="src" path="${srcDir}" excluding="${excluding}

      "/>
      </j:if>

        Activity

        Hide
        Brett Porter added a comment -

        apparently dion has a valid objection to this, rolling the patch back.

        Show
        Brett Porter added a comment - apparently dion has a valid objection to this, rolling the patch back.

          People

          • Assignee:
            Brett Porter
            Reporter:
            Boris Boehlen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: