So now following instructions found here:
http://buildr.apache.org/artifacts.html

  MYBATIS_SPRING = 'org.mybatis:mybatis-spring:jar:1.0.0-RC3'

  mybatis_spring_url =
'http://mybatis.googlecode.com/files/mybatis-spring-1.0.0-RC3-bundle.zip'
  mybatis_spring_zip =
download('target/mybatis-spring-bundle.zip'=>mybatis_spring_url)
  mybatis_spring_jar =
file('target/mybatis-spring-bundle/mybatis-spring-1.0.0-RC3.jar'=>unzip('target'=>mybatis_spring_zip))

  mybatis_spring_artifact = artifact(MYBATIS_SPRING).from(mybatis_spring_jar)

For some reason, the unzip portion isn't firing. It download the ZIP
file, apparently skips the unzip. and fails on the JAR file not being
found.

Any help would be greatly appreciated.

-Rob

On Thu, Dec 9, 2010 at 7:38 PM, Rob van Oostrum <[email protected]> wrote:
> From here: http://buildr.apache.org/quick_start.html#dependencies
>
> "Almost magically, we can instruct Buildr to get the DBPool artifact
> from this URL. Buildr will treat this download just like any other
> artifact, retrieving it when requried by the compile task. However,
> unlike a normal Maven artifact, Buildr will do some extra processing
> once the download is complete. It will actually dig into the
> downloaded archive, detect and extract the JAR file, installing it
> into the local repository just like any other artifact:
>
> DBPOOL = 'net.snaq:dbpool:jar:4.8.3'
> download artifact(DBPOOL) => 
> 'http://www.snaq.net/java/DBPool/DBPool_v4.8.3.zip'
>
> define 'killer-app' do
>  project.version '0.1.0'
>  compile.with DBPool
>  package :jar
> end"
>
> Is that not accurate? The documented behaviour is that Buildr is smart
> enough to know that I'm looking for a JAR artifact, but downloading a
> ZIP file, and so the JAR file must be somewhere inside the ZIP file.
> If that is still correct, this functionality appears to be broken.
>
> - Rob
>
> On Thu, Dec 9, 2010 at 5:50 PM, Antoine Toulme <[email protected]> 
> wrote:
>>
>> You downloaded a web resource and forced the extension by using jar in the 
>> artifact definition.
>>
>> You didn't ask Buildr to unzip it. That is done with a different set of 
>> instructions (see unzip).
>>
>> Antoine
>>
>>
>> On Dec 10, 2010, at 5:56 AM, Rob van Oostrum wrote:
>>
>> > Following the Quick Start doc, I added the following dependency to my
>> > project:
>> >
>> > MYBATIS_SPRING = 'org.mybatis:mybatis-spring:jar:1.0.0-RC3'
>> > download artifact(MYBATIS_SPRING) => '
>> > http://mybatis.googlecode.com/files/mybatis-spring-1.0.0-RC3-bundle.zip'
>> >
>> > The zip file contains the JAR file I'm really interested in:
>> > mybatis-spring-1.0.0-RC3.jar
>> >
>> > My problem is when I use MYBATIS_SPRING as a compile dependency, buildr
>> > downloads the ZIP file and renames it to .jar rather than unpacking it and
>> > using the JAR file like the documentation suggests it should:
>> >
>> > compile.with COMMONS_LOGGING, MYBATIS_SPRING
>> >
>> > ** Execute
>> > /Users/rob/.m2/repository/org/mybatis/mybatis-spring/1.0.0-RC3/mybatis-spring-1.0.0-RC3.jar
>> > Requesting
>> > http://mybatis.googlecode.com/files/mybatis-spring-1.0.0-RC3-bundle.zip
>> > Downloading
>> > http://mybatis.googlecode.com/files/mybatis-spring-1.0.0-RC3-bundle.zip
>> > /Library/Ruby/Gems/1.8/gems/highline-1.5.1/lib/highline/system_extensions.rb:188:
>> > warning: Insecure world writable dir /Users/rob/tools/maven/bin in PATH,
>> > mode 040777
>> > mybatis-spring-1.0.0-RC3-bundle.zip: 100%
>> > |...............................................................................................................................|
>> >   3.1MB/3.1MB Time: 00:00:03
>> > mkdir -p /Users/rob/.m2/repository/org/mybatis/mybatis-spring/1.0.0-RC3
>> > mv
>> > /var/folders/Sv/SvE0dCbIF+GyXqj5nB3zLU+++TI/-Tmp-/mybatis-spring-1.0.0-RC3.jar20101209-12400-fw4rwz-0
>> > /Users/rob/.m2/repository/org/mybatis/mybatis-spring/1.0.0-RC3/mybatis-spring-1.0.0-RC3.jar
>> >
>> > rob$ jar tvf
>> > ~/.m2/repository/org/mybatis/mybatis-spring/1.0.0-RC3/mybatis-spring-1.0.0-RC3.jar
>> >
>> >    0 Mon Nov 22 19:02:02 EST 2010 mybatis-spring-1.0.0-RC3/
>> >    0 Mon Nov 22 19:02:02 EST 2010 mybatis-spring-1.0.0-RC3/lib/
>> > 627106 Thu Nov 18 20:18:14 EST 2010
>> > mybatis-spring-1.0.0-RC3/lib/mybatis-3.0.3.jar
>> > 382442 Thu Oct 21 21:35:58 EDT 2010
>> > mybatis-spring-1.0.0-RC3/lib/spring-core-3.0.5.RELEASE.jar
>> > 60686 Thu Apr 16 15:01:52 EDT 2009
>> > mybatis-spring-1.0.0-RC3/lib/commons-logging-1.1.1.jar
>> > 231922 Thu Oct 21 21:35:32 EDT 2010
>> > mybatis-spring-1.0.0-RC3/lib/spring-tx-3.0.5.RELEASE.jar
>> > 555410 Thu Oct 21 21:36:06 EDT 2010
>> > mybatis-spring-1.0.0-RC3/lib/spring-beans-3.0.5.RELEASE.jar
>> > 668861 Thu Oct 21 21:36:04 EDT 2010
>> > mybatis-spring-1.0.0-RC3/lib/spring-context-3.0.5.RELEASE.jar
>> > 169752 Thu Oct 21 21:36:02 EDT 2010
>> > mybatis-spring-1.0.0-RC3/lib/spring-expression-3.0.5.RELEASE.jar
>> > 53082 Thu Oct 21 21:36:02 EDT 2010
>> > mybatis-spring-1.0.0-RC3/lib/spring-asm-3.0.5.RELEASE.jar
>> > 385712 Thu Oct 21 21:35:58 EDT 2010
>> > mybatis-spring-1.0.0-RC3/lib/spring-jdbc-3.0.5.RELEASE.jar
>> > 321190 Thu Oct 21 21:35:54 EDT 2010
>> > mybatis-spring-1.0.0-RC3/lib/spring-aop-3.0.5.RELEASE.jar
>> > 4467 Fri Jan 29 21:19:58 EST 2010
>> > mybatis-spring-1.0.0-RC3/lib/aopalliance-1.0.jar
>> > * 31937 Mon Nov 22 18:59:46 EST 2010
>> > mybatis-spring-1.0.0-RC3/mybatis-spring-1.0.0-RC3.jar*
>> > 99344 Mon Nov 22 18:59:50 EST 2010
>> > mybatis-spring-1.0.0-RC3/mybatis-spring-1.0.0-RC3-javadoc.jar
>> > 30499 Mon Nov 22 18:59:46 EST 2010
>> > mybatis-spring-1.0.0-RC3/mybatis-spring-1.0.0-RC3-sources.jar
>> > 44469 Mon Nov 22 19:01:58 EST 2010
>> > mybatis-spring-1.0.0-RC3/mybatis-spring-1.0.0-RC3-reference.pdf
>> > 11358 Mon Nov 22 18:59:36 EST 2010 mybatis-spring-1.0.0-RC3/LICENSE
>> > 1429 Mon Nov 22 18:59:36 EST 2010 mybatis-spring-1.0.0-RC3/NOTICE
>> >
>> >
>> > Am I missing something here?
>> >
>> > I'm using Buildr 1.4.4 on Mac OS FWIW.
>> >
>> > Thanks
>> > Rob
>>
>

Reply via email to