Board index » jbuilder » Copy XML files to War Directory

Copy XML files to War Directory


2004-12-03 07:49:20 PM
jbuilder15
I'm building a web application and i'm using Hibernate as my persistence
layer.
I've created a class, MyClassVO.java and the correspondent
MyClassVO.hbm.xml, with Hibernate configurations.
After this, i made these steps:
1) Added MyClassVO.hbm.xml to JBuilder Project.
2) Enter in properties for MyClassVO.hbm.xml
3) In the "Resource" tab, set the "Copy" option. With this, the xml file is
now been copied to my Web Application directory (same path as class file).
The problem is that the file was copied only once. After the first rebuild,
i can modify the xml files but when i rebuild the project, xml files are not
beeing updated in war directory. I've already tried to rebuild the
WebApplication, but nothing happened.
Is that a bug?
Regards,
Daniel Wildt
 
 

Re:Copy XML files to War Directory

Daniel Wildt wrote:
Quote
I'm building a web application and i'm using Hibernate as my persistence
layer.
First, which version and edition of JBuilder?
Quote
I've created a class, MyClassVO.java and the correspondent
MyClassVO.hbm.xml, with Hibernate configurations.

After this, i made these steps:

1) Added MyClassVO.hbm.xml to JBuilder Project.
Where is this descriptor file located? In the same folder
as MyClassVO.java? In the "src" folder?
Why did you have to add it if in step 3 below,
JBuilder should be showing this to you? Are
you not using "auto discover packages"? (If
so, why the not?!)
Quote
2) Enter in properties for MyClassVO.hbm.xml
3) In the "Resource" tab, set the "Copy" option. With this, the xml file is
now been copied to my Web Application directory (same path as class file).
"Resource" tab: in which dialog was this? Project Properties?
Or node properties dialog? Try the former, not the latter.
Also, if you do the former, you don't have to physically add
the hbm.xml file to the project -- that is, if you have
properly saved the hbm.xml file to somewhere in the
"src" folder hierarchy.
Also, open the Properties dialog for the Web Module,
On the "Module" page in JB X, and make sure that the
"XML files" entry is selected in the "File types included"
list box.
On the "Content" page in JB 2005, make sure there is an
entry for "XML file" in the "Required filters and files"
list box.
Quote
The problem is that the file was copied only once. After the first rebuild,
i can modify the xml files but when i rebuild the project, xml files are not
beeing updated in war directory. I've already tried to rebuild the
WebApplication, but nothing happened.
Rebuilding the project shouldn't copy the file to
the Web Module, but it will copy the file to the
output path, ordinarily "classes", of the *project*,
where all your project's .class files are placed.
Rebuilding the Web Module will copy the hbm.xml
file(s) to the WEB-INF/classes folder.
--
Paul Furbacher (TeamB)
Save time, search the archives:
www.borland.com/newsgroups/ngsearch.html
Is it in Joi Ellis's Faq-O-Matic?
www.visi.com/~gyles19/fom-serve/cache/1.html
Finally, please send responses to the newsgroup only.
That means, do not send email directly to me.
Thank you.