Deployment of Bndtools Projects in Hudson - deployment

Since I am a big fan of developing OSGi with Bndtools. I want to use it for my new project request as well. But one requirement is that all build processes should be done by Hudson.
My question is how I can achieve that I can use Hudson connected to my Bndtools projects? Maybe someone has a step-by-step tutorial for me :) Furthermore, will Hudson use OBR to resolve the dependencies like Bndtools is doing? How should such a deploy process look like? Btw Bndtools has its one "Integrated Test" project environment where it starts an OSGi environment in the background. Will Hudson understand such kind of tests?
What is best practice to use as much as possible of Bndtools?
Thanks for any help.
Christian

I found a way by just iterate with a custom main build.xml through each projects build.xml. I works and it's nothing special.

Create a new build task in hudson and define there ant build steps rather than introducing and maintaining a new build file.
Create for each project an ant build step.
In my case I created a task named BuildAll which has several ant build steps in it.

Related

How To Configure Ant Plugin For Jenkins

I have marathon Project where I have buid.xml which has many targets all are runned with the help of ant tool. but in the jenkins I need to select a target which I only need to build and test. I need to know how to achieve this using parameterized and invoke Ant ???
Can any one help to me !!
Here is another question which deals with sending parameters to Ant builds.

Gradle: Ant-wards compatible?

I've had my eye on Gradle for a while now and am 99% convinced that I want to switch my builds over from Ant to it. However, before I invest this time, I need to be 100% sure that Gradle can do everything my Ant/Ivy builds already do (I can't lose any functionality):
Run code coverage tasks via Cobertura/JaCoCo
Run some Python scripts
Checkout/commit to a SVN repo
Run AnalytiX CodePro Ant tasks
Run pure Ant commands
Define my own tasks
I'm 99% sure about Python tasks as well as defining my own, but as for the rest I can't find any documentation on those sites that show they have Gradle tasks defined. If I can do all these thing I am bought and sold, otherwise I'm going to hold off until Gradle matures a little more. Thanks in advance!
You can use standard and custom Ant tasks in your Gradle build the way you are used to in Ant itself. Additionally, you can import existing Ant scripts. Targets of the imported Ant script get treated as first-class citizens so you can use them like any other Gradle task. As you can see you don't have to fully migrate your existing code to Gradle right away.
It's as simple as this:
ant.importBuild 'build.xml'
Gradle can call both built-in as well as custom ant-tasks, you'll be able to do all you need by relying on your old code wherever no other solution is available.

Set up an Eclipse Dynamic Web Project referencing another project

I've got a simple Dynamic Web project set up in Eclipse 3.6 Helios, but am having trouble getting it to make use of the code in another project that I've got.
I've added a reference to my other project to the build path of my web project, and I've got no problems in terms of compiling, only in terms of deploying and testing the result. The built web application doesn't have a jar in the WEB-INF/lib directory, so fair enough it can't find the code. The question is how I set this up. I've looked through the help that I can find and googled a bit but can't find anything obvious that helps out.
How do I set up my web project so that on deploying it it magically has the code from my dependent project inside it?
Thanks.
Note: Ideally I'd like a solution that doesn't involve setting up some kind of build tool. The web project deploys itself without recourse to any build tool (or at least none visible to end user), so was rather hoping that a references project could be integrated into that easily.
What goes in the deployment is determined not by the build path but by the Deployment Assembly entry in Preferences for the dynamic web project.
Use some build tool like ANT or Ivy or Maven that, on build, copies all the dependencies to WEB-INF/lib
Using a build tool is a good practice to automate build, test and deployment. You may also be interested in plug-ins like Maven Reactor.

Create single jar from many eclipse projects

I'm doing the build automation for a java app with ant. This is a client-server app which has many projects in eclipse. I would like to create a jar file for the client and one for the server, but since the class dependencies are all over the projects (in eclipse)... I had the idea to use a tool to automate the search for dependencies. I've been looking at GenJar witch is almost all I need but it's not been updated in a while. So I would like to know if there are any other tools like this one, maybe Maven?
You may also try FatJar
It kind of sounds like what you really want is a WAR file.
Personally I would go with Ant + Apache Ivy. Each project has its own build.xml file and publishes to a central Ivy repository. Other projects will simply download these dependencies as needed.
The advantage of having an Ant based build process is that you can very easily automate it and use a continuous server to build the entire product after each check-in.

Building Eclipse plugins and features on the command line

I have a bunch of Eclipse plugins and features, which I would like to build as part of a nightly (headless) build. I've managed to do this using a complicated setup involving manually specifying paths to Eclipse plugin jars, copying customTargets.xml, etc.
Is there really no simpler solution? Isn't there a way to just point out my Update Site's site.xml and say "build"; i.e. the equivalent of clicking "Build All" in the Update Site project?
Given that all the answers to this question are all 3-5 years old, I figure an update would be useful to others.
For those who want to add the building of Eclipse plugins to the CI process, I recommend they check out the Eclipse Tycho project. This is essentially a Maven plugin that allows you you to wrap eclipse projects within Maven project. With this we use Atlassian Bamboo to build our Eclipse plugin. This also allows us to use the Maven jarsigner plugin to sign our plugin files.
I've just been fighting with this problem myself. Are you using the productBuild script? Maybe putting your features into a product would help you out.
I am doing a headless build on a product configuration. The only script that I customized was to add some ant tasks to customTargets.xml to get my sources from SVN and to do a little cleanup on JNLP manifests after the build as I am using WebStart.
Then you only need to invoke antRunner on the out of the box productBuild.xml in the scripts/productBuild directory (in the pde-build plugin).
Check out Ant4Eclipse. I've used it to parse Eclipse's .classpath/.project files to determine project dependencies and classpaths. In combination with Groovy Ant Task, I have automatically built multiple projects in Ant using the Eclipse project files for build information.
A buildPlugin task exists, but I have not personally used it.
We are currently using PDE to automatically build features and our complete product. It works quite well. Make sure you use the right script for product build or feature build.
Eclipse Help on using PDE
EDIT: We've now migrated to Buckminster, which has an excellent command line interface.
You might look into buckminster and maven. There is a learning curve for sure, but they seem to do their jobs well.
We are using headlesseclipse, which can be found on Google Code:
http://code.google.com/p/headlesseclipse/
It works quite well, and can easily automate command-line building of plugins and features. However, I have not yet found a way to automate building of the update site via the command line.