I've been testing some JavaEE ideas and I have faced some issue due to Glassfish deployment for Maven Web projects. Basically the issue is that GF plugin have been using the project (POM) name as the deployed artifact name instead of the WAR name (as expected ). So, I have some JNDI lookup code which is generated by Nb as:
but to run I have to change the lookup to:
I have to change it because the in-place deployment is not following correctly the specified behaviour.
I have read some parts of NB code and it looks to me that the issue is at o.n.m.glassfish.eecommon.api.Utils.computeModuleID, specifically at moduleID = ProjectUtils.getInformation(FileOwnerQuery.getOwner(fo)).getDisplayName(). AFAIU it should be something like o.n.m.j2ee.deployment.config.ConfigSupportImpl.getDeploymentName(), where the folder name is considered for in-place deployment.
I have tried to define the name of the module at ejb-jar.xml file too, without success too (it has not worked at GF too, so maybe this last part is not a NB issue)
I had no time yet to dig it further but if my assumptions are correct maybe we can fix it soon.
The code that I used are available at https://github.com/mgraciano/tdc-2013/blob/master/annotation-processors/ap-demo-web/src/main/java/tdc2013/web/ScriptProviderImpl.java. I should say that these code are still under development and is just a prove of concept, we still need to clear it up.
Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.7.0_21; Java HotSpot(TM) 64-Bit Server VM 23.21-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_21-b11
There is no chance to get this fixed in 7.3.1 which is in high resistance mode now. But I'll fix it in trunk for 7.4.
Thanks a lot. Fixing it for 7.4 is good enough.
I have the same issue.
Created a maven enterprise application, with ejb, war and ear modules.
When I run it from netbeans (ear module right click >> run) it deploys the application to MyApp-ear/target/gfdeploy/_MyApp-ear_1.0-SNAPSHOT
Tried to add a <application-name>MyApp-ear<application-name> to the application.xml on the ear module, to get rid of the version from the app-name, but Netbeans won't honor it.
I just wanna get rid of the version portion on the application name, cause it messes up the portable jndi names, making a refactory necessary every version change.
Probably, deploying the ear with the adjusted application.xml manually on the autodeploy would work, but I would like to run it from inside netbeans.
This happens on the latest Netbeans 8.0 Final.