I am sorry. I answered before I got to work and had my poms. Tim is right it is forbidden and here is the code I got from somewhere and used in my poms if it is helpful.
<properties> <bnd.version>3.3.0</bnd.version> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <local.index.policy>REQUIRED</local.index.policy> </properties> <profiles> <profile> <id>RunningInCI</id> <activation> <property> <name>running.in.ci</name> <value>true</value> </property> </activation> <properties> <local.index.policy>FORBIDDEN</local.index.policy> </properties> </profile> <profile> <id>aardvark-release</id> <properties> <local.index.policy>FORBIDDEN</local.index.policy> </properties> </profile> </profiles> <build> <plugins> <plugin> <groupId>biz.aQute.bnd</groupId> <artifactId>bnd-indexer-maven-plugin</artifactId> <version>${bnd.version}</version> <configuration> <localURLs>${local.index.policy}</localURLs> <includeTransitive>true</includeTransitive> </configuration> <executions> <execution> <id>index</id> <goals> <goal>index</goal> </goals> </execution> </executions> </plugin> On Wed, Nov 16, 2016 at 9:03 AM, Tim Ward <tim.w...@paremus.com> wrote: > Hi all, > > The correct configuration property value is FORBIDDEN. Also the plugin is > only able to use the information that it finds from Maven's Aether library, > so it's probable that there's some metadata missing. This can happen > sometimes, particularly for things that were installed locally rather than > being downloaded. > > The easiest workaround for this is to clean the offending bundle from your > local repository cache so that it gets redownloaded. This isn't normally an > issue in CI as you should usually start with a clean local repository to > ensure repeatable builds. > > It's also pretty normal to use local URLs when building/testing locally as > it makes the indexes faster to use, and it works offline. > > I hope this helps, > > Tim > > Sent from my iPhone > > On 16 Nov 2016, at 11:57, Daghan ACAY <daghana...@hotmail.com> wrote: > > Hi david, > > I did DISABLED. However build fails with url cannot be found. even with > REQUIRED i get the following info on console > > [INFO] The Artifact org.osgi:osgi.enroute.websecurity.adapter:jar:2.0.0 > could not be found in any repository, returning the local location > > Cheers > -daghan > > Sent by MailWise <http://www.mail-wise.com/installation/2> – See your > emails as clean, short chats. > > > -------- Original Message -------- > From: David Daniel <david.daniel.1...@gmail.com> > Sent: Wednesday, November 16, 2016 10:46 PM > To: OSGi Developer Mail List <osgi-dev@mail.osgi.org> > Subject: Re: [osgi-dev] Mvn for enroute > > When doing a ci build to get the maven url set the localurl to DISABLED. > When debugging on your local dev box set it to required. > > <configuration> > <localURLs>REQUIRED</localURLs> > </configuration> > > On Wed, Nov 16, 2016 at 5:56 AM, Daghan ACAY <daghana...@hotmail.com> > wrote: > >> Hi Tim, >> >> >> I followed your advice and find a bunch of mvn plugins for bnd here >> >> >> https://github.com/bndtools/bnd/tree/master/maven >> >> >> I have used bnd-indexer-maven-plugin on the example given in the >> tutorial <http://enroute.osgi.org/tutorial_eval/>http://enroute.osgi.o >> rg/tutorial_eval/050-start.html and created index files in all projects. >> All great!!!! >> >> >> Now I have two more question: >> >> >> 1- When I run the indexer plugin I see the following output >> >> >> [INFO] The Artifact org.osgi:osgi.enroute.websecurity.adapter:jar:2.0.0 >> could not be found in any repository, returning the local location >> >> which reflects in the generated index file as >> >> <capability namespace="osgi.content"> >> <attribute name="osgi.content" value="77b38abc362a40e293be9ff >> 4cafba15b0eb73b0af394e697b648bcbb271b6ebe"/> >> * <attribute name="url" >> value="file:/home/daghan/.m2/repository/org/osgi/osgi.enroute.websecurity.adapter/2.0.0/osgi.enroute.websecurity.adapter-2.0.0.jar"/>* >> <attribute name="size" type="Long" value="48218"/> >> <attribute name="mime" value="application/vnd.osgi.bundle"/> >> </capability> >> >> >> I would expect something like >> >> <capability namespace="osgi.content"> >> <attribute name="osgi.content" value="77b38abc362a40e293be9ff >> 4cafba15b0eb73b0af394e697b648bcbb271b6ebe"/> >> * <attribute name="url" >> value="https://mvnrepository.com/artifact/org.osgi/osgi.enroute.websecurity.adapter/2.0.0 >> <https://mvnrepository.com/artifact/org.osgi/osgi.enroute.websecurity.adapter/2.0.0>"/>* >> <attribute name="size" type="Long" value="48218"/> >> <attribute name="mime" value="application/vnd.osgi.bundle"/> >> </capability> >> >> am I doing something wrong? >> >> 2- These index contains the dependencies of the project. I also create >> index file for my own projects. I can do that from >> eclipse->project->Release bundles and the indexes corresponding to my >> projects are created under cnf->release->index.xml along with the jar file >> under the folder with the name of the project. Is there a way to do it with >> mvn plugins? >> >> Thanks for your response in advance >> >> Cheers >> -Daghan >> >> ------------------------------ >> *From:* osgi-dev-boun...@mail.osgi.org <osgi-dev-boun...@mail.osgi.org> >> on behalf of Timothy Ward <tim.w...@paremus.com> >> *Sent:* Monday, November 14, 2016 10:48 AM >> *To:* OSGi Developer Mail List >> *Subject:* Re: [osgi-dev] Mvn for enroute >> >> >> is it possible to use only bndrun and not the pom file? >> >> >> Yes - however in order for the bndrun file to work it needs to have one >> or more repositories to pull bundles from. In the example the repository >> that is used is a “POM repository” i.e. it uses dependencies from a Maven >> POM. Therefore the bndrun can only “see” what’s in the POM! >> >> If you use a different kind of repository then there’s no need to put the >> dependency in the POM file, but then you need to create that other >> repository somehow. The bnd-indexer-maven-plugin may be of interest if you >> want to go in this direction, as might using Gradle and the bnd workspace >> model. >> >> I hope this helps. >> >> Regards, >> >> Tim >> >> >> On 13 Nov 2016, at 07:20, Daghan ACAY <daghana...@hotmail.com> wrote: >> >> Hi, >> >> I am looking at http://enroute.osgi.org/tutorial_eval/400-command and >> under the heading "Adding the Command Bundle to the Runtime" it says to >> add the command bundle both to bndrun file and the pom.xml file. Strictly >> speaking command bundle is not a dependency so it does not need to go pom >> file. So I am looking something like this to be inserted to bndrun file: >> >> osgi.identity;filter:='(&(osgi.identity=osgi.enroute.example >> s.eval.command)(osgi.version>=1.0.0-SNAPSHOT))' >> >> but when I build with mvn install then I get the following error >> >> >> [ERROR] Failed to execute goal >> biz.aQute.bnd:bnd-export-maven-plugin:3.4.0-SNAPSHOT:export >> (default) on project osgi.enroute.examples.eval.bndrun: Unable to >> resolve <<INITIAL>> version=null: missing requirement >> osgi.enroute.examples.eval.command; osgi.version>=1.0.0-SNAPSHOT -> >> [Help 1] >> >> is it possible to use only bndrun and not the pom file? >> >> Cheers >> -Daghan >> >> >> _______________________________________________ >> OSGi Developer Mail List >> 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 >> > > _______________________________________________ > OSGi Developer Mail List > 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 >
_______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev