buildr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Trejkaz (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BUILDR-700) Buildr truncates some jar files in my local repo if they are set to download from a specific URL
Date Sat, 28 Jun 2014 12:54:24 GMT

     [ https://issues.apache.org/jira/browse/BUILDR-700?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Trejkaz updated BUILDR-700:
---------------------------

    Description: 
I have SwingX in my project specified to download from my own copy of it (purely because I
didn't have a better place at the time.)

{code:ruby}
SWINGX                = [ artifact('org.swinglabs.swingx:swingx-action:jar:1.6.6-SNAPSHOT'),
                          artifact('org.swinglabs.swingx:swingx-common:jar:1.6.6-SNAPSHOT'),
                          artifact('org.swinglabs.swingx:swingx-core:jar:1.6.6-SNAPSHOT'),
                          artifact('org.swinglabs.swingx:swingx-painters:jar:1.6.6-SNAPSHOT'),
                          artifact('org.swinglabs.swingx:swingx-plaf:jar:1.6.6-SNAPSHOT')
]

download artifact('org.swinglabs.swingx:swingx-action:jar:1.6.6-SNAPSHOT') =>
  'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-action-1.6.6-SNAPSHOT.jar'
download artifact('org.swinglabs.swingx:swingx-common:jar:1.6.6-SNAPSHOT') =>
  'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-common-1.6.6-SNAPSHOT.jar'
download artifact('org.swinglabs.swingx:swingx-core:jar:1.6.6-SNAPSHOT') =>
  'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-core-1.6.6-SNAPSHOT.jar'
download artifact('org.swinglabs.swingx:swingx-painters:jar:1.6.6-SNAPSHOT') =>
  'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-painters-1.6.6-SNAPSHOT.jar'
download artifact('org.swinglabs.swingx:swingx-plaf:jar:1.6.6-SNAPSHOT') =>
  'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-plaf-1.6.6-SNAPSHOT.jar'
{code}

Every day for the past few weeks, when I first run my build for the day, I get an error like
this:

{noformat}
Compiling hex:main into /Users/trejkaz/Documents/hex/main/target/classes
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-common/1.6.6-SNAPSHOT/swingx-common-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-core/1.6.6-SNAPSHOT/swingx-core-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-painters/1.6.6-SNAPSHOT/swingx-painters-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-plaf/1.6.6-SNAPSHOT/swingx-plaf-1.6.6-SNAPSHOT.jar;
zip file is empty
5 errors
Buildr aborted!
{noformat}

At this point, I look at the files and they are indeed zero size!

{noformat}
Rika:hex trejkaz$ ls -la ~/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar
-rw-------  1 trejkaz  staff  0 28 Jun 22:30 /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar
{noformat}

So it seems like buildr is truncating the file daily.

Deleting the files and re-running buildr puts the correct files back. Any subsequent builds
for that day will continue to work as per usual, then the next day, buildr will truncate the
file again.

Interestingly, I use the same approach for icu4j-charsets.jar:

{code:ruby}
ICU4J                 = [ artifact('com.ibm.icu:icu4j:jar:53.1'),
                          artifact('com.ibm.icu:icu4j-charsets:jar:53.1') ]

download artifact('com.ibm.icu:icu4j-charsets:jar:53.1') =>
  'http://download.icu-project.org/files/icu4j/53.1/icu4j-charset-53_1.jar'
{code}

But the issue has *never* occurred for this jar. Fiddling the timestamps on the files makes
for a reliable reproduction for SwingX, though:

{noformat}
Rika:hex trejkaz$ buildr
(this build works)
Rika:hex trejkaz$ find /Users/trejkaz/.m2/repository/org/swinglabs/swingx  -exec touch -t
201406270000 {} \;
Rika:hex trejkaz$ buildr
(in /Users/trejkaz/Documents/hex, development)
Building hex
Compiling hex:main into /Users/trejkaz/Documents/hex/main/target/classes
DL is deprecated, please use Fiddle
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-common/1.6.6-SNAPSHOT/swingx-common-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-core/1.6.6-SNAPSHOT/swingx-core-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-painters/1.6.6-SNAPSHOT/swingx-painters-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-plaf/1.6.6-SNAPSHOT/swingx-plaf-1.6.6-SNAPSHOT.jar;
zip file is empty
5 errors
Buildr aborted!
RuntimeError : Failed to compile, see errors above

(See full trace by running task with --trace)
{noformat}

And again, with trace turned on, turns up this:

{noformat}
** Invoke /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar
(first_time)
** Execute /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar
Requesting https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-action-1.6.6-SNAPSHOT.jar
Redirected to https://s3.amazonaws.com/github-cloud/releases/20121830/adc8bb5a-f480-11e3-8ffa-6f15927a60c1.jar?response-content-disposition=attachment%3B%20filename%3Dswingx-action-1.6.6-SNAPSHOT.jar&AWSAccessKeyId=AKIAISTNZFOVBIJMK3TQ&Expires=1403959849&Signature=udzDpEwy97nMKArUVNil7K6JdqY%3D
Requesting https://s3.amazonaws.com/github-cloud/releases/20121830/adc8bb5a-f480-11e3-8ffa-6f15927a60c1.jar?response-content-disposition=attachment%3B%20filename%3Dswingx-action-1.6.6-SNAPSHOT.jar&AWSAccessKeyId=AKIAISTNZFOVBIJMK3TQ&Expires=1403959849&Signature=udzDpEwy97nMKArUVNil7K6JdqY%3D
Not modified since last download
mkdir -p /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT
mv /var/folders/xl/b3tjcxt56zb113jzpzyt001w0000gp/T/swingx-action-1.6.6-SNAPSHOT.jar20140628-8988-4ws1ki
/Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar
{noformat}

So it looks like when the file has not been modified since the last download, buildr replaces
the local file with a zero-length file which it was presumably using to do an atomic file
download.


  was:
I have SwingX in my project specified to download from my own copy of it (purely because I
didn't have a better place at the time.)

{code:ruby}
SWINGX                = [ artifact('org.swinglabs.swingx:swingx-action:jar:1.6.6-SNAPSHOT'),
                          artifact('org.swinglabs.swingx:swingx-common:jar:1.6.6-SNAPSHOT'),
                          artifact('org.swinglabs.swingx:swingx-core:jar:1.6.6-SNAPSHOT'),
                          artifact('org.swinglabs.swingx:swingx-painters:jar:1.6.6-SNAPSHOT'),
                          artifact('org.swinglabs.swingx:swingx-plaf:jar:1.6.6-SNAPSHOT')
]

download artifact('org.swinglabs.swingx:swingx-action:jar:1.6.6-SNAPSHOT') =>
  'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-action-1.6.6-SNAPSHOT.jar'
download artifact('org.swinglabs.swingx:swingx-common:jar:1.6.6-SNAPSHOT') =>
  'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-common-1.6.6-SNAPSHOT.jar'
download artifact('org.swinglabs.swingx:swingx-core:jar:1.6.6-SNAPSHOT') =>
  'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-core-1.6.6-SNAPSHOT.jar'
download artifact('org.swinglabs.swingx:swingx-painters:jar:1.6.6-SNAPSHOT') =>
  'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-painters-1.6.6-SNAPSHOT.jar'
download artifact('org.swinglabs.swingx:swingx-plaf:jar:1.6.6-SNAPSHOT') =>
  'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-plaf-1.6.6-SNAPSHOT.jar'
{code}

Every day for the past few weeks, when I first run my build for the day, I get an error like
this:

{noformat}
Compiling hex:main into /Users/trejkaz/Documents/hex/main/target/classes
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-common/1.6.6-SNAPSHOT/swingx-common-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-core/1.6.6-SNAPSHOT/swingx-core-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-painters/1.6.6-SNAPSHOT/swingx-painters-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-plaf/1.6.6-SNAPSHOT/swingx-plaf-1.6.6-SNAPSHOT.jar;
zip file is empty
5 errors
Buildr aborted!
{noformat}

At this point, I look at the files and they are indeed zero size!

{noformat}
Rika:hex trejkaz$ ls -la ~/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar
-rw-------  1 trejkaz  staff  0 28 Jun 22:30 /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar
{noformat}

So it seems like buildr is truncating the file daily for some unknown reason.

Deleting the files and re-running buildr puts the correct files back. Any subsequent builds
for that day will continue to work as per usual, then the next day, buildr will truncate the
file again.

Interestingly, I use the same approach for icu4j-charsets.jar:

{code:ruby}
ICU4J                 = [ artifact('com.ibm.icu:icu4j:jar:53.1'),
                          artifact('com.ibm.icu:icu4j-charsets:jar:53.1') ]

download artifact('com.ibm.icu:icu4j-charsets:jar:53.1') =>
  'http://download.icu-project.org/files/icu4j/53.1/icu4j-charset-53_1.jar'
{code}

But the issue has *never* occurred for this jar, so there must be something about hosting
files on GitHub which causes this issue.

Fiddling the timestamps on the files makes for a reliable reproduction:

{noformat}
Rika:hex trejkaz$ buildr
(this build works)
Rika:hex trejkaz$ find /Users/trejkaz/.m2/repository/org/swinglabs/swingx  -exec touch -t
201406270000 {} \;
Rika:hex trejkaz$ buildr
(in /Users/trejkaz/Documents/hex, development)
Building hex
Compiling hex:main into /Users/trejkaz/Documents/hex/main/target/classes
DL is deprecated, please use Fiddle
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-common/1.6.6-SNAPSHOT/swingx-common-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-core/1.6.6-SNAPSHOT/swingx-core-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-painters/1.6.6-SNAPSHOT/swingx-painters-1.6.6-SNAPSHOT.jar;
zip file is empty
error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-plaf/1.6.6-SNAPSHOT/swingx-plaf-1.6.6-SNAPSHOT.jar;
zip file is empty
5 errors
Buildr aborted!
RuntimeError : Failed to compile, see errors above

(See full trace by running task with --trace)
{noformat}



> Buildr truncates some jar files in my local repo if they are set to download from a specific
URL
> ------------------------------------------------------------------------------------------------
>
>                 Key: BUILDR-700
>                 URL: https://issues.apache.org/jira/browse/BUILDR-700
>             Project: Buildr
>          Issue Type: Bug
>          Components: Core features
>    Affects Versions: 1.4.17
>         Environment: Mac OS X 10.9.3
> Java 8u5
> ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-darwin13.0.0]
>            Reporter: Trejkaz
>
> I have SwingX in my project specified to download from my own copy of it (purely because
I didn't have a better place at the time.)
> {code:ruby}
> SWINGX                = [ artifact('org.swinglabs.swingx:swingx-action:jar:1.6.6-SNAPSHOT'),
>                           artifact('org.swinglabs.swingx:swingx-common:jar:1.6.6-SNAPSHOT'),
>                           artifact('org.swinglabs.swingx:swingx-core:jar:1.6.6-SNAPSHOT'),
>                           artifact('org.swinglabs.swingx:swingx-painters:jar:1.6.6-SNAPSHOT'),
>                           artifact('org.swinglabs.swingx:swingx-plaf:jar:1.6.6-SNAPSHOT')
]
> download artifact('org.swinglabs.swingx:swingx-action:jar:1.6.6-SNAPSHOT') =>
>   'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-action-1.6.6-SNAPSHOT.jar'
> download artifact('org.swinglabs.swingx:swingx-common:jar:1.6.6-SNAPSHOT') =>
>   'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-common-1.6.6-SNAPSHOT.jar'
> download artifact('org.swinglabs.swingx:swingx-core:jar:1.6.6-SNAPSHOT') =>
>   'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-core-1.6.6-SNAPSHOT.jar'
> download artifact('org.swinglabs.swingx:swingx-painters:jar:1.6.6-SNAPSHOT') =>
>   'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-painters-1.6.6-SNAPSHOT.jar'
> download artifact('org.swinglabs.swingx:swingx-plaf:jar:1.6.6-SNAPSHOT') =>
>   'https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-plaf-1.6.6-SNAPSHOT.jar'
> {code}
> Every day for the past few weeks, when I first run my build for the day, I get an error
like this:
> {noformat}
> Compiling hex:main into /Users/trejkaz/Documents/hex/main/target/classes
> error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar;
zip file is empty
> error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-common/1.6.6-SNAPSHOT/swingx-common-1.6.6-SNAPSHOT.jar;
zip file is empty
> error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-core/1.6.6-SNAPSHOT/swingx-core-1.6.6-SNAPSHOT.jar;
zip file is empty
> error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-painters/1.6.6-SNAPSHOT/swingx-painters-1.6.6-SNAPSHOT.jar;
zip file is empty
> error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-plaf/1.6.6-SNAPSHOT/swingx-plaf-1.6.6-SNAPSHOT.jar;
zip file is empty
> 5 errors
> Buildr aborted!
> {noformat}
> At this point, I look at the files and they are indeed zero size!
> {noformat}
> Rika:hex trejkaz$ ls -la ~/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar
> -rw-------  1 trejkaz  staff  0 28 Jun 22:30 /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar
> {noformat}
> So it seems like buildr is truncating the file daily.
> Deleting the files and re-running buildr puts the correct files back. Any subsequent
builds for that day will continue to work as per usual, then the next day, buildr will truncate
the file again.
> Interestingly, I use the same approach for icu4j-charsets.jar:
> {code:ruby}
> ICU4J                 = [ artifact('com.ibm.icu:icu4j:jar:53.1'),
>                           artifact('com.ibm.icu:icu4j-charsets:jar:53.1') ]
> download artifact('com.ibm.icu:icu4j-charsets:jar:53.1') =>
>   'http://download.icu-project.org/files/icu4j/53.1/icu4j-charset-53_1.jar'
> {code}
> But the issue has *never* occurred for this jar. Fiddling the timestamps on the files
makes for a reliable reproduction for SwingX, though:
> {noformat}
> Rika:hex trejkaz$ buildr
> (this build works)
> Rika:hex trejkaz$ find /Users/trejkaz/.m2/repository/org/swinglabs/swingx  -exec touch
-t 201406270000 {} \;
> Rika:hex trejkaz$ buildr
> (in /Users/trejkaz/Documents/hex, development)
> Building hex
> Compiling hex:main into /Users/trejkaz/Documents/hex/main/target/classes
> DL is deprecated, please use Fiddle
> error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar;
zip file is empty
> error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-common/1.6.6-SNAPSHOT/swingx-common-1.6.6-SNAPSHOT.jar;
zip file is empty
> error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-core/1.6.6-SNAPSHOT/swingx-core-1.6.6-SNAPSHOT.jar;
zip file is empty
> error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-painters/1.6.6-SNAPSHOT/swingx-painters-1.6.6-SNAPSHOT.jar;
zip file is empty
> error: error reading /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-plaf/1.6.6-SNAPSHOT/swingx-plaf-1.6.6-SNAPSHOT.jar;
zip file is empty
> 5 errors
> Buildr aborted!
> RuntimeError : Failed to compile, see errors above
> (See full trace by running task with --trace)
> {noformat}
> And again, with trace turned on, turns up this:
> {noformat}
> ** Invoke /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar
(first_time)
> ** Execute /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar
> Requesting https://github.com/trejkaz/swingx/releases/download/v1.6.6-SNAPSHOT.2014.06.15/swingx-action-1.6.6-SNAPSHOT.jar
> Redirected to https://s3.amazonaws.com/github-cloud/releases/20121830/adc8bb5a-f480-11e3-8ffa-6f15927a60c1.jar?response-content-disposition=attachment%3B%20filename%3Dswingx-action-1.6.6-SNAPSHOT.jar&AWSAccessKeyId=AKIAISTNZFOVBIJMK3TQ&Expires=1403959849&Signature=udzDpEwy97nMKArUVNil7K6JdqY%3D
> Requesting https://s3.amazonaws.com/github-cloud/releases/20121830/adc8bb5a-f480-11e3-8ffa-6f15927a60c1.jar?response-content-disposition=attachment%3B%20filename%3Dswingx-action-1.6.6-SNAPSHOT.jar&AWSAccessKeyId=AKIAISTNZFOVBIJMK3TQ&Expires=1403959849&Signature=udzDpEwy97nMKArUVNil7K6JdqY%3D
> Not modified since last download
> mkdir -p /Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT
> mv /var/folders/xl/b3tjcxt56zb113jzpzyt001w0000gp/T/swingx-action-1.6.6-SNAPSHOT.jar20140628-8988-4ws1ki
/Users/trejkaz/.m2/repository/org/swinglabs/swingx/swingx-action/1.6.6-SNAPSHOT/swingx-action-1.6.6-SNAPSHOT.jar
> {noformat}
> So it looks like when the file has not been modified since the last download, buildr
replaces the local file with a zero-length file which it was presumably using to do an atomic
file download.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message