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.
Created attachment 133581 [details] zipped project If you reading subject and thinking that that's pretty weird and basically impossible that I absolutely agree with you. It does not make any sense but Maven project after a while stops compiling Java files into Java classes. Regardless of Compile on Save option, regardless of everything. Just does not make sense!!! I'm running today's build from ee7 branch. I created Web Application and add servlet to it and JPA entity class and for a while everything is OK. But after a while after I do Clean & Build there is no error and output says "2 files compiled" but /target/classes is empty. Attached is the project after "Clean & Build" and maven debug output. Any idea what's wrong? Am I drinking too much coffee or not enough? Thanks.
Created attachment 133582 [details] build log
Jirko, do you know if this is reproducible also in the release73 branch?
Have no clue what could be wrong, I need to investigate it further. As much as I know there were some changes arround CoS done by Milos and also I have made some changes as a fix for the issue 228396.. but nothing should affect Java EE 7 branch I guess. Milosi do you think your changes could be related?
well, have you guys tried shutting down the IDE and doing the clean build using cmd line?
(In reply to comment #4) > well, have you guys tried shutting down the IDE and doing the clean build using > cmd line? if it exposes the same haviour, you might want to consider upgrading to maven-compiler plugin to 3.1 or downgrading..
Created attachment 133588 [details] Maven log from command line. It produces no classes even when run from command line and it is also reproducible in build 201304182201 from release73 branch.
> upgrading to maven-compiler plugin to 3.1 That sounds worth trying. 3.0 (which we are currently using) was released on Nov 16, 2012. Version 3.1 was released on Apr 3, 2013. Similarly, maven-dependency-plugin could be updated from 2.6 to 2.7.
It is "org.eclipse.persistence.jpa.modelgen.processor" dependency which is causing this problem. Commenting out that dependency in pom.xml fixes this problem. The dependency contains annotation processor which must be doing something wrong. I'm going to file an issue for the EclipseLink (once my account activation email shows up).
Filed as https://bugs.eclipse.org/bugs/show_bug.cgi?id=406264 .
*** Bug 228697 has been marked as a duplicate of this bug. ***
I am not aware of purpose of eclipselink, javax.persistence and modelgen.processor dependencies but are they needed? For Java EE 6 maven project they are not in pom.xml and REST from DB works. Also if you remove that dependencies in Java EE 7 project it also works.
*** Bug 228609 has been marked as a duplicate of this bug. ***
this dependency is used because we have ap turned on by default for projects with jpa entities. but if you dont need any static menamodel, you are free to remove this dependency. also as workaround seems to be easy, should it be p1 even if it's valid issue? hope we'll get feedback from eclipselink team to see if it's something we need to correct on nb side.
* javax.persistence - this dependency may not be needed because JPA APIs should be already in javaee-web-api dependency * modelgen.processor - as Sergey said this is annotation processor which generates JPA metamodel static classes which are necessary in order to use for example JPA 2.0 Criteria APIs. Have a look at http://www.ibm.com/developerworks/java/library/j-typesafejpa/ for more details. * eclipselink - I assume this is modelgen.processor's dependency and is therefore needed EE6 Maven project should not be that different from EE7 one and should contains metamodel generator too in its default setup.
Thank you for explanation. From my point of view of a dummy user it is inevitable that everything created by NetBeans' wizard works out of box. If there is no solution from eclipselink team I would remove these dependencies. An advanced user is able to add them later if he need them.
I hope that this is a temporary issue as EclipseLink dependency is still not a final released one. Let's see what they do with the issue I filed.
Sergey, do we have a nightly build of EclipseLink 2.5 that we can test this with? Would you do EL update in NetBeans so we can confirm the fix? In any case, we should still update maven-compiler-plugin to version 3.1, I heard 3.0 has serious issues, and now I found e.g. this critical bug that's present in 3.0 and fixed in 3.1: http://jira.codehaus.org/browse/MCOMPILER-187
I have updated archetypes to use version 3.1 of the maven-compiler-plugin (web-main #4e82730fa894 --> javaee7 branch). As much as I understand the discussion nothing more could be done on the Maven side. Reassigning to Sergey for further evaluation (feel free to pass the issue back if something else needs to be done within Maven)
should be resolved on eclipselink side since 25/04.
There is no need to update el in netbeans as maven use snapshot dependency and it should point to latest build already.
It's nice if David will verify as I may miss something. David, can you?
Test case from bug 228609 works for me. I filed a new bug 229168 for unwanted REST nodes.
tried to build attached project with maven 3.0.3 with mvn clean install command and got *.class files generated as expected.