- Hands-On Microservices with Kotlin
- Juan Antonio Medina Iglesias
- 238字
- 2021-06-30 19:10:53
Introduction to Maven goals
Maven supports the concept of plugins, a plugin will be attached to a certain phase using a goal, and when that phase is executed the goal is run, if the goal fails the phase fails.
For example, in a Kotlin project a Kotlin plugin will set a goal named compile that is attached to the compile phase, so when we run the compile phase, it will compile the Kotlin source code.
We could run a goal from a plugin directly using the format mvn plugin:goal, for example in our application we could do the following:
mvnw kotlin:compile
This will compile our Kotlin code, however if other plugins have attached goals to the compile phase they will not run since we are not executing the phase, just a goal.
Spring Boot provides a plugin to run the application using Maven, which is under the spring-boot plugin and the goal name is run, so we could do the following:
mvnw spring-boot:run
After some seconds, our application will run and we should see this message, among others:
Tomcat started on port(s): 8080 (http)
Started Chapter2ApplicationKt in 1.999 seconds (JVM running for 6.747)
Currently, if we navigate to http://localhost:8080, we can see only an error page as we haven't added anything to our microservice yet. We can stop our application at any time by pressing Ctrl + C, but first, we need to understand further what pom.xml is.
- Python 3.7網(wǎng)絡(luò)爬蟲快速入門
- C程序設(shè)計簡明教程(第二版)
- Visual FoxPro程序設(shè)計教程
- Visual C++數(shù)字圖像模式識別技術(shù)詳解
- OpenCV 3和Qt5計算機視覺應(yīng)用開發(fā)
- Bulma必知必會
- Processing互動編程藝術(shù)
- Apex Design Patterns
- concrete5 Cookbook
- Java 9模塊化開發(fā):核心原則與實踐
- Getting Started with Laravel 4
- C#應(yīng)用程序設(shè)計教程
- Spring核心技術(shù)和案例實戰(zhàn)
- Instant PHP Web Scraping
- HTML5+CSS3+JavaScript 從入門到項目實踐(超值版)