Browserstack automate-maven-plugin不起作用

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

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

我收到以下错误:

[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文件:

<?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>

有人可以帮助我解决这个问题吗?

puenshou 回答:Browserstack automate-maven-plugin不起作用

HTML

您需要在此处提及jdk源代码和targer版本。

,

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

<groupId>com.browserstack</groupId>
<artifactId>automate-maven-plugin</artifactId>
<version>1.0.0</version>

没有快照

本文链接:https://www.f2er.com/3159267.html

大家都在问