Я следую Документация Google Cloud https://cloud.google.com/appengine/docs/flexible/java/using-cloud-sql для разработки Приложения.Как указано в документации, команда mvn clean jetty:run
должна использоваться для локального тестирования приложения.Кроме этого, я пробовал и другие команды, такие как mvn compile
.Ниже приведены шаги, которые я выполнил для локального тестирования приложения: -
Щелкните правой кнопкой мыши по моему проекту -> Запустите как -> Сборка Maven, затемЗапустилось окно конфигурации, где я ввел mvn clean jetty:run
в текстовом поле Цели и нажал Выполнить
Ниже приведен мой файл pom.xml: -
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>LiveInBliss</groupId>
<artifactId>LiveInBliss</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<build>
<!-- [START resources] -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<!-- [END resources] -->
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.0.M0</version>
</plugin>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.2.v20170220</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.1</version>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud</artifactId>
<version>0.8.0</version>
</dependency>
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>1.34.0</version>
</dependency>
<dependency> <!-- http://dev.mysql.com/doc/connector-j/en/ -->
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>6.0.5</version>
</dependency>
<dependency>
<groupId>com.google.cloud.sql</groupId>
<artifactId>mysql-socket-factory-connector-j-6</artifactId>
<version>1.0.10</version>
</dependency>
</dependencies>
<properties>
<!--
INSTANCE_CONNECTION_NAME from Cloud Console > SQL > Instance Details > Properties
or `gcloud sql instances describe <instance> | grep connectionName`
-->
<INSTANCE_CONNECTION_NAME>live-in-bliss:northamerica-northeast1:liveinbliss-99</INSTANCE_CONNECTION_NAME>
<user>root</user>
<password>my_password</password>
<database>liveinbliss</database>
<sqlURL>jdbc:mysql://google/$liveinbliss?cloudSqlInstance=$live-in-bliss:northamerica-northeast1:liveinbliss-99&socketFactory=com.google.cloud.sql.mysql.SocketFactory&user=$root&password=$Mohini24&useSSL=false</sqlURL>
</properties>
</project>
, а ниже - мойжурнал ошибок: -
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< LiveInBliss:LiveInBliss >-----------------------
[INFO] Building LiveInBliss 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.305 s
[INFO] Finished at: 2018-10-08T18:28:24+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Unknown lifecycle phase "mvn". You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/LifecyclePhaseNotFoundException
Просьба предложить, какие изменения я должен внести.
Спасибо