| <?xml version="1.0" encoding="UTF-8"?> |
| <?xml-stylesheet type="text/xsl" href="../../../../wtp.xsl"?> |
| <html> |
| <head> |
| <meta name="root" content="../../../../.." /> |
| <title>test plan: Set up Web Library dependencies</title> |
| </head> |
| |
| <body> |
| <h1>jst j2ee</h1> |
| |
| <h2>Introduction</h2> |
| <p>This test plan walks you through the scenario of how to set up web library project jar dependencies in web modules.<br/> |
| <br/> |
| Web Library java projects are basically java projects that are used as utility projects by the web modules after the dependency is added. The web library java jar dependencies can be set on standalone web modules and web modules belonging to an EAR. |
| </p> |
| |
| <h2>Prerequisites</h2> |
| <p>This test plan scenario works on WTP 0.7 M5 or later milestone releases.<br/> |
| </p> |
| |
| <h2>Steps</h2> |
| <p> |
| <ol> |
| <br/> |
| <li> Create a Web module within an EAR and create 2 java projects.<br/> |
| <br/> |
| </li> |
| <li> To navigate to the "Web Libraries" properties page right click on the web module created and select <b>Properties</b>-> <b>J2EE Module Dependencies</b>-> <b>Web Libraries</b> <br/> |
| <br/> |
| <table |
| cellspacing="10" |
| cellpadding="10"> |
| <tr> |
| <td> |
| <img src="images/weblibdependency.jpg" /> |
| </td> |
| </tr> |
| </table> |
| </li> |
| |
| <li> You will notice that the java projects created in step 1 are available to be setup as a web library project dependency. Select both the the java projects and click <b>OK</b> or <b>Apply</b><br/> |
| <br/> |
| <b>Result:</b> The following changes occur on setting the web library dependency on the web module. <br/> |
| |
| The .wtpmodules file gets each java module added as dependent module to the web module<br/> |
| The .classpath file of the web module gets updated with an entry for the selected java modules. <br/> |
| The .project files gets updated with the project dependency.<br/> |
| <br/> |
| </li> |
| <br/> |
| <br/> |
| <li> |
| <b>Add External Jar... </b>You could specify a jar which is outside the workspace using this option. |
| |
| The .wtpmodules gets updated with an entry similar to the following |
| <pre> |
| <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/lib/C:/Foo/Foo.jar>"> |
| <dependency-type>uses</dependency-type> |
| </dependent-module> |
| |
| |
| A classpath entry will be added in the .classpath similar to the following |
| |
| <classpathentry exported="true" kind="lib" path="C:/Foo/Foo.jar"/> |
| </pre> |
| |
| </li> |
| <br/> |
| <br/> |
| |
| <li> |
| <b>Add Variable... </b>You could specify a jar which relative to a ClassPath Variable. |
| |
| The .wtpmodules gets updated with an entry similar to the following |
| <pre> |
| <dependent-module deploy-path="/WEB-INF/lib" handle="module:/classpath/var/JUNIT_HOME/junit.jar"> |
| <dependency-type>uses</dependency-type> |
| </dependent-module> |
| |
| |
| A classpath entry will be added in the .classpath similar to the following |
| <classpathentry kind="var" path="JUNIT_HOME/junit.jar"/> |
| </pre> |
| |
| </li> |
| |
| </ol> |
| </p> |
| </body> |
| </html> |