Buildr
  1. Buildr
  2. BUILDR-123

eclipse task should honor ResourceTask's target directory

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.3
    • Fix Version/s: 1.3.3
    • Component/s: IDE
    • Labels:
      None
    • Environment:
      buildr trunk revision 682561

      Description

      buildr copies resources to target/resources and target/test/resources.

      The eclipse task generates a .classpath file that does not honor this behavior. It generates a .classpath file that copies resources to the CompileTask's target (e.g., target/classes or target/test/classes).

      Here's an example.

      = What the eclipse task generates now =

      <classpath>
      <classpathentry kind="src" path="src/main/java" excluding="*/.svn/|*/CVS/"/>
      <classpathentry kind="src" path="src/main/resources" excluding="*/.svn/|*/CVS/"/>
      <classpathentry kind="src" path="src/test/java" output="target/test/classes" excluding="*/.svn/|*/CVS/"/>
      <classpathentry kind="src" path="src/test/resources" output="target/test/classes" excluding="*/.svn/|*/CVS/"/>
      <classpathentry kind="var" path="M2_REPO/jmock/jmock/1.2.0/jmock-1.2.0.jar"/>
      <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
      <classpathentry kind="output" path="target/classes"/>
      <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
      </classpath>

      = What I think would be more consistent =
      <classpath>
      <classpathentry kind="src" path="src/main/java" excluding="*/.svn/|*/CVS/"/>
      <classpathentry kind="src" path="src/main/resources" output="target/resources" excluding="*/.svn/|*/CVS/"/>
      <classpathentry kind="src" path="src/test/java" output="target/test/classes" excluding="*/.svn/|*/CVS/"/>
      <classpathentry kind="src" path="src/test/resources" output="target/test/resources" excluding="*/.svn/|*/CVS/"/>
      <classpathentry kind="var" path="M2_REPO/jmock/jmock/1.2.0/jmock-1.2.0.jar"/>
      <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
      <classpathentry kind="output" path="target/classes"/>
      <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
      </classpath>

      1. BUILDR-123.lib.patch
        7 kB
        lacton
      2. BUILDR-123.spec.patch
        6 kB
        lacton

        Issue Links

          Activity

          Hide
          lacton added a comment -

          $ svn ci -m "BUILDR-123: eclipse task now honors ResourceTask's target directory (+ heavy refactoring)"
          Sending CHANGELOG
          Sending lib/buildr/ide/eclipse.rb
          Sending spec/eclipse_spec.rb
          Transmitting file data ...
          Committed revision 688204.

          Show
          lacton added a comment - $ svn ci -m " BUILDR-123 : eclipse task now honors ResourceTask's target directory (+ heavy refactoring)" Sending CHANGELOG Sending lib/buildr/ide/eclipse.rb Sending spec/eclipse_spec.rb Transmitting file data ... Committed revision 688204.
          Hide
          lacton added a comment -

          Here is a better lib patch. I introduced a new class to factor and group the low-level details.

          Show
          lacton added a comment - Here is a better lib patch. I introduced a new class to factor and group the low-level details.
          Hide
          lacton added a comment -

          Here is the code fix that passes the spec.

          This fix is minimalistic. I think eclipse_rb needs some refactoring.

          Show
          lacton added a comment - Here is the code fix that passes the spec. This fix is minimalistic. I think eclipse_rb needs some refactoring.
          Hide
          lacton added a comment -

          Added another test case so that BUILDR-117 behavior is true for test resources as well.

          Show
          lacton added a comment - Added another test case so that BUILDR-117 behavior is true for test resources as well.
          Hide
          lacton added a comment -

          I added a new test case so that we do not break BUILDR-117.

          Show
          lacton added a comment - I added a new test case so that we do not break BUILDR-117 .
          Hide
          lacton added a comment -

          BUILDR-123.spec.patch contains a heavily-refactored version of eclipse_spec.rb.

          It contains two new pending tests that show the eclipse task's defect.

          Show
          lacton added a comment - BUILDR-123 .spec.patch contains a heavily-refactored version of eclipse_spec.rb. It contains two new pending tests that show the eclipse task's defect.

            People

            • Assignee:
              Unassigned
              Reporter:
              lacton
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development