Buildr
  1. Buildr
  2. BUILDR-63

Buildr Attempts to Download JAR for POM-Only Project

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.3.2
    • Component/s: Dependency management
    • Labels:
      None

      Description

      This is basically BUILDR-9, except I couldn't just reopen the bug. This is 100% reproducible for me, both with the attached buildfile and with other such transitive dependencies that I have tried. I'm marking this as a blocker because transitive dependencies really can't be considered stable until this is fixed.

      1. buildfile
        0.7 kB
        Daniel Spiewak

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        37d 21h 12m 1 Daniel Spiewak 07/Jun/08 01:46
        Resolved Resolved Closed Closed
        1110d 9h 23m 1 Peter Donald 22/Jun/11 11:09
        Peter Donald made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Daniel Spiewak made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Fix Version/s 1.3.2 [ 12313159 ]
        Hide
        Daniel Spiewak added a comment -

        Confirmed fixed.

        Show
        Daniel Spiewak added a comment - Confirmed fixed.
        Hide
        Daniel Spiewak added a comment -

        Ah, so it requires at least one source file to generate the project meta! Well that's...weird. It does make life workable though. I'll open a separate issue on that topic.

        Show
        Daniel Spiewak added a comment - Ah, so it requires at least one source file to generate the project meta! Well that's...weird. It does make life workable though. I'll open a separate issue on that topic.
        Hide
        Alex Boisvert added a comment -

        Ok, I was able to reproduce your issue after adding these two repositories:

        repositories.remote << 'http://repo1.maven.org/maven2'
        repositories.remote << 'http://download.java.net/maven/2'

        but then I remembered that the Eclipse task will only generate project files for Java and Scala projects at this time. Here's a quote from the eclipse.rb source:

        1. Only for projects that we support
          supported_languages = [:java, :scala]
          supported_packaging = %w(jar war rar mar aar)
          if (supported_languages.include? project.compile.language ||
          project.packages.detect { |pkg| supported_packaging.include?(pkg.type.to_s) }

          )
          eclipse.enhance [ file(project.path_to(".classpath")), file(project.path_to(".project")) ]

        so if you have any .java file under src/main/java or any .scala file under src/main/scala, it should work as expected. Alternatively you can add the following to Buildfile to skip auto-detection:

        compile.using :javac
        or
        compile.using :scalac

        Show
        Alex Boisvert added a comment - Ok, I was able to reproduce your issue after adding these two repositories: repositories.remote << 'http://repo1.maven.org/maven2' repositories.remote << 'http://download.java.net/maven/2' but then I remembered that the Eclipse task will only generate project files for Java and Scala projects at this time. Here's a quote from the eclipse.rb source: Only for projects that we support supported_languages = [:java, :scala] supported_packaging = %w(jar war rar mar aar) if (supported_languages.include? project.compile.language || project.packages.detect { |pkg| supported_packaging.include?(pkg.type.to_s) } ) eclipse.enhance [ file(project.path_to(".classpath")), file(project.path_to(".project")) ] so if you have any .java file under src/main/java or any .scala file under src/main/scala, it should work as expected. Alternatively you can add the following to Buildfile to skip auto-detection: compile.using :javac or compile.using :scalac
        Hide
        Daniel Spiewak added a comment -

        .* files aren't hidden on windows, so they aren't in powershell either. I can do an `ls` in other directories and see the project files, so I'm sure it's not just that.

        Show
        Daniel Spiewak added a comment - .* files aren't hidden on windows, so they aren't in powershell either. I can do an `ls` in other directories and see the project files, so I'm sure it's not just that.
        Hide
        Alex Boisvert added a comment -

        Not sure about Windows Powershell, but on *nix you have to do "ls -a" to view the Eclipse project files.

        boisvert@boog:~/svn/someproject/trunk$ ls
        Buildfile src target

        boisvert@boog:~/svn/someproject/trunk$ ls -a
        . .. Buildfile .classpath .project src .svn target

        Show
        Alex Boisvert added a comment - Not sure about Windows Powershell, but on *nix you have to do "ls -a" to view the Eclipse project files. boisvert@boog:~/svn/someproject/trunk$ ls Buildfile src target boisvert@boog:~/svn/someproject/trunk$ ls -a . .. Buildfile .classpath .project src .svn target
        Hide
        Daniel Spiewak added a comment -

        I can confirm that this is no longer crashing due to the empty POMs. Nice work!

        Unfortunately, Eclipse project metadata still doesn't seem to generate from the result. I can open a new issue if you like, but I figured that I would comment here just in case the problem is related:

        PS C:\Users\Daniel Spiewak\Development\TestApp> buildr eclipse
        (in C:/Users/Daniel Spiewak/Development/TestApp, development)
        Completed in 1.007s
        PS C:\Users\Daniel Spiewak\Development\TestApp> ls

        Directory: Microsoft.PowerShell.Core\FileSystem::C:\Users\Daniel Spiewak\Development\TestApp

        Mode LastWriteTime Length Name
        ---- ------------- ------ ----
        d---- 5/27/2008 10:07 PM src
        a-- 6/6/2008 5:52 PM 310 buildfile

        PS C:\Users\Daniel Spiewak\Development\TestApp>

        Show
        Daniel Spiewak added a comment - I can confirm that this is no longer crashing due to the empty POMs. Nice work! Unfortunately, Eclipse project metadata still doesn't seem to generate from the result. I can open a new issue if you like, but I figured that I would comment here just in case the problem is related: PS C:\Users\Daniel Spiewak\Development\TestApp> buildr eclipse (in C:/Users/Daniel Spiewak/Development/TestApp, development) Completed in 1.007s PS C:\Users\Daniel Spiewak\Development\TestApp> ls Directory: Microsoft.PowerShell.Core\FileSystem::C:\Users\Daniel Spiewak\Development\TestApp Mode LastWriteTime Length Name ---- ------------- ------ ---- d---- 5/27/2008 10:07 PM src a -- 6/6/2008 5:52 PM 310 buildfile PS C:\Users\Daniel Spiewak\Development\TestApp>
        Hide
        Daniel Spiewak added a comment -

        Will test SVN at earliest possible convenience.

        Show
        Daniel Spiewak added a comment - Will test SVN at earliest possible convenience.
        Hide
        Assaf Arkin added a comment -

        I still can't replicate the problem , but I think I know what's going on and if I'm right SVN should have a fix.

        Show
        Assaf Arkin added a comment - I still can't replicate the problem , but I think I know what's going on and if I'm right SVN should have a fix.
        Hide
        Daniel Spiewak added a comment -

        A reduced test case:

        repositories.remote << 'http://databinder.net/repo'

        define 'TestApp' do
        project.version = '0.1'
        compile.with transitive('net.databinder:databinder-app-ao:jar:1.2-alpha1')
        package :jar
        end

        Show
        Daniel Spiewak added a comment - A reduced test case: repositories.remote << 'http://databinder.net/repo' define 'TestApp' do project.version = '0.1' compile.with transitive('net.databinder:databinder-app-ao:jar:1.2-alpha1') package :jar end
        Daniel Spiewak made changes -
        Field Original Value New Value
        Attachment buildfile [ 12381164 ]
        Hide
        Daniel Spiewak added a comment -

        Results in the following message:

        (in C:/Users/Daniel Spiewak/Development/workspace/TestApp, development)
        Downloading net.databinder:databinder-parent:jar:1.2-alpha1
        rake aborted!
        Failed to download net.databinder:databinder-parent:jar:1.2-alpha1, tried the following repositories:
        http://databinder.net/repo/

        (See full trace by running task with --trace)

        Show
        Daniel Spiewak added a comment - Results in the following message: (in C:/Users/Daniel Spiewak/Development/workspace/TestApp, development) Downloading net.databinder:databinder-parent:jar:1.2-alpha1 rake aborted! Failed to download net.databinder:databinder-parent:jar:1.2-alpha1, tried the following repositories: http://databinder.net/repo/ (See full trace by running task with --trace)
        Daniel Spiewak created issue -

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development