Configuring a Maven project hosted in Bitbucket
If you don’t have Jenkins installed in your system go to How to install Jenkins
Installing Bitbucket plugins
Manage Jenkins -> Manage Plugins
Go to the Available tab and filter by “Bitbucket”, you will get the entries listed below:
- Bitbucket OAuth Plugin
- Bitbucket Plugin
- Bitbucket Pullrequest Builder Plugin
Not all this plugins are required to build from Bitbucket
Creating new Item for a Maven project hosted in Bitbucket
New Item -> Maven Project
Maven project name:
- Source Code Management
- Repository URL
- Credentials
- Branches to build : */master (or any other specified)
- Build Triggers
- Build whenever a SNAPSHOT dependency is built
- Build when a change is pushed to BitBucket
- Build periodically: @midnight
- Build
- Root POM: pom.xml
- Build Settings:
- E-mail notification: setting the recipient and send emails for different cases, the most common one is for failed builds, so you can know as soon as a build fails.