首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Browserstack automate-maven-plugin不工作

Browserstack automate-maven-plugin不工作
EN

Stack Overflow用户
提问于 2019-11-05 21:28:35
回答 2查看 583关注 0票数 0

我正在尝试使用Jenkins在BrowserStack设备云上运行我的appium测试。

在将依赖项添加到下一节https://www.browserstack.com/app-automate/appium/jenkins#reporting中提到的pom.xml之后

我收到以下错误:

代码语言:javascript
复制
[ERROR] Failed to execute goal com.browserstack:automate-maven-plugin:1.0.0-SNAPSHOT:test-compile (default) on project 1.0: Execution default of goal com.browserstack:automate-maven-plugin:1.0.0-SNAPSHOT:test-compile failed: Plugin com.browserstack:automate-maven-plugin:1.0.0-SNAPSHOT or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.codehaus.mojo:aspectj-maven-plugin:jar:${aspectj.maven.version}, org.aspectj:aspectjtools:jar:${aspectj.tools.version}: Could not find artifact org.codehaus.mojo:aspectj-maven-plugin:jar:${aspectj.maven.version} in central (https://repo.maven.apache.org/maven2) -> [Help 1]

我的pom.xml文件:

代码语言:javascript
复制
<?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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>xxxx</groupId>
<artifactId>1.0</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
    <jdk.source.version>1.8</jdk.source.version>
    <jdk.target.version>1.8</jdk.target.version>
</properties>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.6.0</version>
            <configuration>
                <source>${jdk.source.version}</source>
                <target>${jdk.target.version}</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <!-- JUnit 5 requires Surefire version 2.22.0 or higher -->
            <version>2.22.0</version>
        </plugin>
        <plugin>
            <groupId>com.browserstack</groupId>
            <artifactId>automate-maven-plugin</artifactId>
            <version>1.0.0-SNAPSHOT</version>
            <configuration>
                <source>${jdk.source.version}</source>
                <target>${jdk.target.version}</target>
                <complianceLevel>${jdk.source.version}</complianceLevel>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>test-compile</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

<dependencies>
    <!-- https://mvnrepository.com/artifact/io.appium/java-client -->
    <dependency>
        <groupId>io.appium</groupId>
        <artifactId>java-client</artifactId>
        <version>7.2.0</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>5.5.2</version>
        <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine -->
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>5.5.2</version>
        <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.browserstack/automate-testassist -->
    <dependency>
        <groupId>com.browserstack</groupId>
        <artifactId>automate-testassist</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </dependency>
</dependencies>

有人能帮我解决这个问题吗?

EN

回答 2

Stack Overflow用户

发布于 2020-03-26 16:45:41

代码语言:javascript
复制
            <source>${jdk.source.version}</source>
            <target>${jdk.target.version}</target>
            <complianceLevel>${jdk.source.version}</complianceLevel>

您需要在这里提到jdk源代码和targer版本。

票数 0
EN

Stack Overflow用户

发布于 2020-08-25 02:55:52

这是因为BrowserStack存储库不再具有快照功能,因此您需要按如下方式包含该插件。您可以查看this answer了解有关快照的更多信息

代码语言:javascript
复制
<groupId>com.browserstack</groupId>
<artifactId>automate-maven-plugin</artifactId>
<version>1.0.0</version>

没有快照

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58712370

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档