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 191817 - Annotation processor output is not visible after Run action
Summary: Annotation processor output is not visible after Run action
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal with 2 votes (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-10 22:05 UTC by Petr Jiricka
Modified: 2015-09-17 11:16 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2010-11-10 22:05:27 UTC
1. Create a Java SE application project
2. Set source level to 1.6
3. Create some entity classes from database
4. Run the project

=> You see that the JPA metamodel is not generated; the annotation processor was not run. On the other hand, if you do Cleand and Build, it *is* generated => bug.
Comment 1 Petr Jiricka 2010-11-11 15:38:58 UTC
After consultation with Jan Lahoda, it turns out that the processors actually *are* run even during Run/Deploy, they only work differently than during Build. During Build, AP output (.java files) is put into the build/generated-sourced dir, whereas during Run, AP output is only kept in Java infrastructure's caches. In both cases, .class files are correctly created under build/classes, so there is no issue at runtime.

Still, I think there is still a problem that:
1. There is inconsistency between what the user sees after Build and after Run - in the former case the generated source is present, in the latter it is not

2. The generated sources may become stale, e.g. in the case when I
i. Build the project
ii. Open the generated source (JPA canonical metadata model)
iii. Change the entity class in a way that affects the class generated by the AP, e.g. by adding a persistent field
iv. Run the project,
then the generated source will not be updated. (The .class file will be updated correctly, so there will be no problem at runtime.)

These are IMO still problems for the user workflow, although not as severe -> decreasing priority to P3.

Next, there is a problem with displaying the generated sources folder in the logical view, which I filed as a separate bug 191860.
Comment 2 Martin Balin 2015-09-17 11:16:15 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.