【发布时间】:2017-03-17 09:55:12
【问题描述】:
我正在尝试将 bower 集成到我的 maven webapp 中,这是我的 pom.xml 和 bower.json,但我未能下载依赖项。这是我的 pom.xml 和 bower.json 文件。还有一个问题,我需要 nodejs 或 npm 帮助来下载依赖项吗?
bower.json:
{
"name": "Bower1",
"version": "1.0.0",
"description": "javaee7-angular JavaScript dependencies.",
"private": true,
"dependencies": {
"angular": "1.2.0",
"jquery": "1.9.1",
"angular-bootstrap": "0.10.0",
"angular-grid": "2.0.7"
}
}
pom.xml:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>Bower1</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>bower</executable>
<arguments>
<argument>install</argument>
</arguments>
<workingDirectory>${basedir}/src/main/webapp</workingDirectory>
</configuration>
</plugin>
</plugins>
</build>
【问题讨论】:
-
感谢您的回复@zillani,但在安装 Bower 时,我收到类似“'node' 未被识别为内部或外部命令、可运行程序或批处理文件”之类的错误。我该如何解决这个问题????
-
np,在下面找到我的答案,如果有帮助请告诉我@Gopi Krishna Seeram
标签: java maven bower bower-install