0

我正在关注https://javaee.github.io/firstcup/creating-example002.html中的 dukes-age 示例应用程序,但在尝试构建 dukes-age.war 时遇到了问题。

构建时收到的错误是:

Failed to execute goal from com.blazebit:jbake-maven-plugin:1.0.0:build (build-site) on project dukes-age: Failure when running: Error: Source folder must exist: ... -> [Help 1]

我已将 pom.xml 文件更改如下:

<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
    <artifactId>firstcup</artifactId>
    <groupId>org.glassfish.docs</groupId>
    <version>8.0</version>
</parent>

<groupId>com.mycompany</groupId>
<artifactId>dukes-age</artifactId>
<packaging>war</packaging>
<name>dukes-age</name>

<version>1.0-SNAPSHOT</version>
<dependencies>
    <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>javax.ws.rs-api</artifactId>
        <version>2.0.1</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.blazebit</groupId>
        <artifactId>jbake-maven-plugin</artifactId>
        <version>1.0.0</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>com.blazebit</groupId>
            <artifactId>jbake-maven-plugin</artifactId>
            <version>1.0.0</version>
            <executions>
                <execution>
                    <phase>generate-resources</phase>
                    <goals>
                        <goal>build</goal>
                    </goals>
                    <configuration>
                        <properties>
                            <site.url>http://localhost:8820/</site.url>
                        </properties>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

我究竟做错了什么?

非常感谢

4

1 回答 1

0

您不需要 JBake Maven 插件的 BlazeBit 版本来构建 duke-ages.war 我建议您为此注释掉依赖项和插件部分,然后重试。

于 2018-02-07T15:43:30.287 回答