How to integrate maven with cruise control? - maven

Would like to know how to integarate cruise control with maven?
Cruise Control comes with ant integraation by default and in the config.xml has antbootstapper.But dint find any bootstrapper for maven.Would like to know the configuration for maven.

You should be able to configure maven with cruisecontrol without a need for a specific maven bootstrapper.
What you need is a bootstrapper for the version control that you are using. Cruisecontrol provides bootstrappers for most of them. Using this, you can update pom.xml.
Using the maven scm plugin, you can specify the scm configuration in your pom.xml and thereafter run mvn scm:update prior to your build. e.g.
mvn scm:update clean install

Related

Installing maven and the maven eclipse plugin?

I installed maven from here: http://maven.apache.org/download.cgi
and also installed plugin for eclipse from the eclipse marketplace.
This is a really dumb question, but what's the difference between the two?
both are same thing ? or for differnet purposes ?
do we need both on system ?
Maven itself is the software you can use on your machine. It has nothing to do with Eclipse. You can use it from the command line with the mvn command to execute Maven goals on your projects in the file system.
The Maven Eclipse plugin (m2e) integrates Maven with Eclipse so you can comfortably use Maven functionality from inside Eclipse rather than using Maven as an external tool. The plugin just integrates Maven with Eclipse and needs a Maven installation to work. You can configure the plugin to use the Maven installation on your system but there is no need for one. It can use it's own internal "installation" of the actual Maven software. This would be basically the same as you can download and install yourself but it is integrated with the plugin. It therefor can't be used outside Eclipse.

How to use ANT in Cloudbees

I'm trying to move an existing ANT build script (build.xml) into Cloudbees for CI using Jenkins. I setup the project repository using GitHub. The build pulls the repository into the Cloudbees Workspace successfully, but then fails with this message.
Parsing POMs
ERROR: No such file /scratch/jenkins/workspace/project/pom.xml
Perhaps you need to specify the correct POM file path in the project configuration?
I'm not too familiar with this, but from what I can tell (thanks Google) it's because Cloudbees uses Maven instead of ANT. Is there a way that I can change Jenkins to run the ANT build script instead of using Maven? Or a simple way to execute my ANT scripts from Maven? Any help here would be appreciated!
Thanks
You do not need a Maven POM file if your project is Ant-based.
It sounds like you created a Maven job in Jenkins. Delete it and create a free-style job instead, then (as #thekbb says) click Add build step and select Invoke Ant and configure as needed.
ant support is provided by teh ant plugin, I think you get this automatically when installing jenkins. In your jenkins job, add a build step of type 'Invoke Ant' and provide the target.

is it possible to do a Maven build using Build Forge?

Is it possible to do a Maven build using Build Forge? Currently we use Build Forge, ClearCase and ClearQuest with Ant scripts; would like to try a Maven build. Not sure if I can I have no test environment so don't want to mess up any thing and still learning all this stuff too
Maven can be invoked from any build automation framework.
Create a buildforge step that invokes your Maven build as follows:
mvn -s /path/to/maven/settings/files/mysettings.xml clean package
Explicitly selecting the settings file is recommended as this enables you customise the Maven configuration for each project.
Project isolation can be further enhanced by ensuring that each project has it's own local repository location (See the "localRepository" parameter in the settings file documentation)

How to configure Hudson to use Maven for dependecies and run JUnit

In Eclipse I have my "Dynamic Web Project" configured with Maven taking care automatically of all my dependencies (once I specify them in pom.xml). After implementing my Unit Tests I can simply run them all by right-clicking on project and selecting: Run As -> JUnit Test.
How/where can I now configure Hudson so after checkout of all my sources from SVN repository it would automatically invoke(?) Maven (to download all dependencies) and then run all available tests with JUnit?
When you set up a project in Hudson (now Jenkins) in the configuration page you may choose the build phases that Jenkins will run. Then it will run them in the order you specify. There you will have Maven steps where you'll define your goals.
Jenkins itself has to know where to find a Maven installation (or Ant, or any other command that it must run to build). This could be done in the server configuration page.
I think that's the default behavior of Hudson (compiling + running tests).
Did you commit on your svn repository the pom.xml file?

RCP build with maven

How to build and package RCP (Rich client Platform) using Eclipse.
Is it possible to build as a .jar file.
I use Maven Tycho. I find it a lot easier to use than the PDE ant scripts.
The itp04 RCP example is a good project to get started.
We use Maven 3 and the sonatype-tycho plugin to build our Eclipse RCP-based application. It allows a plugin-first approach, i.e. you define the dependencies only in the plugin.xml using the editor of Eclipse. You don't have to care about dependencies in the pom.xml as these are managed by tycho.
There are detailed instructions at Apache Felix maven Bundle page on how to do this.
Alternatively, There are some quickstart maven archetypes you could download based on these instructions and experiment with.
I have wrapped PDE/Build by Maven manually. You can find an example in my answer to my own question:
How to set up Eclipse PDE/Build with Indigo?

Resources