Merge 2 folder at publish time [message #169456] |
Tue, 16 May 2006 15:05  |
Eclipse User |
|
|
|
Hi all
I have a full webapp in a folder called "base-webapp" inside my eclipse
project. This webapp is a stable product and i don't intend to change it.
Besides this, i have a folder called "test-personalization", which
contains new files and configuration that i want to add to the base
product.
What i want to achieve is that when the Eclipse Project is published, it
first copies all files from "base-webapp" folder and then
"test-personalization". If there is any file with the same name, it should
be overwritten. Personalization has priority over "base-webapp".
I have looked how to do this, and the closer i have been is by editing
/settings/.component and write there:
<wb-resource deploy-path="/" source-path="/base-webapp"/>
<wb-resource deploy-path="/" source-path="/test-personalization"/>
But sometimes is published correctly and other ones don't. I don't know
why.
Is there any way i can do this?
Thank you very much :-)
|
|
|
|
|
|
|
Re: Merge 2 folder at publish time [message #169763 is a reply to message #169754] |
Mon, 22 May 2006 09:52   |
Eclipse User |
|
|
|
Hi Marcos,
To request an enhancement, just report it like a bug but set the
Severity field to "enhancement". I wouldn't hold your breath as I doubt
it's very practical to implement.
You may have better luck trying to deal with the OutOfMemoryException.
It suggests that running the Ant build is leaking memory, either by Ant
or Ecplise's support for Ant. Are you running with a "Separate JRE" or
the one running the workspace?
If you can share an Ant script (simpler the better) and it's
configuration so that I can duplicate the problem, I'll try to take a
look. I have other uses for Ant scripts and it would be good to try to
address such leaks, if possible.
Cheers,
Larry
Marcos Lopez wrote:
> Hello
>
> What i was doing until now is to use an ant script that does the
> merging. I have configured it in the Builders Option of the Project
> properties to be executed every time the files are saved, and after then
> to refresh the whole project so that the publish can be done.
>
> The problem with this solution is that lasts more or less 5 seconds in
> publishing, and when i use it during 1 or 2 hours, Eclipse starts giving
> error messages of OutOfMemoryException.
>
> Is there a way that this ant task can be executed in a more efficient
> way? In case it can't be done, i would like to report the enhancement
> request that you have told me about. Where can i do this?
>
> Thank you very much!!!
>
|
|
|
|
Re: Merge 2 folder at publish time [message #169983 is a reply to message #169952] |
Tue, 23 May 2006 17:45  |
Eclipse User |
|
|
|
You might try running with "Separate JRE" instead of "same JRE as the
workspace". It should get rid of the OutOfMemoryException. If
necessary pass in some System properties derived from Eclipse variables
to keep the script working with this change.
For publishing there is only one level, which is full synchronization.
There is no "additions only" mode.
With your approach of multiple web content folders, the problem seemed
to be with the overwrites. Since you are using Eclipse 3.2, you might
be able to use resource links (which no longer have to be in the root
folder of a project) to pull just what you need into the web content
folders so the conflicts are avoided. I haven't played much with this
Eclipse 3.2 feature, so I don't know if there would be problems using it
in this situation.
Cheers,
Larry
Marcos Lopez wrote:
> Hello again
>
> the ant task i am using to do the merge is something like:
>
> <target name="update-personalization">
> <copy todir="../pers-deploy">
> <fileset dir="../test-personalization" />
> </copy> </target>
>
> "pers-deploy" is the folder which i use to publish the final Web
> Content. Initially i make a copy of the base-webapp and every time a
> file is saved in the test-personalization folder this task is executed.
>
> The Builder configuration i have made is the following (I don't paste
> the builder.launch file because it's quite long and i haven't changed
> many things from the default configuration):
>
> - Refresh resources upon completion -> The project containing the
> selected resource
>
> - Targets -> this task is executed with the "Auto Build"
>
> - Run in the same JRE as the workspace
>
> - The rest of the options has default values.
>
>
> Is there any way of publishing without synchronizing?. By synchronizing
> i mean that if i delete one file from a folder it doesn't disappear from
> the deployed Web Content. If i could do this, i think that my problem
> would be solved.
>
> Thank you very much :-)
>
|
|
|
Powered by
FUDForum. Page generated in 0.05835 seconds