bndtools / bnd

Bnd/Bndtools. Tooling to build OSGi bundles including Eclipse, Maven, and Gradle plugins.
https://bndtools.org
Other
528 stars 304 forks source link

bnd-indexer-maven-plugin does not build by default #1140

Closed cschneider closed 8 years ago

cschneider commented 8 years ago

When I simply check out the bnd project from github then the bnd-indexer-maven-plugin does not build.

It misses the artifact org.osgi.impl.bundle.repoindex.cli. As the gradle build does not populate the local maven repo this is not ewasy to fix.

Peter pointed me to a repo at https://bndtools.ci.cloudbees.com/job/bnd.master/lastSuccessfulBuild/artifact/maven/target/m2/ so I was finally able to build the project. This is not really good though as I can not build the newest code this way.

So I think the goal should be to have a build on top level of bnd that includes the maven plugin and makes sure the local maven repo is populated. Would the gradle maven integration help for this?

bjhargrave commented 8 years ago

You need to see the commands in the .travis.yml file: https://github.com/bndtools/bnd/blob/master/.travis.yml#L17. First you need to run the gradle build, and then 2 files from that build need to be installed in the maven/target/m2 repo. Then you run the maven build.

Once bnd it updated to enable releasing into an m2 repo, we can simplfy this. But for now, this is how you need to build the maven parts.

cschneider commented 8 years ago

Sounds good. The copy to a special directory also avoids that the fixed version pollutes the local maven repo.

I used the commands from the travis script and it works fine now. It is not obvious though how to do this. If you want I can edit the readme in the maven dir to explain how to do the build and create a pull request for it.

bjhargrave commented 8 years ago

A PR for the maven/README.md file would be fine. I would avoid repeating the commands in the readme text and refer people to the travis script since we will change the commands from time to time.

cschneider commented 8 years ago

I am a bit unsure what to explain. The travis script defines a custom local maven repo. In itself this works but if people want to try the maven plugins they will need them inside their normal local maven repo. So if you agree I would like to copy the commands from the travis script but adapt them for the default local maven repo of the user. I would also add that the user will then need to remove the jars from his local repo once the official release is out as else maven would never load it. Does that make sense?

bjhargrave commented 8 years ago

My point is that a "copy" of the commands in the README will get out of date as we change the travis script. Perhaps the README can tell them how to add the maven/target/m2 repo to their POM if they want to try their local bnd build? This also has the added value of never "polluting" their .m2 repo so you don't need instructions on how to clean it.