Hi Karthik,

I'm also integrating Maven2 into our WSAD projects and I've hit the same
problem as you. The root cause is that the WebContent folder already has the
dependencies in the WEB-INF/lib folder. So when it is copied into place, all
the libraries come with it.

WSAD treats WebContent as a src directory *and* a target directory so that
the embedded test environment will work. Its a pain in the backside to work
around, and I've had to write a small plugin to sync up the maven
dependencies into WEB-INF/lib as an additional step after running the
eclipse plugin.

The solution is to add an excludes section in your war plugin config. You'll
probably end up with something like this:
<plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
                <warSourceDirectory>WebContent</warSourceDirectory>
                <excludes>**/WEB-INF/lib/*</excludes>
        </configuration>
</plugin>

Note that the <excludes> tag currently only allows a single entry, so you
can't add '**/WEB-INF/classes/*' as well. This probably means that you'll
get your test classes copied across, unless you've configured WSAD away from
its default 'single output location'.

Hope this helps.
Pat
--
View this message in context: 
http://www.nabble.com/-m2---WAR-file-generation-t778773.html#a3861722
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to