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 67755 - EJB and WEB archive names
Summary: EJB and WEB archive names
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: PC All
: P4 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-29 00:08 UTC by alanpetersen
Modified: 2008-07-08 08:51 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 alanpetersen 2005-10-29 00:08:39 UTC
I just submitted a bug about ear file names but it was pointed out that the all-lowercase name used by 
NetBeans conforms to J2EE naming conventions:

http://java.sun.com/blueprints/code/namingconventions.html

However, I just checked what NetBeans does for standalone EJB-JAR and WAR modules, and these do 
NOT conform to J2EE naming conventions. The conventions say:

    The module name is used as the EJB archive name. By default, the module name should be
    based on the package name and should be written in all-lowercase ASCII letters. In case of
    conflict, the module name should be a more specific version (including other part of the
    package name):

    EJB archive: <module-name>-ejb.jar

For example, create a new EJB Module with the name EJBTest, and you will notice that the jar file 
generated in the dist directory is EJBTest.jar, but according to conventions it should be ejbtest-ejb.jar

- alan
Comment 1 Andrei Badea 2005-11-16 15:44:54 UTC
Pavle, need your comment on this.
Comment 2 Pavel Buzek 2005-11-16 16:02:08 UTC
It's simple to fix the lower case issue and I would do it for 5.0 if you have
time. Using package name - I would not do this. The problem is you do not know
the package name in advance, you can have several package names, etc. This
convetion is hard to enforce in tool. You can set the project name to package
name or you can edit the jar file name in nbproject/project.properties.
Comment 3 Vince Kraemer 2005-11-16 18:08:23 UTC
we may want to consider prepopulating the package field of the wizards based on
the project name (initially).  Once somebody changes it we would use the human
entered value as the default for the next wizard invocation (in that project)

Another alturnative is to NOT set the jar name when the project is created...

The jar name could be computed at build time (if the user did not set its name
explicitly)...

This is a radical change though... Not recommended as the solution to a P4
bug... that is for sure.
Comment 4 Andrei Badea 2005-11-18 17:24:11 UTC
Vince, sorry, I don't quite get you. Which package field of the wizards do you
mean? I see no "package" field in the New Web/EJB Project wizard? Or you are
suggesting to add one?
Comment 5 Vince Kraemer 2005-11-18 19:07:21 UTC
The package field is in the new ejb or servlet wizard, not the project wizard.

The bp convention basically tells folks to make their jar file be the
'significant' package name...

so if you have a bunch of ejbs defined in a package like

org.netbeans.j2ee.sample.beanie, then the jar file that holds them "should" be
named beanie.jar (or is that beanieEjb.jar??).

Since we create the project first (instead of the beans), supporting the
convention means that a bean created in project Foo should default to being in
package foo, until the user says otherwise.

I agree with Pavel... the bp convention is really hard to follow from a
development tool.  I will tell them that it doesn't seem like a practical thing
to do.
Comment 6 Petr Blaha 2006-03-13 13:47:41 UTC
TM 5.0 -> TBD
Comment 7 pslechta 2008-07-08 08:51:26 UTC
The way how names for archives are used in NetBeans is stable and accepted for a long time without any problems. Closing
this issue as WONTFIX.