Thursday, June 12, 2008

Maven war plugin classpath and play around manifest

http://maven.apache.org/plugins/maven-war-plugin/examples/war-manifest-guide.html

Maven 2 build Lifecycle Phases

There are options for dependencies

1. The "optional" tag is "true"
goes in manifest classpath, but not included in WEB-INF/lib

2. The "scope" tag is "provided"
excluded from manifest classpath, and excluded from WEB-INF/lib

For plugin maven-war-plugin we can add options to exclude all dependencies in manifest.


configuration
archive
manifest
addClasspath false /addClasspath


How can we exclude a list of dependencies from MANIFEST file with some option for plugin configuration?
E.g.:

configuration
excludeProjects
junit, jmock, bcel, ehcache, xercesImpl
/excludeProjects
includeToWarClasspath/
/configuration

No comments: