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 196520 - please drop the suffixes from web/enterprise project names
Summary: please drop the suffixes from web/enterprise project names
Status: VERIFIED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 21:04 UTC by athompson
Modified: 2011-04-12 22:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
diff file for archetype changes (7.12 KB, patch)
2011-03-10 00:06 UTC, athompson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description athompson 2011-03-09 21:04:34 UTC
When you create a Maven Web App project, EJB Module, or Enterprise App, some "helpful" suffixes are automatically added to the project name that the user specified.  For example, if a user creates a web app project named "foo", the actual project name will be "foo Web App".  There are several reasons why the suffix should be removed:
- The standard Maven (non-webapp) project doesn't include a suffix, so it's inconsistent (hence, "bug" status).
- There already is a different icon for each different type of project, so adding the suffix just wastes space.
- Since enterprise app projects already produce sub-projects with suffixs, you wind up with redundant name like "MyEnterpriseApp-ear EAR"
- It makes the POM file more complex than it needs to be, since now "finalName" must be specified in order to produce an artifact with the correct name.
- Since you must resort to using "finalName", it generates an unnecessary point of confusion.  Developers wonder why the artifact is still produced with the wrong name when they change the artifact name in the POM.

And the most important reasons:
- Most of us developers are big boys and girls and we can name our projects all by ourselves.  Thank you, but no help is needed.  Really.
- It's annoying!
Comment 1 Jesse Glick 2011-03-09 21:56:23 UTC
https://svn.codehaus.org/mojo/trunk/mojo/mojo-archetypes/ is the home of these archetypes; patches welcome. Otherwise I will try to guess at the right content.
Comment 2 athompson 2011-03-09 23:07:14 UTC
Ah, I didn't realize that this behavior was in the archetype itself.  Any idea where I can file a bug for them?
Comment 3 athompson 2011-03-09 23:11:00 UTC
What format for the patches?  Standard diff ok?
Comment 4 Jesse Glick 2011-03-09 23:23:41 UTC
(In reply to comment #2)
> Any idea where I can file a bug for them?

Unfortunately there is no JIRA component on Codehaus for archetypes, so just use this issue.

(In reply to comment #3)
> What format for the patches?  Standard diff ok?

Output of 'svn diff' is best. Thanks!
Comment 5 athompson 2011-03-10 00:06:19 UTC
Created attachment 106866 [details]
diff file for archetype changes

This diff covers the EAR, EJB, and WebApp project types.  The remaining projects here (nbm, jboss, osgi, nb platform...) also have stuff added to their names.  I left them alone because it exceeds the scope of this bug and some of their POM files aren't as straightforward.  If you want I can change them as well.

Also, an "Enterprise Application" archetype doesn't seem to be here, probably because it contains sub-projects and so requires additional processing.  On a side note, the standard "Maven Java Application" archetype also does not seem to be here, but that one is fine as far as this bug is concerned.
Comment 6 Jesse Glick 2011-03-10 22:51:11 UTC
(In reply to comment #5)
> The remaining
> projects here (nbm, jboss, osgi, nb platform...) also have stuff added to their
> names.  I left them alone because it exceeds the scope of this bug and some of
> their POM files aren't as straightforward.  If you want I can change them as
> well.

Right, it is out of scope for this issue. I don't even know who maintains the JBoss archetype. I am maintainer for the OSGi and NB-related archetypes.

> an "Enterprise Application" archetype doesn't seem to be here, probably
> because it contains sub-projects and so requires additional processing.

Yes, this has special handling in the IDE. As far as I can tell it simply runs the standard pom-root archetype, the one ear-* archetype, then optionally an ejb-* and/or a webapp-* archetype(s), then adds some deps, then it seems it updates the <name> in the POM project - which I can fix separately: core-main #cb6c93f0ef58

Better would be to do all this from within maven-archetype-plugin, using optional parameters. A bigger change than I am going to do today, though!

> the standard "Maven Java Application" archetype also does not seem
> to be here

It's another project:

http://svn.apache.org/repos/asf/maven/archetypes/trunk/maven-archetype-quickstart
Comment 7 Jesse Glick 2011-03-10 22:55:30 UTC
Committed revision 13737. Cannot really be "fixed" in NB until new versions of the archetypes are released and these are referenced from NB code.
Comment 8 Quality Engineering 2011-03-12 09:44:36 UTC
Integrated into 'main-golden', will be available in build *201103120400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/cb6c93f0ef58
User: Jesse Glick <jglick@netbeans.org>
Log: Part of #196520: avoid gratuitous suffixes in <name>s.
Comment 9 athompson 2011-03-26 17:11:00 UTC
The "enterprise app" type is fixed.  I'm still waiting for the archetypes to be updated...
Comment 10 athompson 2011-03-26 17:12:10 UTC
Is there anyone I should pester to get the archetypes updated?
Comment 11 Jesse Glick 2011-03-28 19:48:05 UTC
Me; I can release archetypes after a three-day Codehaus waiting period. NB was in a code feature for 7.0; trunk is still blocked for new features, but I think updated archetypes could be treated as a bugfix and put into 7.0.1. I will try to get to this - there are other unrelated changes in archetypes that need to be sanity-tested too.
Comment 12 Jesse Glick 2011-03-30 21:17:32 UTC
Need to release these changes:


r13728 | jglick | 2011-03-08 17:56:54 -0500 (Tue, 08 Mar 2011) | 3 lines
   M /trunk/mojo/mojo-archetypes/netbeans-platform-app-archetype/src/main/resources/archetype-resources/pom.xml
Use <dependencyManagement> for JUnit dep.
Cf.: https://netbeans.org/bugzilla/show_bug.cgi?id=191441

r13741 | jglick | 2011-03-11 10:52:52 -0500 (Fri, 11 Mar 2011) | 2 lines
   M /trunk/mojo/mojo-archetypes/nbm-suite-root/src/main/resources/archetype-resources/pom.xml
Use <dependencyManagement> for declaring JUnit in a POM.

r13742 | jglick | 2011-03-11 10:53:15 -0500 (Fri, 11 Mar 2011) | 2 lines
   D /trunk/mojo/mojo-archetypes/netbeans-platform-app-archetype/src/main/resources/archetype-resources/src
Apparently unused dir.

r13743 | jglick | 2011-03-11 10:54:25 -0500 (Fri, 11 Mar 2011) | 2 lines
   M /trunk/mojo/mojo-archetypes/nbm-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
   D /trunk/mojo/mojo-archetypes/nbm-archetype/src/main/resources/archetype-resources/src/test
   D /trunk/mojo/mojo-archetypes/netbeans-platform-app-archetype/src/main/resources/archetype-resources/branding/src/test
Removing empty test dirs.


r13727 | jglick | 2011-03-08 14:19:15 -0500 (Tue, 08 Mar 2011) | 2 lines
   M /trunk/mojo/mojo-archetypes/osgi-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
   D /trunk/mojo/mojo-archetypes/osgi-archetype/src/main/resources/archetype-resources/src/test
No reason to create src/test/java if we have nothing to put there by default.

r13678 | jglick | 2011-03-01 17:18:14 -0500 (Tue, 01 Mar 2011) | 3 lines
   M /trunk/mojo/mojo-archetypes/osgi-archetype/src/main/resources/archetype-resources/pom.xml
Scope of OSGi Core should be provided. Needed for JDK 7 compatibility.
https://netbeans.org/bugzilla/show_bug.cgi?id=195862

r13677 | jglick | 2011-03-01 17:17:30 -0500 (Tue, 01 Mar 2011) | 2 lines
   M /trunk/mojo/mojo-archetypes/osgi-archetype/src/main/resources/archetype-resources/src/main/assembly/felix.xml
Unnecessary exclude; felix.main is provided scope anyway.


r13737 | jglick | 2011-03-10 17:54:05 -0500 (Thu, 10 Mar 2011) | 3 lines
   M /trunk/mojo/mojo-archetypes/ear-j2ee14/src/main/resources/archetype-resources/pom.xml
   M /trunk/mojo/mojo-archetypes/ear-javaee6/src/main/resources/archetype-resources/pom.xml
   M /trunk/mojo/mojo-archetypes/ear-jee5/src/main/resources/archetype-resources/pom.xml
   M /trunk/mojo/mojo-archetypes/ejb-j2ee13/src/main/resources/archetype-resources/pom.xml
   M /trunk/mojo/mojo-archetypes/ejb-j2ee14/src/main/resources/archetype-resources/pom.xml
   M /trunk/mojo/mojo-archetypes/ejb-javaee6/src/main/resources/archetype-resources/pom.xml
   M /trunk/mojo/mojo-archetypes/ejb-jee5/src/main/resources/archetype-resources/pom.xml
   M /trunk/mojo/mojo-archetypes/webapp-j2ee13/src/main/resources/archetype-resources/pom.xml
   M /trunk/mojo/mojo-archetypes/webapp-j2ee14/src/main/resources/archetype-resources/pom.xml
   M /trunk/mojo/mojo-archetypes/webapp-javaee6/src/main/resources/archetype-resources/pom.xml
   M /trunk/mojo/mojo-archetypes/webapp-jee5/src/main/resources/archetype-resources/pom.xml
Do not append extra descriptive labels like "J2EE 1.4 Webapp" to <name>s; it is just annoying.
http://netbeans.org/bugzilla/show_bug.cgi?id=196520

r12949 | jglick | 2010-10-28 11:36:41 -0400 (Thu, 28 Oct 2010) | 2 lines
   M /trunk/mojo/mojo-archetypes/ejb-javaee6/src/main/resources/archetype-resources/pom.xml
   M /trunk/mojo/mojo-archetypes/nbm-suite-root/src/main/resources/archetype-resources/pom.xml
   M /trunk/mojo/mojo-archetypes/netbeans-platform-app-archetype/src/main/resources/archetype-resources/pom.xml
   M /trunk/mojo/mojo-archetypes/webapp-javaee6/src/main/resources/archetype-resources/pom.xml
Update test deps to JUnit 4.8.2.
Comment 14 Jesse Glick 2011-04-11 20:33:33 UTC
core-main #a0b88131a047
Comment 15 Quality Engineering 2011-04-12 08:43:21 UTC
Integrated into 'main-golden', will be available in build *201104120401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a0b88131a047
User: Jesse Glick <jglick@netbeans.org>
Log: #196520: please drop the suffixes from web/enterprise project names
Comment 16 athompson 2011-04-12 22:09:35 UTC
yup