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 239473 - Project Properties -> Actions: does not execute all specified maven goals
Summary: Project Properties -> Actions: does not execute all specified maven goals
Status: RESOLVED DUPLICATE of bug 238543
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.4
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-13 14:35 UTC by saulukas
Modified: 2014-01-03 14:34 UTC (History)
0 users

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 saulukas 2013-12-13 14:35:25 UTC
in "Propject Properties" window  "Actions" category redefining actions (i.e. "Run Project") does not execute all specified "Execute goals".

Entering "package" into "Execute goals" runs: 

   .../mvn package

Entering "package liferay:deploy" into "Execute goals" runs: 

   .../mvn liferay:deploy

instead of 

   .../mvn package liferay:deploy


Works properly on NetBeans 7.3.1 under Mac OS X 10.7.5
Broken on NetBeans 7.4 Patch 1.
Comment 1 Milos Kleint 2013-12-13 14:46:42 UTC
most likely related to Compile on save. Please read the initial lines of the maven output after you trigger run project. if the default behaviour is not well suited for your project, just disable compile on save.

for more please read - http://wiki.netbeans.org/FaqCompileOnSave#Using_Compile_on_Save_in_Maven_Projects

(as accessible from project customizer's Compile panel I think)
Comment 2 saulukas 2013-12-13 15:22:06 UTC
Yes, it is related to Compile on Save (CoS). With CoS off it executes all the goals. CoS FAQ explains that it is supposed to be so.

We used to have rather fast Liferay portlet plugin deployment in 7.3.1 using CoS and:

    .../mvn validate war:exploded antrun:run

Reverting back to custom maven goals in NetBeans 7.4.

p.s. CoS FAQ explained why test execution became much much slower under 7.4
     than 7.3.1  This is very sad news for TDD. Could be a deal breaker.
Comment 3 Milos Kleint 2013-12-13 19:17:09 UTC
(In reply to saulukas from comment #2)
> Yes, it is related to Compile on Save (CoS). With CoS off it executes all
> the goals. CoS FAQ explains that it is supposed to be so.
> 
> We used to have rather fast Liferay portlet plugin deployment in 7.3.1 using
> CoS and:
> 
>     .../mvn validate war:exploded antrun:run
> 

What imporant goals execute in validate phase?

> 
> p.s. CoS FAQ explained why test execution became much much slower under 7.4
>      than 7.3.1  This is very sad news for TDD. Could be a deal breaker.

I'm sorry to hear that but stuff has to be reliably correct first, only then can we think about performance.
Comment 4 saulukas 2013-12-13 20:05:45 UTC
(In reply to Milos Kleint from comment #3)
> 
> What imporant goals execute in validate phase?
>

Each developer in our projects has very small portion of specific setup:
Liferay installation directory, database settings, feature toggles and similar.
It could be as little as one or three properties pointing to more detailed
configurations.
These settings live in properties files not under version control system.
Properties are read by properties-maven-plugin and used by compile/test/deploy
plugins. This is done in validate or initialize phase.

This is very handy mechanism to switch between different setups quickly:
local setup, common development setup, quality assurance, demo environment
and others. 

Another thing is: mvn package liferay:deploy

This is official way to deploy liferay plugins in a slower fashion. 
"package" goal is ignored by CoS in NetBeans 7.4.

"Run Project" and "Debug Project" actions are very handy for this purpose:
1. because they are in the toolbar
2. they have keyboard shortcuts
3. despite liferay plugins are war-packaged, they are not standalone
   web applications and can not be run/deployed/debugged in a standard way

We also used "Debug project" action to start selected "public static void main"
from test packages with embedded Jetty for classic web applications.
We configured action to use all the target/classes instead of JAR's
of submodules. This is now default for NetBeans 7.4 with CoS. But easy
configuration switching via properties-maven-plugin is gone. 

> > 
> > p.s. CoS FAQ explained why test execution became much much slower under 7.4
> >      than 7.3.1  This is very sad news for TDD. Could be a deal breaker.
> 
> I'm sorry to hear that but stuff has to be reliably correct first, only then
> can we think about performance.

Agree - reliability comes first. Still TDD should be made as easy and fast as
possible. By easy and fast I mean run tests on save in subsecond time (ok, 
three seconds at most:) This requires custom "On Save" actions or similar.
Comment 5 Milos Kleint 2014-01-02 14:58:57 UTC
likely a duplicate of issue 238543, please read that issue for a possible workaround (going back to the way tests were executed before 7.4)
Comment 6 Milos Kleint 2014-01-03 14:34:51 UTC
marking as duplicate of issue 238543 which has more discussion on the topic

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