Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "IAM WTP support"

(WAR overlay)
Line 3: Line 3:
 
== WAR support  ==
 
== WAR support  ==
  
WAR projects are supported as WTP dynamic web modules.  
+
WAR projects are supported as WTP dynamic web modules. Allows IAM users to run Maven WAR projects from Eclipse using WTP support, such as running in a web container using Run As -> Server
  
 
=== WAR overlay  ===
 
=== WAR overlay  ===
  
Use cases:
+
In the last dev build IAM has support for WAR overlays
  
 
* A) war dependency in the repository
 
* A) war dependency in the repository
** run war:exploded and add the target dir to the war sources
+
** IAM will run war:exploded and add the target dir to the war source components, after the current project web source folders
** if resource gets modified -> nothing to do
+
** if the war in the repository gets modified changes will not affect the project
** if dependency war gets modified -> check repo timestamps, rerun war:exploded
+
** if there are pom changes in the current project or dependent projects the exploded war folder will be deleted and war:exploded will be run again
** if pom dependencies change -> recalculate war sources
+
*** this could be optimized to check if the changes really affect the WAR in the WarBuilderDelegate
** if pom changes in dependency -> check repo timestamps, rerun war:exploded
+
 
* B) war dependency in the workspace
 
* B) war dependency in the workspace
** for each dependency
+
** IAM will link the other project webapp source folder from target/iam and add it to the current project web source folders
*** run war:exploded in the other project
+
** if there are pom changes in the current project or dependent projects the links will be recalculated
*** link target dir in the other project from current project target folder
+
** if the dependency also have war dependencies then war:exploded is run for it and the link target is the exploded war folder instead of the source war folder
*** add link to war sources 
+
** if resource gets modified -> nothing to do
+
** if dependency war resources gets modified -> rerun war:exploded in the other project
+
** if pom dependencies change -> recalculate war sources
+
** if pom changes in dependency -> rerun war:exploded
+
  
 +
If there's a mix of A and B the order is
 +
* Workspace dependencies
 +
* Repository dependencies
  
 +
This would have an impact only if there's the same file in both the current project and the dependencies.
 +
 +
The cases where folders are linked from one project to another have no performance penalty.
 +
When war:exploded is needed there's a penalty as Maven needs to be executed.
 +
 +
TODO jars and classes in dependent wars may not be had into account when using Run As a Server in some cases, needs to be tested.
  
 
[[Category:IAM]]
 
[[Category:IAM]]

Revision as of 15:47, 9 December 2009

< To: IAM

WAR support

WAR projects are supported as WTP dynamic web modules. Allows IAM users to run Maven WAR projects from Eclipse using WTP support, such as running in a web container using Run As -> Server

WAR overlay

In the last dev build IAM has support for WAR overlays

  • A) war dependency in the repository
    • IAM will run war:exploded and add the target dir to the war source components, after the current project web source folders
    • if the war in the repository gets modified changes will not affect the project
    • if there are pom changes in the current project or dependent projects the exploded war folder will be deleted and war:exploded will be run again
      • this could be optimized to check if the changes really affect the WAR in the WarBuilderDelegate
  • B) war dependency in the workspace
    • IAM will link the other project webapp source folder from target/iam and add it to the current project web source folders
    • if there are pom changes in the current project or dependent projects the links will be recalculated
    • if the dependency also have war dependencies then war:exploded is run for it and the link target is the exploded war folder instead of the source war folder

If there's a mix of A and B the order is

  • Workspace dependencies
  • Repository dependencies

This would have an impact only if there's the same file in both the current project and the dependencies.

The cases where folders are linked from one project to another have no performance penalty. When war:exploded is needed there's a penalty as Maven needs to be executed.

TODO jars and classes in dependent wars may not be had into account when using Run As a Server in some cases, needs to be tested.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.