maven 3 site building

We recently moved some projects from maven 2 to 3 and ran into some issues on our CI server.  Most issues while a bit time-consuming were easy enough to figure out given the error messages.  One, in particular, took a bit longer to track down for some reason.  Looking back it should have been obvious but google searches were not much help...perhaps it's just because today is Monday.

The error had to do with building the site.  One of the messages, among others, is below:

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-site-plugin:2.2:deploy (default-cli) on project projectname: Unsupported protocol: 'scp'

Now, this is obvious to me but when I encountered it I thought something had changed in the distributionManagement support settings.  As it turns out, the maven-site-plugin needs to have ssh/scp support made available to it.  Adding the dependency to the site plugin will correct this problem.  An example is below.



I hope this helps someone.  This experience reminds me of the ant/maven joke.  In case you have not heard it:

What's the difference between ant and maven?

The guy who created ant apologized.

Happy coding or in this case, configuration management or whatever you want to call it these days.
Post a Comment

Popular posts from this blog

ClassCastException: JAXB

Android and JavaFX

Glassfish Informix JDBC