Uploaded image for project: 'Buildr (Retired)'
  1. Buildr (Retired)
  2. BUILDR-107

compile_task.from(sources) does not support files that are java classes in a named package

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Auto Closed
    • 1.3.3
    • Wish List
    • Compilers
    • None
    • Trunk revision 679935

    Description

      Compile tasks accepts source files. Yet they do not handle them correctly when the source file is a java class in a named package. Compile tasks believes that "src/main/java/thepackage/Test1.java" should be compiled to "target/classes/Test1.class" instead of "target/classes/thepackage/Test1.class".

      When changing compile_spec.rb to use java source files in a named package, there are two failing tests.

      1)
      'Buildr::CompileTask#invoke should not force compilation if sources older than compiled' FAILED
      Expected the tasks foo:compile to not run, but they all ran.
      /buildr-trunk/spec/compile_spec.rb:323:

      2)
      'Buildr::CompileTask#invoke should not force compilation if dependencies older than compiled' FAILED
      Expected the tasks foo:compile to not run, but they all ran.
      /buildr-trunk/spec/compile_spec.rb:342:

      I can think of two ways to fix this issue. Either compile tasks should reject source files and accept only source directory. Or they need to be smarter and figure out the package of java source files.

      Attachments

        1. BUILDR-107_specs.patch
          4 kB
          Antoine Contal

        Activity

          People

            Unassigned Unassigned
            lacton Antoine Contal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: