当前位置:网站首页>Gradle [graphic installation and use demonstration]
Gradle [graphic installation and use demonstration]
2022-07-23 18:42:00 【Xiao Kai, who loves fishing】

One 、 Related introduction
Gradle It's a good build tool , The reason for using it is :
- Less configuration dependent code , Don't like maven equally xml Too much
- Package, compile, test and release , And it's easy to use
- Use custom tasks to complete the functions you want
Two 、 install
Download address http://services.gradle.org/distributions/ , Download the version you need , Here's what I downloaded gradle-4.7-bin.zip. After downloading, unzip it to the directory you want , Then set the environment variable :


stay cmd View in mode , The following information shows that the installation was successful :

Then we can configure in the environment variable gradle Default warehouse address ( and maven Not quite the same. ):

3、 ... and 、IED The use of
1、IDEA
Use idea Create a web Of Gradle project



Then package and run the project :

double-click war

After packing war The file will be :

And then put war Put the corresponding tomcat directory , There's no more explanation here .
2、Eclipse
eclipse Install plug-ins by yourself , The plug-in path is :http://download.eclipse.org/buildship/updates/e46/releases/2.x/ .
Four 、 Problem specification
1、 explain build.gradle and settings.gradle
First, a project contains group、name、version .settings.gradle It is used to manage multiple projects , It contains the project name

stay build.gradle in ,apply It is an application plug-in , Such as :

Here we use java and war Plug in for ,dependencies It is used to declare what the project depends on jar

What's explained here is , We rely on junit Of jar. These include complile( Compile time )runtime( Runtime )testCompile( Test compile time )testRuntime( Test run time ).repositories It's a warehouse gradle They will go to the warehouse in order from top to bottom jar

Here we default to a maven Central warehouse , from gradle The address we see in the source code is like this

Here you can configure , among mavenLocal() Use local maven Warehouse ;mavenCentral() Use maven Central warehouse . Use a fixed address , Alibaba cloud can be used here (maven {url 'http://maven.aliyun.com/nexus/content/groups/public/'}) The image download speed of will be faster , Then you can also use the private server address inside the company .

边栏推荐
- How to become a modeler? Which is more popular, industrial modeling or game modeling?
- 程序员最想干的三件事 |漫画
- Rhcsa notes 3
- 学次世代建模是场景好还是角色好?选对职业薪资多一半
- Redis【超强超细 入门教程】
- 有人是靠自学建模找到工作的吗?千万别让这些思维害了你
- Jetty 服务器的 NIO 机制是如何导致堆外内存溢出的
- Block encryption mode ECB, CBC, PCBC, CFB, OFB, CTR
- Rhcsa Notes 6
- Past weaving of zero one-2022
猜你喜欢

SQLZOO——SELECT from Nobel Tutorial

MySql【从了解到掌握 一篇就够】

如何理解:普通代码块、构造块、静态块?有什么关系?

deepstream学习笔记(二):gstreamer与deepstream-test1说明

1259. 不相交的握手 动态规划

How to capture the analyst rating data of Sina Financial Data Center?

Flink Exactly-Once 投递实现浅析

Deepstream learning notes (II): description of GStreamer and deepstream-test1

Is learning next generation modeling a good scene or a good role? Choose the right profession and pay more than half

自学3D建模能不能成功?自学能就业吗?
随机推荐
PCL: ajustement multiligne (RANSAC)
如何理解:普通代码块、构造块、静态块?有什么关系?
opencv(13):cv2.findContours、cv::findContours简要介绍及opencv各版本cv2.findContours函数说明
VS2010一个解决方案下新建多个项目出现的问题和方法
Rhcsa notes 7
Analysis on the implementation of Flink exactly once delivery
Jetpack Compose之Navigation组件使用
[sharing 3D modeling and production skills] how ZBrush turns pictures into relief models
Redis【超强超细 入门教程】
What is the current situation of the next generation industry? 90% of career changing modelers are learning this process
【ONNX】动态输入尺寸的问题(多输出/多输入)
到底适不适合学习3D建模?这5点少1个都不行
1259. 不相交的握手 动态规划
【2013】【论文笔记】太赫兹波段纳米颗粒表面增强拉曼——
LeetCode 0131. 分割回文串
代码整洁,高效的系统方法
MySQL transactions, starting with redo log, bin log, undo log
Foundation of class
Great God "magic change" airpods, equipped with usb-c interface, 3D printing shell makes maintenance easier
BOM系列之BOM介绍