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 225047

Summary: Dash in project name causes issues in generated code
Product: projects Reporter: mienamoo
Component: MavenAssignee: Milos Kleint <mkleint>
Status: VERIFIED FIXED    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description mienamoo 2013-01-18 06:53:35 UTC
NetBeans IDE 7.3 RC1 (Build 201301102100)
JDK 7u11 64-bit

When creating a new Maven-based Java application, the wizard allows you to enter a dash in the project name. However, this causes trouble in the generated code. The package that was generated is:

    package com.mycompany.m2.;

which doesn't compile.

I would suggest added validation on that field.
Comment 1 Milos Kleint 2013-01-29 13:49:32 UTC
https://hg.netbeans.org/core-main/rev/4e7ba8106e5e
Comment 2 Quality Engineering 2013-01-30 03:40:09 UTC
Integrated into 'main-golden', will be available in build *201301300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/4e7ba8106e5e
User: Milos Kleint <mkleint@netbeans.org>
Log: #225047 more validations on GAV fields, cannot end with dot or dash
Comment 3 mienamoo 2013-01-31 07:35:35 UTC
Verified with build 201301310001. Thanks!