专家 generated-sources/annotations

Maven generated-sources/annotations

嘿,伙计,我花了很多时间研究但没有找到详细的答案,所以我发布了这个问题。目前我在从 AWS Workflow 生成源时遇到问题。我正在使用 Maven apt-maven-pluginaspectj-maven-plugin。这些插件都可以为活动生成客户端 类,但当 运行 mvn clean packagemvn clean install 针对我的工作流程 类.
错误

[ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-
plugin:1.7:compile (default) on project (myproject): Execution default
of goal org.codehaus.mojo:aspectj-maven-plugin:1.7:compile failed: 
basedir (myproject)\target\generated-sources\annotations does not exist 
-> [Help 1]

插件

            <groupId>org.codehaus.mojo</groupId>
            <artifactId>apt-maven-plugin</artifactId>
            <version>1.0-alpha-5</version>
            <executions>
                <execution>
                    <goals>
                        <goal>process</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>aspectj-maven-plugin</artifactId>
            <version>1.7</version>
            <configuration>
                <aspectLibraries>
                    <aspectLibrary>
                        <groupId>com.amazonaws</groupId>
                        <artifactId>aws-java-sdk-flow-build-tools</artifactId>
                    </aspectLibrary>
                </aspectLibraries>
                <complianceLevel>1.7</complianceLevel>
                <showWeaveInfo>true</showWeaveInfo>
                <verbose>true</verbose>
                <sources>
                    <source>
                        <basedir>${basedir}/target/generated-sources/annotations</basedir>
                    </source>
                    <source>
                        <basedir>src/main/java</basedir>
                        <includes>
                            <include>**/*.java</include>
                        </includes>
                    </source>
                </sources>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                        <goal>test-compile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

我不确定如何解决这个问题,如果有任何帮助将非常有用。

错误消息很清楚- mvn 找不到 /target/generated-sources/annotations,但在 pom 中它被声明为 aspectj-maven-plugin 的来源。

您的代码是否打算在 /target/generated-sources/annotations 下生成源代码?如果是,那么生成有问题,您需要公开更多的 pom 以便我告诉您出了什么问题。如果不是,为什么不把这部分去掉,再试一次。

<source>
     <basedir>${basedir}/target/generated-sources/annotations</basedir>
</source>

ps:我宁愿把它作为评论,但我不能:(