| using flexible project layout [message #78458] | 
Tue, 01 March 2005 03:39   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: Rafal.Krzewski.caltha.pl 
 
Hello, 
 
after getting M3 to run I started looking at flexible project layout -  
the new feature in M3 that interests me the most. 
 
First a quick question - is there a tutorial that I can look at? There  
are many listed on the page, but looking at the titles none particularly  
relevant to my question ;-) 
 
Here's what I'd like to accomplish: 
I have a web application that runs in "bare" servlet container (not an  
J2EE appserver). It consists of several library jar modules, and a war  
module that uses them. 
 
At this point I am building the jars and the war for deployment using  
maven, and during development I use a bash script that updates the web  
application in a separate directory outside the workspace. 
 
I would like to have the jar files built by eclipse, and updated  
whenever their respective source files change. I would like to have the  
web application automatically updated when the included jar files  
change. This way I could run the application right from the workspace  
during development. 
 
Is this kind of scenario possible with flexible project layout? 
Rafal
 |  
 |  
  | 
| Re: using flexible project layout [message #78519 is a reply to message #78458] | 
Tue, 01 March 2005 05:01    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: Rafal.Krzewski.caltha.pl 
 
Rafał Krzewski wrote: 
 
> I would like to have the jar files built by eclipse, and updated  
> whenever their respective source files change. I would like to have the  
> web application automatically updated when the included jar files  
> change. This way I could run the application right from the workspace  
> during development. 
 
After planing with WTP M3 for a while I'm able to answer my own question  
- it's not possible at this point :-( 
 
First, flexible project structure applies only to EAR projects, not WAR  
projects. It seems that it's impossible to have the library jar files  
build from projects in the workspace included in the WEB-INF/lib  
directory of the web application that uses them. 
 
Second, the jar/war/ear files are not created/updated on the fly. You  
need to use export wizard to create the actual file. 
 
It seems that my proposed use case is orthogonal to what's present in  
WTP. I have a sketch of implemntation in my mind, and I'm curious if the  
WTP developers would be interested in using it, or if anyone present on  
the newsgroup knows of an implementation of a similar scheme. 
 
I would like to propose creation of two builders that could be enabled  
for any project through project properties tab. 
 
1) archive synchronization builder. 
 
Let the user define a directory/directories/inclusion+exclusion patterns  
  that select files to be archived (like in jar export wizard) 
 
Let the user defined a location of an zip archive (jar,war,or ear in  
practice). The location should be chosen relative to project (or  
optionally workspace) root, so that the builder configuration could be  
shared across the team. 
 
Whenever a file or directory is added, removed or modified in the  
configured archive sources, the zip archive would be updated  
apropriately. Of course it would be created quietly should it not exist. 
 
This builder would be used for keeping jar and optionally war files up  
to date during development. 
 
2) file copying builder 
 
Let the user define one or more of (source inclusion/exclusion patterns;  
  destination path) pairs. 
All paths should be workspace relative. Whenever files or directories  
are created/deleted/modified in the source set of a pair as above, the  
modifications are carried over to the destination set. 
 
This builder would be used for keeping jar files in webapp's WEB-INF/lib  
directory in sync with the jar files generated by the library projects,  
although much more uses of this builder are possible. 
 
I believe that this is solution that addresses the needs of many web  
application developers in a simple and straightforward way. 
 
Are there any Eclipse extensions out there that implement this kind of a  
setup? Is there a chance that such builders will be included in a future  
release of WTP? Or is learning eclipse plugin development myself the  
only option of getting this done ;-) 
 
regards, 
Rafał
 |  
 |  
  | 
| Re: using flexible project layout [message #78894 is a reply to message #78519] | 
Tue, 01 March 2005 23:11    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Rafał Krzewski wrote: 
> Rafał Krzewski wrote: 
>  
>> I would like to have the jar files built by eclipse, and updated  
>> whenever their respective source files change. I would like to have  
>> the web application automatically updated when the included jar files  
>> change. This way I could run the application right from the workspace  
>> during development. 
>  
>  
> After planing with WTP M3 for a while I'm able to answer my own question  
> - it's not possible at this point :-( 
>  
> First, flexible project structure applies only to EAR projects, not WAR  
> projects. It seems that it's impossible to have the library jar files  
> build from projects in the workspace included in the WEB-INF/lib  
> directory of the web application that uses them. 
>  
> Second, the jar/war/ear files are not created/updated on the fly. You  
> need to use export wizard to create the actual file. 
>  
> It seems that my proposed use case is orthogonal to what's present in  
> WTP. I have a sketch of implemntation in my mind, and I'm curious if the  
> WTP developers would be interested in using it, or if anyone present on  
> the newsgroup knows of an implementation of a similar scheme. 
>  
> I would like to propose creation of two builders that could be enabled  
> for any project through project properties tab. 
>  
> 1) archive synchronization builder. 
>  
> Let the user define a directory/directories/inclusion+exclusion patterns  
>  that select files to be archived (like in jar export wizard) 
>  
> Let the user defined a location of an zip archive (jar,war,or ear in  
> practice). The location should be chosen relative to project (or  
> optionally workspace) root, so that the builder configuration could be  
> shared across the team. 
>  
> Whenever a file or directory is added, removed or modified in the  
> configured archive sources, the zip archive would be updated  
> apropriately. Of course it would be created quietly should it not exist. 
>  
> This builder would be used for keeping jar and optionally war files up  
> to date during development. 
>  
> 2) file copying builder 
>  
> Let the user define one or more of (source inclusion/exclusion patterns;  
>  destination path) pairs. 
> All paths should be workspace relative. Whenever files or directories  
> are created/deleted/modified in the source set of a pair as above, the  
> modifications are carried over to the destination set. 
>  
> This builder would be used for keeping jar files in webapp's WEB-INF/lib  
> directory in sync with the jar files generated by the library projects,  
> although much more uses of this builder are possible. 
>  
> I believe that this is solution that addresses the needs of many web  
> application developers in a simple and straightforward way. 
>  
> Are there any Eclipse extensions out there that implement this kind of a  
> setup? Is there a chance that such builders will be included in a future  
> release of WTP? Or is learning eclipse plugin development myself the  
> only option of getting this done ;-) 
>  
> regards, 
> Rafał 
 
Rafal, 
 
The flexible project structure feature that is released in M3 has been  
enabled on web modules only and is experimental. In M4 it will enabled  
on other J2EE modules i.e Enterprise Applications, EJB Modules etc. 
We have a design in place for the Flexible Project strucutre and any  
input you have on this design is appreciated. I suggest you reivew the  
design documents in the links below and provide your input. 
 
 http://www.eclipse.org/webtools/jst/components/j2ee/proposal s/FlexibleProjectConcepts.html 
 
 http://www.eclipse.org/webtools/jst/components/j2ee/proposal s/FlexibleProjectStructureDesignOverview.html 
 
- Vijay
 |  
 |  
  | 
 | 
Powered by 
FUDForum. Page generated in 0.04047 seconds