Continuous Integration on SAP using Subversion, Maven, Hudson, Nexus and Sonar
When our team first began Java development on the SAP NetWeaver platform, we decided that we should start out using the tools that SAP provide for this purpose. The logic behind this decision was that SAP was best positioned to provide suitable development tools for their own platform. Even though this is fairly sound logic, we’ve been quite disappointed with the tools provided by SAP. NetWeaver Developer Studio (NWDS) falls short of the expectations of most developers, despite being built upon the ubiquitous Eclipse IDE, and NetWeaver Developer Infrastructure (NWDI) over-complicates the task of managing source code and builds. Both are poorly documented, and there’s little assistance on the web for either. I’m hoping that this series of posts will help other teams that want to move away from the development tools provided by SAP to the more established products that are more widely accepted.
I will write a proper evaluation of these tools at a later stage, as I feel it needs a post of its own. For now, I want to focus on what we’ve done to simplify and automate our development environment. There is a massive amount of information I can share from our experiences, so I’m going to spread this over a number of posts to make sure I do it justice. Each post will dive a little deeper into a particular part of our environment, showing what we discovered in the process of getting to where we are now. The basic steps are outlined below to give you an idea of what’s to come… but expect more detail later.
Firstly, I’ve configured a multi-module Maven project to bring some order to our Flex & Java projects. This has greatly simplified the structure of our projects and has brought consistency across all codebases, which is very useful when team members move between projects or new members join the team.
Having configured Maven for project management, the next step was to configure Nexus as our local artifact repository. Given that we work in the SAP environment, I needed to upload the relevant JAR’s from the SAP DC model into our local Nexus 3rd Party repository, and then configure our Maven project dependencies accordingly. Once those steps were complete, the upgrade of our developer workstations could be done – and everyone had the joy of uninstalling NWDS in favour of a plain Eclipse installation (with some cool plugins of course).
Having looked at a few different continuous integration systems, I found that Hudson seemed to be a good option to try out. So I installed Hudson and configured our projects for automatic builds based on Subversion check-ins.
Then I wanted to automate deployment to NetWeaver. To do this, I wrote a SAP NetWeaver Deployment Plugin for Maven. This is still in a very early stage of development, but has enough features implemented for what we need right now. This will undoubtedly be extended in time, and will definitely become one of my pet projects.
So now we have a single code repository for all our Flex and Java code – Subversion. We also have a consistent project structure using Maven, and a central artifact repository using Nexus. Hudson builds our code automatically and then deploys the packaged product to our local Nexus repository and SAP development systems, all ready to be tested.
So that’s all great for continuous integration… but what about quality? We’re in the process of getting automated tests up & running, but in the meantime I’ve configured Sonar to do some code analysis. This is a particularly impressive product, and definitely something I’ll be researching into more over the coming weeks & months.
These are all incredible tools, and each deserves their own post… so that’s what I intend on doing. Watch this space for future posts on how I’ve set it up, and what benefits we’re gaining from the new environment.
Are you developing in Java on the SAP platform? I’d be interested to know what tools you’re using too.



Hi Stuart,
Great blog. Love it. Well structured and easy to comprehend. Although I cannot help much with the content, I look forward to more blogs from your hand!
Thanks!
I use Maven for SAP project builds, because NWDI does not deliver the level of tool quality maven does. Maven is just cool and elegant.
I use “mvn site” and lots of reporting plugins for code quality and reporting, and documentation…
I found this blog while looking for a Maven deploy plugin because the SDM deploy plugin I have based on this http://www.echoping.de/maven-sdm-plugin/index.html does not work for CE
Therefore before I write a new one based on http://help.sap.com/saphelp_nwce711/helpdata/EN/44/f08b76b5190e8fe10000000a11466f/content.htm I thought I would look around the web to see if others are interested in similar ideas.
I read that you have an NWDI plugin and I would be interested in using and developing such a plugin too. At the moment I use Netweaver to build a skeleton project then copy the XML files to my maven build… This is not as elegant as it could be.
Are you developing your “SAP NetWeaver Deployment Plugin for Maven” under and open source license? Are you or others interested in starting a Maven plugins for SAP development?
Thanks,
Doug
Hi Doug
Glad to see someone else is interested in this too! My initial plan was to develop this further and then release it under an open-source license, so it’s definitely something I’m keen on. I need to discuss this with our team internally to decide how best to make it available, but I’m sure this will happen – unfortunately I can’t say for certain when it will be released. Hopefully I find time soon to get this moving again.
Thanks
Stuart
Hi Stuart,
great article. We face here a similar situation and are evaluatng if we should switch from the SAP to OpenSource tools.
I would like to know how big your project was and how long it took for you to set this up and migrate any existing code.
Best Regards,
Uli
Hi Uli
Glad this has been of interest to you. My project wasn’t a very big one, but the concepts apply easily on any scale. In fact, I think that using the better established open source tools would probably be even easier than using the SAP tools as the project grows.
Migrating code was very easy, as we moved very early in the project. So we simply exported our code from SAP and checked it into Subversion. This obviously means you lose your version history, but this wasn’t an issue for us as we moved right at the beginning of the project. I’m guessing there would be a way to get a dump of your revisions from SAP if you wanted to maintain the version history, but I’m not sure about that.
Setup time was perhaps a day. Provided you know how the tools work, they are all fairly simple. All of them interoperate without any fuss, and are a pleasure to configure. The biggest job is getting your code migrated.
I’m currently using SpringSource Tool Suite instead of plain Eclipse, as we’re working on Spring-based projects. We’ve also configured automatic deployment to SAP using a Maven plugin that I built for this purpose. So now our code is automatically deployed to our SAP development server within minutes of being checked in – ready for review and further testing. Very nice!
Hi Stuart,
excellent article. I found your request concerning the ant deploy process on SDN. Did you create the maven plugin you mentioned above? I have also some difficulties with the ant task classpath, could you give some hints on that issue? SAP documentation is not very helpful…
Greets,
Jens
Hi Jens
I just replied to your question on SDN. Hope it is of some help.
I did create the Maven plugin, and we use it regularly as part of our build process. It isn’t something I’ve invested a lot of time in, so could definitely be improved (in fact, I have a few ideas that I’d like to build in but don’t have time for it).
Please take a look at the SDN response and let me know if you’re still stuck. Would be happy to look at it again.
Stuart
[...] Board, which we’ll be using for regular code reviews within our development team. I’ve written previously on the various products we use as part of our continuous integration system, and Review Board has [...]
Hello Stuart,
Your SAP NetWeaver Deployment Plugin for Maven is exactly what I am looking for.
Did you make it available or did the idea just fade away?
When I test deployment on tomcat using tomcat-maven-plugin,
all I need to do is
mvn tomcat:redeploy
I am looking for something like this for NetWeaver.
Even your incomplete sources would be help to me.
Petr
Hi Petr
I’ve responded directly to you on this. Please let me know if I can be of any further help.
[...] with Ant September 23, 2010 Stuart Gunter Leave a comment Go to comments A few months ago, I wrote about our continuous integration system and how I’d hooked everything up to automate as much as possible. One of the key components [...]
Hi,
Can you please share the SAP NetWeaver Deployment Plugin for Maven with us? We are using Web Dyn Pro and we need to automate the deployment process. Also, it would be great if you could let us know what folders should we actually store in subversion, as Netweaver generates lots of autogenerated folders while compilation and deployment process.