Provide login information in your settings.xml by specifying a server with username and password for the server that is responsible for the ci-management url.
<server> <id>hudson</id> <username>username</username> <password>password</password> </server>
Provide a ciManagement in your pom.xml :
<ciManagement> <system>hudson</system> <url>http://....</url> </ciManagement>
Note: The login information is selected by the ci-management server's name or by its URL (in that order).
Moreover a hudson job configuration is needed. There are two ways to create and configure one.
Download and than modify as appropriate a jobs config.xml from a hudson server e.g. via
scp www.example.com:/home/tomcatuser/.hudson/jobs/examplejob/config.xml
Use your browser to download and than modify one from e.g.
http://www.example.com/hudson/job/examplejob/config.xml
Copy this file to ${project.home}/src/ci/config.xml and configure the plugin by using this configuration:
<configuration> <ciServerId>hudsonId</ciServerId> <jobConfigFile>${project.home}/src/ci/config.xml</jobConfigFile> <jobName>jobname</jobName> </configuration>
Create a ci-config.xml like this one:
<ci-config> <import-definitions> <import-definition id="default"> <import>config</import> </import-definition> </import-definitions> </ci-config>
To add new hudson jobs on the ci-management system from the projects data, run:
mvn ${project.groupId}:${project.artifactId}:${project.version}:createJobs
Or add the following configuration to your POM:
<pluginManagement> <plugins> <plugin> <groupId>${project.groupId}</groupId> <artifactId>project.artifactId</artifactId> <version>${project.version}</version> </plugin> </plugins> </pluginManagement>
With this configuration you may create new jobs on the hudson server without any arguments (short version):
mvn hudson:createJobs