微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在测试包的 *root* 中找不到 *-tests.jar 文件

如何解决在测试包的 *root* 中找不到 *-tests.jar 文件

我在 AWS 场上上传测试包时遇到此错误。即:

There was a problem processing your file. We Could not find a *-tests.jar file in the *root* of your test package.

但是,在 zip 文件中提供了 jar。我已按照 https://docs.aws.amazon.com/devicefarm/latest/developerguide/test-types-appium.html

中的给定说明设置了我的代码

以下是我在 POM.xml 中使用的插件

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.6</version>
            <executions>
                <execution>
                    <goals>
                        <goal>test-jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>3.1.2</version>
            <executions>
                <execution>
                    <id>copy-dependencies</id>
                    <phase>package</phase>
                    <goals>
                        <goal>copy-dependencies</goal>
                    </goals>
                    <configuration>
                        <outputDirectory>${project.build.directory}/dependency-jars/</outputDirectory>
                    </configuration>
                </execution>
            </executions>
        </plugin>

        <plugin>

            <artifactId>maven-assembly-plugin</artifactId>

            <version>3.3.0</version>

            <executions>

                <execution>

                    <phase>package</phase>

                    <goals>

                        <goal>single</goal>

                    </goals>

                    <configuration>

                        <finalName>zip-with-dependencies</finalName>

                        <appendAssemblyId>false</appendAssemblyId>

                        <descriptors>

                            <descriptor>src/main/assembly/zip.xml</descriptor>

                        </descriptors>

                    </configuration>

                </execution>

            </executions>

        </plugin>

    </plugins>
</build>

非常感谢任何帮助。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。