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: | Change main project for Maven Ent. App to runnable ear and for NBM App to runnable nbm-application | ||
---|---|---|---|
Product: | projects | Reporter: | Jaroslav Pospisil <jpospisil> |
Component: | Maven | Assignee: | David Simonek <dsimonek> |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | anebuzelsky, jglick, kganfield, pjiricka |
Priority: | P2 | Keywords: | USABILITY |
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows Vista | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Jaroslav Pospisil
2010-04-26 12:11:47 UTC
We need to consider a consistent approach to all Maven multiprojects. Maven NetBeans Application archetype with the "NetBeans Platform Application" and "NetBeans Platform based Application" projects created is exactly the same case. After studying projectsui code, I came to conclusion that currently it's possible to define only that some of the opened projects should be main, but not which one - there is missing API. (check NewProject around line 200, strange code btw). New API would be probably something like new property representing rootdir FileObject of the project which should become main. Or we may live with current situation, as this issue for sure doesn't meet quality criteria for P2 IMHO. Jesse, what do you think about proposed API change? Thanks. (In reply to comment #2) > After studying projectsui code, I came to conclusion that currently it's > possible to define only that some of the opened projects should be main, but > not which one - there is missing API. I don't think so; you just need to put the one you want to be main first in the list (use a LinkedHashSet). Thanks a lot for looking into this, Dafe. One other aspect of this bug that Tonda and I discussed today is the fact that when you build the container sub-project after it's created ("mavenprojectXYZ-ear JavaEE6 Assembly" or "NetBeans Platform based application"), it does not build because the other subprojects have not been built yet; you have to do "Build with dependencies". So we may want to tie the F11 shortcut + toolbar button to "Build with dependencies" in this case, rather than "Build". I also agree this bug does not meet the P2 criteria; IMO it's a real P3 bug. I am also adding the USABILITY keyword. (In reply to comment #3) > (In reply to comment #2) > > After studying projectsui code, I came to conclusion that currently it's > > possible to define only that some of the opened projects should be main, but > > not which one - there is missing API. > > I don't think so; you just need to put the one you want to be main first in the > list (use a LinkedHashSet). That's nasty, I don't like dependencies on implementation, but I'll give it a try, thanks. > So we may want to tie the F11 shortcut + toolbar button
> to "Build with dependencies" in this case, rather than "Build".
We need to resolve this part as well. I found it already filed as an issue #178644.
Jesse, please comment on this as well.
(In reply to comment #5) > I don't like dependencies on implementation It's not a dependency on implementation. Templates.setDefinesMainProject is documented to behave this way. OK then, so it's at least strange :-) Changeset: 04d6d4a4b1b5 Author: Dafe Simonek <dsimonek@netbeans.org> Date: 2010-04-28 09:54 Message: #184978: change main projects to point to ear and nbm-application modules Issue #184978 - Change main project for Maven Ent. App to runnable ear v. |