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 206030 - deploy on save in Maven Ear project does not work on domain jar
Summary: deploy on save in Maven Ear project does not work on domain jar
Status: RESOLVED DUPLICATE of bug 243484
Alias: None
Product: javaee
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Martin Janicek
URL:
Keywords:
Depends on: 209360
Blocks:
  Show dependency tree
 
Reported: 2011-12-06 18:55 UTC by heatseeker
Modified: 2014-07-30 12:45 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
simple maven ear project (25.02 KB, application/zip)
2012-02-27 22:13 UTC, heatseeker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description heatseeker 2011-12-06 18:55:49 UTC
My maven ear project consists of 3 subprojects: domain, ejb and web app. Deploy on save works well on ejb and web modules but it does not on domain one.
Comment 1 David Konecny 2011-12-14 19:08:07 UTC
What is "domain" project?
Comment 2 Martin Janicek 2011-12-15 09:55:23 UTC
If I understand this right, you've created standard EAR maven project and after that you've created additional Domain subproject containing only business domain classes, right?
If so, what type of project have you used for this?
Comment 3 Martin Janicek 2011-12-15 16:45:33 UTC
Closing as INCOMPLETE for now, please reopen together with additional information. Thanks in advance
Comment 4 heatseeker 2011-12-19 16:07:14 UTC
My ear structure is:

EAR
 |
 +-- ejb project
 +-- domain project
 +-- web app project

a domain project is a simple project that contains entity beans and persistence.xml
In practice my domain model classes are in a different jar, not included in ejb-jar.
Comment 5 Martin Janicek 2011-12-19 16:52:16 UTC
I see. And your project is created as a Maven Web project/EJB project or something different? Could you attach your sources, so I'll be able to reproduce the issue?
Comment 6 heatseeker 2011-12-23 11:18:14 UTC
My project is too large to add it. I should create a new one from scratch. I'll add it as soon as possible.
Comment 7 Martin Janicek 2011-12-23 11:34:02 UTC
Ok, that would be great (please try to narrow the project to a minimal reproducible case). Thanks
Comment 8 Martin Janicek 2012-01-18 14:37:49 UTC
Please reopen again together with attached project. I can't do anything without it. Thanks in advance
Comment 9 heatseeker 2012-02-27 22:13:56 UTC
Created attachment 116162 [details]
simple maven ear project

No setting is need to run the project. Try to change Person class in domain module.
Comment 10 Martin Janicek 2012-03-03 10:11:26 UTC
I see. If I understand it right, you've created Domain project as an Application client project. Unfortunately this was never designed to work this way.

Application client project should be used in cases when you have standard enterprise application and in addition you need to create also fat client (desktop client application). Because of that application client don't have (and shouldn't have Deploy on Save). It's not directly connected to the server, it's only used as an another client application (btw: that's why there are no server options in project properties).

You might be able to get this working if you will create your Domain project as a standard Maven Web Application. In that case IDE could be able to get DoS working when some domain class will be changed (but I'm not completely sure, I've never tried this by myself).

--> Closing the issue as INVALID, since the application client should not work with DoS
Comment 11 heatseeker 2012-03-06 21:59:08 UTC
(In reply to comment #10)
> I see. If I understand it right, you've created Domain project as an
> Application client project. Unfortunately this was never designed to work this
> way.

Sure but I need a simple jar project (expert group called it "persistence archive" in ejb 3.1 early draft). Netbeans recognizes it as an application client project but this is a mistake. I didn't set it as an application client.

> You might be able to get this working if you will create your Domain project as
> a standard Maven Web Application. In that case IDE could be able to get DoS
> working when some domain class will be changed (but I'm not completely sure,
> I've never tried this by myself).
> 

Since war has too complex structure I tried to change project type in ejb just changing <packaging> element in pom. So DoS settings appeared in properties but nothing happened.

--> Reopen the issue since netbeans does not estabilish the project type properly.
Comment 12 David Konecny 2012-03-07 03:37:47 UTC
(In reply to comment #11)
> Netbeans recognizes it as an application
> client project but this is a mistake. I didn't set it as an application client.

Support for Maven Application Client was added to NetBeans recently and it is more work on progress that complete feature so if above is true then I would think it is bug in Maven Application Client support. On the other hand Maven AppClient support should take over a maven project only when AppClient  packaging type is specified.
Comment 13 Martin Janicek 2012-03-07 09:12:31 UTC
I agree with that, but what type of project should be used if no packaging type is defined in pom.xml. Maven reference says that 'jar' packaging is used when no packaging is declared but I don't think we have some special 'jar' packaging project type or am I wrong ?

Still, it doesn't seem to me like application client bug. I would not expect that this type of project should handle Deploy on Save since it is not server related.
Comment 14 heatseeker 2012-03-07 11:06:31 UTC
hi mjanicek, 

application client project has nothing to do with my problem.

I need a plain library project that has DoS capability. If I had my entities in an ejb project DoS works, but if I extract them in a separate library DoS does not work anymore. This is not only for persistence but also if I want to share some common classes for different webapps in my ear.

I tried to deceive netbeans using ejb packaging but nothing seemed to change. So my question is: how can I have DoS feature on ear shared libraries?

If you think it is not so useful close the ticket.
Comment 15 Martin Janicek 2012-03-07 11:25:17 UTC
Ye, I completely understand your problem (the application client point was directed to David). The thing is that as far as I know we don't have currently any type of project for these situations (Davide, correct me if I'm wrong).

But I agree - it would be useful. We might create a new enhancement and try to create new 'jar' packaging project type for similar use cases.
Comment 16 Martin Janicek 2012-03-21 14:09:08 UTC
I'm changing issue type to the enhancement. Since it's blocked by enhancement 209360, there is nothing I can do about it right now. Once 209360 will be fixed, we should think about creating new project type (application client shouldn't be used for this type of task and the IDE needs to recognize them correctly)
Comment 17 Martin Janicek 2014-07-30 12:45:05 UTC

*** This bug has been marked as a duplicate of bug 243484 ***