Sunday, September 16, 2012

Copy maven dependencies to WEB-INF/lib

Use Case

Configure Dynamic Web Project in Eclipse to copy maven dependencies (jars) to WEB-INF/lib.

Solution

1. Update eclipse.ini, specify -vm option

-vm
C:\Program Files\Java\jdk1.6.0_25\bin\

2. Convert project to MAVEN backed, set packaging to WAR.

3. Configure JRE
Go to Project > Properties > Java Build Path > Libraries. Choose JRE System Library and click 'Edit'. Choose Execution Environment from list of available environments, use the same vm as eclipse.ini has.

4. Configure Deployment Assembly
Go to Project > Properties > Deployment Assembly. Click Add button, then choose Java Build Path Entries. Choose Maven Dependencies from the list and click OK. 


4 comments:

  1. I have read your blog its very attractive and impressive. I like it your blog.

    Java Training in Chennai Core Java Training in Chennai Core Java Training in Chennai

    Java Online Training Java Online Training Core Java 8 Training in Chennai Core java 8 online training JavaEE Training in Chennai Java EE Training in Chennai

    ReplyDelete
  2. Java Training Institutes Java Training Institutes Java EE Training in Chennai Java EE Training in Chennai Java Spring Hibernate Training Institutes in Chennai J2EE Training Institutes in Chennai J2EE Training Institutes in Chennai Core Java Training Institutes in Chennai Core Java Training Institutes in Chennai

    ReplyDelete
  3. Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training Java Online Training

    Hibernate Online Training Hibernate Online Training Spring Online Training Spring Online Training Spring Batch Training Online Spring Batch Training Online

    ReplyDelete
  4. This post is very informative for everybody. I would like to appreciate your work for good accuracy and got informative knowledge from here. Nice effort, very informative, this will
    help me to complete my task. Thanks for share it keep it up.


    Oracle Fusion HCM Training

    ReplyDelete