Main Page

From mvn-wspbuilder-plugin (inactive) Wiki
Jump to: navigation, search



WSP-projects are not included in neither npanday nor any other maven plugin. Thats where the mvn-wspbuilder-plugin comes into play.

What does it do?

To build wsp-Files the plugin registers an ArtifactHandler of type wsp with role-hint wsp and extension wsp. Standart npanday library lifecycle also does not exactly what we need during install and deploy. That is why their lifecycle with role-hint library is overwritten. As a benefit to this the addin-launch also is added to package phase. When its launched, the addin changes the Version numbers in the feature.xml file, fires wspbuilder and registers the artifactHandler and the generated wsp-file to the mavenproject. This last step tells all the other maven plugins like install and deploy which file to handle.


The dll file has to be signed with a snk. Based on this snk there is a receiver id under which the dll is registered to the windows machine. It is important to have the right id in the feature.xml file because sharepoint will not find the right dll if not. There is a feature request to make this a parameter or to generate it but until then, dont forget to manually change the number, whenever you change the key.

The addin will fire the wspbuilder ( executable. Unfortunately this uses the cablib.dll ( which is written in c++ and contains linux-mono-unrunnable native code. this means we need a windows box to build on. If this is exchanged in future releases this project should get switched to fire the exe with mono to make it platform independent. The addin also relies on several npanday-plugins.


The only goal is wsp


Configuring Your wsp Plugin

Since the wsp-plugin executes automatically during package phase, you dont have to put executions unlike other plugins. It requires packaging to be set to library.


To enable wspbuilder to build the wsp-file correctly, projectpath should point to a folder containing the 12hive and also a folder /bin containing the compiled .dll. To achieve that we put this into build in our pom.xml: <directory>bin</directory>.

The plugin does change the Version numbers in the feature.xml file. That is why a correct path is required here.

Project Documentation


As remarked before, the npanday lifecycle "library" is overwritten. The new lifecycle looks like this:

           npanday.plugin:maven-resolver-plugin:resolve ,

Diffs to standart-npanday-lifecycle only are in phase package (now we fire the plugin), install and deploy (we exchanged the npanday plugins with the usual maven plugins as these work fine).