Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
543 views
in Technique[技术] by (71.8m points)

maven - Invoking Actions other than Build and Clean & Build

I am new to NetBeans and am trying to define and run various custom goals for my Maven proj. My Maven proj uses a number of plugins; once for building the Java classes, another for pre-compiling JSPs, another for building an OSGi bundle, and another for deploying to my dev app server.

It seems that by default, NetBeans has Build, and Clean & Build as easily accessible "build options" in the main toolbar bar. These trigger the install goal which runs through the entire build processes (compiles everything and deploys to my dev).

In NetBeans, I can edit the Properties for the project, and define a "development" profile, and then define custom actions (or modify the default NetBeans actions).

How do I:

  1. Invoke Actions that aren't Build or Clean & Build in NetBeans

  2. Define only certain goals for specific plugins to run, and invokes those actions.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

First go to the Project Properties > Actions and create your MVN build

Project properties

The above will run:

mvn install -P initdb,initdb-qa -DskipTest=true -Dprop.name=dev

Then it will become available under "Custom"

Custom Action


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...