title: Dynamically loading dependency in maven
body: <p>Can we dynamically load dependencies using maven. </p>
  
  <p>For example, lets say we have a web project which needs a specific jar A to run on Glassfish server, while the same project needs additional jar B to run on weblogic in its WEB-INF/lib folder. </p>
  
  <p>Do I need to have the separate pom.xml file for glassfish and weblogic and then run the appropriate pom.xml depending on the server being used?</p>
  
  <p>Or Can I have a single pom.xml with both dependencies i.e. both jar A and jar B specified in it and depending on the parameters passed to pom.xml while running it (like mvn clean package -Dserver=glassfish),  it will load the jar A only?</p>
  
  <p>Is this possible?</p>
  
  <p>What is the most appropriate way of doing this?</p>
  
  <p>Please help.</p>