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> 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 > > > ----- Original message ----- > From: David Leangen via osgi-dev <osgi-dev@mail.osgi.org> > Sent by: osgi-dev-boun...@mail.osgi.org > To: OSGi Developer Mail List <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 > 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 https://mail.osgi.org/mailman/listinfo/osgi-dev