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 185376 - Maven project does not support JDK 7
Summary: Maven project does not support JDK 7
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Assignee: David Simonek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-03 17:12 UTC by ecastro
Modified: 2010-05-19 06:10 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
proposed patch to add 1.7 to the source levels list in Maven project properties (698 bytes, patch)
2010-05-12 20:24 UTC, dlipin
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ecastro 2010-05-03 17:12:51 UTC
Cannot set "Source/Binary format" to 1.7 in Sources category of Project Properties from a Maven project.

It prevents using the format function (Alt+Shift F) correctly, especially on diamond parameterized type (e.g. new ArrayList<>()).

Note/Context: 
Java platform is correctly set to a recent JDK 1.7
The Maven pom.xml is correctly set to 1.7

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>

I reported it as defect as it works well with standard NetBeans projects.

Tested on 6.9 Beta.
Comment 1 dlipin 2010-05-12 20:24:57 UTC
Created attachment 98894 [details]
proposed patch to add 1.7 to the source levels list in Maven project properties
Comment 2 David Simonek 2010-05-13 14:47:59 UTC
Changeset: ae10f755e75e
Author:    Dafe Simonek <dsimonek@netbeans.org>
Date:      2010-05-13 16:47
Message:   #185376: Allow Java 7 in customizer.
Issue #185376 - Maven project does not support JDK 7
Comment 3 Quality Engineering 2010-05-19 06:10:54 UTC
Integrated into 'main-golden', will be available in build *201005182201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/
User: 
Log: