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.
Summary: | Fix import statements keymap fails to import classes from java-ee-api dependencies | ||
---|---|---|---|
Product: | projects | Reporter: | wwwizard <wwwizard> |
Component: | Maven | Assignee: | Tomas Stupka <tstupka> |
Status: | NEW --- | ||
Severity: | normal | CC: | wwwizard |
Priority: | P3 | ||
Version: | 8.2 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | Minimal Java EE pom.xml |
I tried creating a Maven Java Application, and in this case Ctrl+Shift+I works. But when I create a Maven project using Project from Archetype fix imports fails: Group ID: com.airhacks Artifact ID: javaee7-essentials-archetype Version: 1.3 Fix import statements works at home on latest Ubuntu, NetBeans, and Java 8. The only difference I can think of is that I'm not using the bundled Maven. Instead Maven Home in NetBeans is pointing to an installed version. worked for me with nb 8.2 and dev please reproduce the issue and attach your messages.log file from that session thanks taken from user mail: Ok, tried it again. I am not using the bundled Maven, I have version 3.3.9 installed. Go to Options > Java > Maven > Experimental > and check "Use the following location to store Maven binaries" and set the Directory to a valid maven repo. After this, imports fail to work. Once the experimental stuff has been enabled, disabling it does not fix the issue. Hope this helps. still can't reproduce
what exactly does it mean, that the import fails to work - you do not get option, or it isn't added to the surce file, ... ?
and again - i would like to see your messages.log file - reproduce the issue and attach your messages.log file from that NB session
> Go to Options > Java > Maven > Experimental > and check "Use the following location to store Maven binaries" and set the Directory to a valid maven repo. After this, imports fail to work.
note that the location applies for the maven client, not a maven repository
|
Created attachment 162395 [details] Minimal Java EE pom.xml Fix import statements Ctrl+Shift+I fails to import classes from javaee-api dependency. I'm able to use the fix import statement to import classes from other dependencies. You can manually add the import statement and the class will be imported successfully. To reproduce, create the following RESTful endpoint with the attached pom file and Ctrl+Shift+I: package com.importfails; @ApplicationPath("resources") public class JAXRSConfiguration extends Application { }