I removed the offending project from my workspace, and everything is back to 
normal.

Cheers,
=David



> On Mar 28, 2018, at 6:59, David Leangen <o...@leangen.net> wrote:
> 
> I was using 3.3.0.
> 
> 
> Unfortunately, neither the double gradle workaround nor the snapshot 4.0.0 
> version of the gradle plugin solved the problem. :-(
> 
> The only difference between this project and all my others is that this is a 
> pure wrapper project. It produced 3 different wrapper bundles. Works fine in 
> Eclipse and locally with gradle, just not on the build server.
> 
> I tried putting a .gitignore in the bin directory in an attempt to ensure 
> that it is checked out, but that didn’t help, either.
> 
> 
> These are my bnd files:
> 
> **bnd.bnd**
> 
> version.okhttp        = 3.10.0
> version.okio  = 1.14.0
> version.retrofit= 2.4.0
> 
> -releaserepo:         ${repo}
> 
> -includeresource: \
>       {readme.md}
> 
> -buildpath: \
>       biz.aQute.bndlib;packages=*,\
>       osgi.enroute.base.api;version=2.0,\
>       com.squareup.okhttp3:okhttp;version=${version.okhttp};packages=*,\
>       com.squareup.okio:okio;version=${version.okio};packages=*,\
>       com.squareup.retrofit2:retrofit;version=${version.retrofit};packages=*
> 
> -sub:  \
>       *.bnd
> 
> 
> 
> **okio.bnd**
> 
> Bundle-Version:               ${version.okio}
> 
> Bundle-Name:          okio
> Bundle-Description: \
>       Provides an OSGi-ready bundle for okio
> 
> Conditional-Package: \
>       okio*
> 
> Export-Package: \
>       okio;version=${version.okio}
> 
> 
> 
> **okhttp3.bnd**
> Bundle-Version:               ${version.okhttp}
> 
> Bundle-Name:          okhttp3
> Bundle-Description: \
>       Provides an OSGi-ready bundle for okhttp3
> 
> Conditional-Package: \
>       okhttp3*
> 
> # The internal packages are required by ScribeJava for some reason
> Export-Package: \
>       okhttp3*;version=${version.okhttp}
> 
> Import-Package: \
>       android.*;resolution:=optional,\
>       org.conscrypt;resolution:=optional,\
>       !okhttp3.internal*,\
>       *
> 
> 
> **retrofit2.bnd**
> 
> Bundle-Version:               ${version.retrofit}
> 
> Bundle-Name:          retrofit
> Bundle-Description: \
>       Provides an OSGi-ready bundle for retrofit
> 
> Conditional-Package: \
>       retrofit2*
> 
> Export-Package: \
>       retrofit2*;version=${version.retrofit}
> 
> Import-Package: \
>       android.os;resolution:=optional,\
>       *
> 
> 
> 
>> On Mar 28, 2018, at 5:08, David Leangen via osgi-dev <osgi-dev@mail.osgi.org 
>> <mailto:osgi-dev@mail.osgi.org>> wrote:
>> 
>> 
>> Sorry for the noise! For some reason your reply was in my spam box and I did 
>> not see it.
>> 
>> Will reply a bit later. Thanks for addressing this.
>> 
>> 
>> 
>> 
>>> On Mar 28, 2018, at 0:37, BJ Hargrave <hargr...@us.ibm.com 
>>> <mailto:hargr...@us.ibm.com>> wrote:
>>> 
>>> What version of the Bnd Gradle plugin are you using? There is an issue 
>>> where newer versions of Gradle can delete output folders (like bin) after 
>>> Bnd thought it created them. So the builder complained.
>>>  
>>> This has been fixed for 4.0 with 
>>> https://github.com/bndtools/bnd/pull/2256/commits/6f415fd0c3add008d822cdd251af22f6b76cb34c
>>>  
>>> <https://github.com/bndtools/bnd/pull/2256/commits/6f415fd0c3add008d822cdd251af22f6b76cb34c>.
>>>  
>>> You may be able to work around this by having 2 gradle executions on your 
>>> build server. For example `/gradlew --version` followed by `./gradlew 
>>> <normal build tasks>` . The first execution will have the issue of Gradle 
>>> deleting the folders after Bnd created them, but since you don't actually 
>>> run any task, Bnd does not complain. The second execution is not a first 
>>> execution of Gradle on the system, so it won't delete the folders that Bnd 
>>> expects and Bnd should proceed fine.
>>>  
>>> See 
>>> https://github.com/bndtools/bnd/blob/829360a883656b11c3fd2379aae288cdb9b2df11/.travis.yml#L14-L22
>>>  
>>> <https://github.com/bndtools/bnd/blob/829360a883656b11c3fd2379aae288cdb9b2df11/.travis.yml#L14-L22>
>>>  where we run Gradle twice.
>>>  
>>>  
>>> --
>>> 
>>> BJ Hargrave
>>> Senior Technical Staff Member, IBM // office: +1 386 848 1781
>>> OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
>>> hargr...@us.ibm.com <mailto:hargr...@us.ibm.com>
>>>  
>>>  
>>> ----- Original message -----
>>> From: David Leangen via osgi-dev <osgi-dev@mail.osgi.org 
>>> <mailto:osgi-dev@mail.osgi.org>>
>>> Sent by: osgi-dev-boun...@mail.osgi.org 
>>> <mailto:osgi-dev-boun...@mail.osgi.org>
>>> To: OSGi Developer Mail List <osgi-dev@mail.osgi.org 
>>> <mailto:osgi-dev@mail.osgi.org>>
>>> Cc:
>>> Subject: [osgi-dev] Build issue when wrapping a jar
>>> Date: Tue, Mar 27, 2018 6:44 AM
>>>  
>>>  
>>> Hi!
>>>  
>>> I have a bnd project that wraps a few jars. It works just fine in Eclipse 
>>> and for my local gradle build as well.
>>>  
>>> However, when I put it on the build server, it breaks with the following:
>>>  
>>> Warning: Unused Export-Package instructions: [okhttp3*] 
>>> Warning: Unused Import-Package instructions: [android.*] 
>>> Warning: Unused Export-Package instructions: [retrofit2*] 
>>> Error : Unexpected ProjectBuilder init, error 
>>> java.lang.IllegalArgumentException: A Jar can only accept a valid file or 
>>> directory: /opt/atlassian/pipelines/agent/build/squareup.adapter/bin, 
>>> Error : Unexpected ProjectBuilder init, error 
>>> java.lang.IllegalArgumentException: A Jar can only accept a valid file or 
>>> directory: /opt/atlassian/pipelines/agent/build/squareup.adapter/bin, 
>>> Error : Unexpected ProjectBuilder init, error 
>>> java.lang.IllegalArgumentException: A Jar can only accept a valid file or 
>>> directory: /opt/atlassian/pipelines/agent/build/squareup.adapter/bin, 
>>>  
>>>  
>>> Any ideas about why this could happen?
>>>  
>>> Thanks!!
>>> =David
>>>  
>>>  
>>> _______________________________________________
>>> OSGi Developer Mail List
>>> osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org>
>>> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.osgi.org_mailman_listinfo_osgi-2Ddev&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=p-HkGsKTJWWSiO-pz0kKXl8ALzmlqvUGeFfgHUZX8ms&m=M5eUe5MSY46wRQ8laBgXjfaW_tFTE__yP088pdNbE2w&s=XOIoKCQX7rMMk8Tv7uD9imXzewh_7sYx-k_IMgmwlC0&e=
>>>  
>>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.osgi.org_mailman_listinfo_osgi-2Ddev&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=p-HkGsKTJWWSiO-pz0kKXl8ALzmlqvUGeFfgHUZX8ms&m=M5eUe5MSY46wRQ8laBgXjfaW_tFTE__yP088pdNbE2w&s=XOIoKCQX7rMMk8Tv7uD9imXzewh_7sYx-k_IMgmwlC0&e=>
>>>  
>>> 
>> 
>> _______________________________________________
>> OSGi Developer Mail List
>> osgi-dev@mail.osgi.org <mailto:osgi-dev@mail.osgi.org>
>> https://mail.osgi.org/mailman/listinfo/osgi-dev
> 

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to