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

Buildr should not unnecessarily recompile Java files explicitly added to compile.from

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.4.6
    • 1.4.7
    • Compilers
    • None

    Description

      We have something like that in our buildfile

      compile.from(FileList[
      FooI/jsrc/*/.java',
      Bar/jsrc/']
      .exclude('FooJava.java'))

      Calling build task twice do two compilations.

      buildr doesn't remove the ";" character from the package name in the compile_map

      We did have to use the following patch to fix it:

      — lib/buildr/core/compile.rb 2011-09-14 11:55:23.377091000 +0200
      +++ lib/buildr/core/compile.rb.org 2011-09-14 11:56:08.619013000 +0200
      @@ -193,7 +193,7 @@

      1. try to extract package name from .java or .scala files
        if ['.java', '.scala', '.groovy'].include? File.extname(source)
        package = findFirst(source, /^\s*package\s+(\S+)\s*;?\s*$/)
      • map[source] = package ? File.join(target, package[1].gsub('.', '/').gsub(';',''), File.basename(source).ext(target_ext)) : target
        + map[source] = package ? File.join(target, package[1].gsub('.', '/'), File.basename(source).ext(target_ext)) : target
        elsif
        map[source] = target
        end

      Attachments

        Activity

          People

            pdonald Peter Donald
            qinqon FĂ©lix Enrique Llorente Pastora
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: