ad

如何使用Maven启动“鲍尔安装”然后“弹簧靴:运行”?-英雄云拓展知识分享

匿名投稿 394 2024-01-21

我是一个锻炼,我的项目中对Maven不了解一些东西。

我在同一存储库中使用Spring-boot和Angular 1,并且在使用Maven Pluggin“ Spring-Boot:run”之前,我需要一个解决方案来首先履行“ Bower Install”。

我会知道是不是可以自定义内涵Maven命令。

我使用Intellij,我所做的就是按主班上的开始按钮

package fr.studionline;

如何使用Maven启动“鲍尔安装”然后“弹簧靴:运行”?-英雄云拓展知识分享

import org.springframework.boot.SpringApplication;

import org.springframework.boot.autoconfigure.EnableAutoConfiguration;

import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication

@EnableAutoConfiguration

public class StudionlineBackApplication {

public static void main(String[] args) {

SpringApplication.run(StudionlineBackApplication.class, args);

}

}

Bower_components目录在另外一个目录中,以下图所述: 我项目的树景

预先感谢您,如果您可以帮助我了解它的工作原理。

如果我的问题缺少某些问题,我将回答任何问题。

更新:

我确切尝试了使用此POM配置的前端插件:

<build>

<resources>

<resource>

<directory>src/resources</directory>

</resource>

</resources>

<plugins>

<plugin>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-maven-plugin</artifactId>

</plugin>

<plugin>

<groupId>com.github.eirslett</groupId>

<artifactId>frontend-maven-plugin</artifactId>

<!-- Use the latest released version:

https://repo1.maven.org/maven2/com/github/eirslett/frontend-maven-plugin/ -->

<version>1.4</version>

<executions>

<execution>

<id>bower install</id>

<goals>

<goal>bower</goal>

</goals>

<configuration>

<arguments>install</arguments>

</configuration>

</execution>

</executions>

<configuration>

<workingDirectory>src/main/resources/static</workingDirectory>

</configuration>

</plugin>

</plugins>

</build>

这就是我履行命令前端时产生的事情:鲍尔

[INFO] Scanning for projects...

[INFO]

[INFO] ------------------------------------------------------------------------

[INFO] Building studionline-back 0.0.1-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO]

[INFO] --- frontend-maven-plugin:1.4:bower (default-cli) @ studionline-back ---

[INFO] Running 'bower install' in C:\Antoine\Ecole\Projet\ProjetAnu_5A\studionline-back\src\main\resources\static

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 1.071 s

[INFO] Finished at: 2017-07-06T17:59:58+02:00

[INFO] Final Memory: 11M/155M

[INFO] ------------------------------------------------------------------------

[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-

plugin:1.4:bower

(default-cli) on project studionline-back: Failed to run task: 'bower install' failed.

java.io.IOException:

Cannot run program "C:\Antoine\Ecole\Projet\ProjetAnu_5A\studionline-back\src\main\resources\static\node\node.exe"

(in directory "C:\Antoine\Ecole\Projet\ProjetAnu_5A\studionline-back\src\main\resources\static"):

CreateProcess error=2, Le fichier spécifié est introuvable -> [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/MojoFailureException

Process finished with exit code 1

但是我依然不明白如何使用Intellij启动它。我应当履行MVN运行而不是单击“运行”按钮?

看答案

看看 frontend-maven-plugin。特别是 鲍尔赛跑者.

<execution>

<id>bower install</id>

<goals>

<goal>bower</goal>

</goals>

<configuration>

<!-- optional: The default argument is actually

"install", so unless you need to run some other bower command,

you can remove this whole <configuration> section.

-->

<arguments>install</arguments>

</configuration>

</execution>

检查“可选配置”部份,以查看如何配置前端目录。在您的情形下:

<plugin>

<groupId>com.github.eirslett</groupId>

<artifactId>frontend-maven-plugin</artifactId>

<!-- optional -->

<configuration>

<workingDirectory>src/main/resources/static</workingDirectory>

</configuration>

</plugin>


🚀🌟 点击注册 免费试用超级应用平台-英雄云企业级hpapaas 🌟🚀 😃👉🌐

免责声明:

本网址(www.yingxiongyun.com)发布的材料主要源于独立创作和网友匿名投稿。此处提供的所有信息仅供参考之用。我们致力于提供准确且可信的信息,但不对材料的完整性或真实性作出任何保证。用户应自行验证相关信息的正确性,并对其决策承担全部责任。对于由于信息的错误、不准确或遗漏所造成的任何损失,本网址不承担任何法律责任。本网站所展示的所有内容,如文字、图像、标志、音频、视频、软件和程序等的版权均属于原创作者。如果任何组织或个人认为网站内容可能侵犯其知识产权,或包含不准确之处,请即刻联系我们进行相应处理。

标签:小牛 Intellij-Idea
上一篇:ruby to_yaml串起我的json-英雄云拓展知识分享
下一篇:jQuery ajax经过函数取得值?-英雄云拓展知识分享
相关文章

 发表评论

暂时没有评论,来抢沙发吧~