Discussion:
META-INF folder in web project
Paranoid
2006-08-29 14:23:46 UTC
Permalink
hi all!
have little question - developing web application with maven project plugin. and when NetBeans starts it creates new folder META-INF with context.xml file. and JetSpeed that i'm deploying in always
crashes with it. can i protect it from creating this folder?
Wade Chandler
2006-08-29 15:16:44 UTC
Permalink
Post by Paranoid
hi all!
have little question - developing web application
with maven project plugin. and when NetBeans starts
it creates new folder META-INF with context.xml
file. and JetSpeed that i'm deploying in always
crashes with it. can i protect it from creating this
folder?
It may be crashing because of context.xml (that would
be my guess). JetSpeed may (like Tomcat) use
context.xml, and its expected format may be different.
It should not be crashing because of the META-INF
folder, and if it is you should report this to the
JetSpeed folks as a bug because META-INF is part of
the jar standard and a war file is a jar.

If you need to delete or replace context.xml in/from
the build directory you can do this before the war
(jar) file is created. Search the list for how to do
this in different projects and also see the build.xml
and build-impl.xml files comments. You can also see
the different NB specific resource/parent ANT scripts
used in the NB build process for information how to
override things in the build. Once you can run some
ANT script before the jar/war(ing) takes place you can
delete the context.xml file.

I know I've post how to override this in web projects
multiple times, so you should be able to find it, and
it's a copy paste thing for me as I don't use on a
daily basis, so I would have to look it all up again,
but again searching should the lists should find it
for you.

Wade
Paranoid
2006-08-30 18:50:31 UTC
Permalink
Post by Wade Chandler
Post by Paranoid
hi all!
have little question - developing web application
with maven project plugin. and when NetBeans starts
it creates new folder META-INF with context.xml
file. and JetSpeed that i'm deploying in always
crashes with it. can i protect it from creating this
folder?
It may be crashing because of context.xml (that would
be my guess). JetSpeed may (like Tomcat) use
context.xml, and its expected format may be different.
It should not be crashing because of the META-INF
folder, and if it is you should report this to the
JetSpeed folks as a bug because META-INF is part of
the jar standard and a war file is a jar.
If you need to delete or replace context.xml in/from
the build directory you can do this before the war
(jar) file is created. Search the list for how to do
this in different projects and also see the build.xml
and build-impl.xml files comments. You can also see
the different NB specific resource/parent ANT scripts
used in the NB build process for information how to
override things in the build. Once you can run some
ANT script before the jar/war(ing) takes place you can
delete the context.xml file.
I know I've post how to override this in web projects
multiple times, so you should be able to find it, and
it's a copy paste thing for me as I don't use on a
daily basis, so I would have to look it all up again,
but again searching should the lists should find it
for you.
Wade
thanx alot! you are right - its because of context.xml. i'll search for this!
--
best regards,
Paranoid
mkleint
2006-08-29 16:58:38 UTC
Permalink
Post by Paranoid
hi all!
have little question - developing web application with maven project plugin. and when NetBeans starts it creates new folder META-INF with context.xml file. and JetSpeed that i'm deploying in always
crashes with it. can i protect it from creating this folder?
this is because of deployment of the project.
when trying to develop deployment support for maven projects I figured
that the netbeans apis require that these server specific deployment
descriptors exist. Adding them right before doing the deploy didn't do
the trick for reasons unknown to me. the META-INF/context.xml is
specific to the default tomcat server. Other servers generate other
files (for some reason they all appear to be close to empty, but I admit
I'm no j2ee expert)

so at least a temporary workaround can be to go to the project's
customizer and pick a different server than tomcat.

anyone from j2ee team can comment?

Milos
Loading...