调用除 Build 和 Clean & 之外的操作建造 [英] Invoking Actions other than Build and Clean & Build

查看:18
本文介绍了调用除 Build 和 Clean & 之外的操作建造的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 NetBeans 的新手,正在尝试为我的 Maven 项目定义和运行各种自定义目标.我的 Maven 项目使用了许多插件;一个用于构建 Java 类,另一个用于预编译 JSP,另一个用于构建 OSGi 包,另一个用于部署到我的开发应用服务器.

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.

似乎默认情况下,NetBeans 具有 Build、Clean &在主工具栏中构建为易于访问的构建选项".这些会触发贯穿整个构建过程的安装目标(编译所有内容并部署到我的开发人员).

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).

在 NetBeans 中,我可以编辑项目的属性,定义开发"配置文件,然后定义自定义操作(或修改默认的 NetBeans 操作).

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).

我该怎么做:

  1. 调用不是 Build 或 Clean & 的操作在 NetBeans 中构建

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

仅为特定插件的运行定义某些目标,并调用这些操作.

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

推荐答案

首先转到 Project Properties > Actions 并创建您的 MVN 构建

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

上面会运行:

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

然后它将在自定义"下可用

Then it will become available under "Custom"

这篇关于调用除 Build 和 Clean & 之外的操作建造的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆