This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 177943 - incorrect sun-*.xml file created for project that targets v3
Summary: incorrect sun-*.xml file created for project that targets v3
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: PC Solaris
: P2 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-01 11:56 UTC by Vince Kraemer
Modified: 2010-02-06 11:35 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vince Kraemer 2009-12-01 11:56:05 UTC
create a web, ejb, app-client or application project that targets v3.

use the File->New File... GlassFish/GlassFish Deployment Descriptor wizard to create the sun-XYZ.xml file in the project.

The file is created, but it's DOCTYPE is for a v2 server.

This may be OK for Java EE 5 projects that target v3 but it is not OK for projects that target Java EE 6... since these projects will not be deployable onto v2.
Comment 1 Vince Kraemer 2009-12-01 23:08:26 UTC
Some notes:

There is code in GlassfishConfiguration.createDefaultSunDD that looks like it can create different default xml files, based on the target for the server... though the target 'version' is a bit course grained...

The code that needs to do something similar is in SunDDWizardIterator.java... that code does not try to determine the project's target server and/or the target j2ee level for the project.

We could...

1. use the target server to determine what level of sun-* dd file we need to create, OR
2. use the spec level to determine which sun-* dd we should create....
   in this case we would choose the lowest level server that supports the spec...

   a j2ee 1.4 app would get an 8.x descriptor, since that means you could deploy the app to any sun server that supports j2ee 1.4.  a java ee 5 app would get a gf v1 dd file.  A java ee 6 app would get a gf v3 descriptor.

OR

3. we could let the user choose the base descriptor that they want to use... and use the target server based choice as the default choice....
Comment 2 Vince Kraemer 2009-12-09 11:40:52 UTC
please get a patch ready for inclusion the first 6.8 patch
Comment 3 Vince Kraemer 2010-02-01 09:25:14 UTC
it is mine now...
Comment 4 Vince Kraemer 2010-02-06 11:35:11 UTC
http://hg.netbeans.org/web-main/rev/8a6c06282372
Comment 5 Vince Kraemer 2010-02-06 11:35:41 UTC
forgot to mark as resolved...