简体   繁体   English

从命令行运行IntelliJ配置

[英]Run IntelliJ configuration from command line

I've configured various execution and test configurations in my Java IntelliJ project. 我在Java IntelliJ项目中配置了各种执行和测试配置。 Is it possible to execute IntelliJ on a given project and configuration from the command line? 是否可以从命令行对给定项目和配置执行IntelliJ?

Summary 摘要

You will need to define a command line build project to run your tests from the command line, as IntelliJ (or any graphical IDE) does not provide tools to do so. 您需要定义命令行构建项目以从命令行运行测试,因为IntelliJ(或任何图形IDE)不提供这样做的工具。

Details for building running tests using Gradle 使用Gradle构建运行测试的详细信息

In the following directions I picked Gradle as command line build language, though some use Ant, or Maven as possible alternatives. 在以下方向中,我选择Gradle作为命令行构建语言,尽管有些人使用Ant或Maven作为可能的替代方案。 The gradle syntax is based on Groovy, which is a JDK-based scripting language. gradle语法基于Groovy,它是一种基于JDK的脚本语言。

A sample configuration for a basic java project is here: http://www.vogella.com/tutorials/Gradle/article.html 基本java项目的示例配置如下: http//www.vogella.com/tutorials/Gradle/article.html

Once your Gradle project is setup, you can run 'gw test' from command line. 设置Gradle项目后,可以从命令行运行'gw test'。

I highly suggest to install gradle wrapper called 'gdub' from here: https://github.com/dougborg/gdub -- this will save typing ./gradlew all the time. 我强烈建议从这里安装名为'gdub'的gradle包装器: https//github.com/dougborg/gdub - 这将一直保存输入./gradlew。

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM