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.
[ JDK VERSION : 1.7.0_21 ] * create a new project via "New Project|Maven|Java Application" * open the project properties -> sources ACTUAL: binary format is 1.5 EXPECTED: binary format is 1.6 (or 1.7) FYI: When creating a project via "New Project|Maven|EJB Module" then the binary format is set to 1.7
Created attachment 135548 [details] Shows the project properties and its issue
FYI: in a new plain non-maven-based java application the binary format is also set to 1.7 by default
closely related to issue 208462
(In reply to comment #0) > [ JDK VERSION : 1.7.0_21 ] > > * create a new project via "New Project|Maven|Java Application" > * open the project properties -> sources > > ACTUAL: binary format is 1.5 > EXPECTED: binary format is 1.6 (or 1.7) > > FYI: When creating a project via "New Project|Maven|EJB Module" then the binary > format is set to 1.7 for ejb/war/ear projects the source level is set explicitly because they are closely associated with the given version of javaee. source/target 1.5 are the default values for maven compiler plugin. Any other value requires configuration. Any configuration in the current pom overrides possibly inherited value from the parent. That's an issue often encountered when creating projects from archetypes in multiproject environment.
(In reply to comment #4) > Any configuration in the current pom overrides possibly inherited value from the parent. Good catch.
for 8.0 I've reworked the basic jar (and pom) project templates to be generated by the IDE without an archetype. I suppose adding the source/target level should be easier now
http://hg.netbeans.org/core-main/rev/69765c62fcd4
Integrated into 'main-silver', will be available in build *201312060002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/69765c62fcd4 User: Milos Kleint <mkleint@netbeans.org> Log: #230984 use source level 1.7 by default if nothing is defined by the parent, in that case just inherit
Ok, but how to set the default binary format for each new project ? Each time I create a new project I have 1.7 , I have to set 1.8 manually each time. Find nowhere how to set it, is it hardcoded ?
(In reply to penelop92200 from comment #9) > Ok, but how to set the default binary format for each new project ? > > Each time I create a new project I have 1.7 , I have to set 1.8 manually > each time. Find nowhere how to set it, is it hardcoded ? You can easily change this yourself by creating a custom archetype and using it to create new projects. See the Maven documentation for details on how this.
(In reply to athompson from comment #10) > (In reply to penelop92200 from comment #9) > > Ok, but how to set the default binary format for each new project ? > > > > Each time I create a new project I have 1.7 , I have to set 1.8 manually > > each time. Find nowhere how to set it, is it hardcoded ? > > You can easily change this yourself by creating a custom archetype and using > it to create new projects. See the Maven documentation for details on how > this. Yes, the default is hardcoded. Intentionally there's no UI option in the wizard to set it. You can either ex post change it in the pom or project customizer or in larger project sets, the value should be encoded in the parent pom hierarchy. The generation code will respect that.