gradle - Netbeans 如何将 WAR 文件部署到 Wildfly?
问题描述
然后从Netbeans
部署运行并运行war
,但是:
nicholas@mordor:~/NetBeansProjects/x$
nicholas@mordor:~/NetBeansProjects/x$ gradle tasks --all
> Task :tasks
------------------------------------------------------------
Tasks runnable from root project 'x'
------------------------------------------------------------
Build tasks
-----------
assemble - Assembles the outputs of this project.
build - Assembles and tests this project.
buildDependents - Assembles and tests this project and all projects that depend on it.
buildNeeded - Assembles and tests this project and all projects it depends on.
classes - Assembles main classes.
clean - Deletes the build directory.
jar - Assembles a jar archive containing the main classes.
testClasses - Assembles test classes.
war - Generates a war archive with all the compiled classes, the web-app content and the libraries.
Build Setup tasks
-----------------
init - Initializes a new Gradle build.
wrapper - Generates Gradle wrapper files.
Documentation tasks
-------------------
javadoc - Generates Javadoc API documentation for the main source code.
Help tasks
----------
buildEnvironment - Displays all buildscript dependencies declared in root project 'x'.
dependencies - Displays all dependencies declared in root project 'x'.
dependencyInsight - Displays the insight into a specific dependency in root project 'x'.
help - Displays a help message.
javaToolchains - Displays the detected java toolchains.
outgoingVariants - Displays the outgoing variants of root project 'x'.
projects - Displays the sub-projects of root project 'x'.
properties - Displays the properties of root project 'x'.
tasks - Displays the tasks runnable from root project 'x'.
Verification tasks
------------------
check - Runs all checks.
jacocoTestCoverageVerification - Verifies code coverage metrics based on specified rules for the test task.
jacocoTestReport - Generates code coverage report for the test task.
test - Runs the unit tests.
Other tasks
-----------
compileJava - Compiles main Java source.
compileTestJava - Compiles test Java source.
components - Displays the components produced by root project 'x'. [deprecated]
dependentComponents - Displays the dependent components of components in root project 'x'. [deprecated]
model - Displays the configuration model of root project 'x'. [deprecated]
prepareKotlinBuildScriptModel
processResources - Processes main resources.
processTestResources - Processes test resources.
Rules
-----
Pattern: clean<TaskName>: Cleans the output files of a task.
Pattern: build<ConfigurationName>: Assembles the artifacts of a configuration.
BUILD SUCCESSFUL in 686ms
1 actionable task: 1 executed
nicholas@mordor:~/NetBeansProjects/x$
nicholas@mordor:~/NetBeansProjects/x$ cat build.gradle
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'war'
repositories {
mavenCentral()
}
dependencies {
providedCompile 'javax:javaee-web-api:8.0'
testImplementation 'junit:junit:4.13'
}
nicholas@mordor:~/NetBeansProjects/x$
我没有看到明确的部署任务。
那么如何Netbeans
部署war
文件呢?
解决方案
推荐阅读
- java - Java 9 是否包含内置 JSON?
- c# - 读取进程内存不起作用给出错误尝试读取或写入受保护的内存
- android - 如何在一个应用程序(驱动程序和客户应用程序)中为 2 个应用程序(驱动程序应用程序和客户应用程序)制作 MyFirebaseMessaging?
- javascript - 得到从 ` 推导出的区域的值
` .svg 的信息 - html - 垂直居中问题
- go - 从后台 go 进程读取标准输入会导致 EOF 错误
- jquery - @Ajax.ActionLink 有效,但 $.ajax 无效
- php - 导航子菜单项未出现在 iframe 中
- laravel - Laravel 5.5 - 如何根据 `id` 值创建`negative_id` 列值?
- javascript - 无法在 Spring STS Eclipse 上创建 AngularJS4 项目 - java.lang.NoClassDefFoundError: com/genuitec/eclipse/core/vU