[空手道 - 盖特林]:无法执行目标net.alchim31.maven:Scala-Maven-Plugin:4.5.6

发布于 2025-01-28 07:05:07 字数 6155 浏览 0 评论 0原文

我是盖特林(Gatling)的新手,我正在尝试使用该文档在此处建立一个空手道盖特林项目: https://github.com/karatelabs/karatelabs/karate/karate/karate/karate/tree/master/karate-karate-karate-karate-karate-karate-karate-karate- gatling

我对pom.xml有一个问题,我试图基于文档中给出的基础。 实际上,插件net.alchim31呈现了执行目标的失败。这是错误消息:

org.apache.maven.lifecycle.nogoalspecifiedexception:尚未针对此构建指定目标。您必须在格式中指定有效的生命周期阶段或目标:或:[:]:。

这是我的pom.xml:

4.0.0 org.springframework.boot 弹簧启动的父母 2.5.6

<groupId>com.crm.e2e</groupId>
<artifactId>e2e-ui</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>e2e-ui</name>
<description>Getting started with Karate</description>

<properties>
    <java.version>1.8</java.version>
    <junit-jupiter.version>5.4.0</junit-jupiter.version>
    <mockito.version>3.2.4</mockito.version>
    <karate.version>0.9.6</karate.version>
</properties>

<dependencies>

    <dependency>
        <groupId>com.intuit.karate</groupId>
        <artifactId>karate-gatling</artifactId>
        <version>${karate.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.intuit.karate</groupId>
        <artifactId>karate-junit5</artifactId>
        <version>0.9.6</version>
    </dependency>
    <dependency>
        <groupId>com.intuit.karate</groupId>
        <artifactId>karate-apache</artifactId>
        <version>0.9.6</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-firefox-driver</artifactId>
        <version>3.12.0</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-chrome-driver</artifactId>
        <version>3.12.0</version>
        <scope>test</scope>
    </dependency>

</dependencies>

<build>
    <testResources>
        <testResource>
            <directory>src/test/java</directory>
            <excludes>
                <exclude>**/*.java</exclude>
            </excludes>
        </testResource>
    </testResources>

    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.1</version>
            <configuration>
                <excludes>
                    <exclude>karate/**/*.java</exclude>
                </excludes>
            </configuration>
        </plugin>

        <plugin>
            <groupId>net.alchim31.maven</groupId>
            <artifactId>scala-maven-plugin</artifactId>
            <version>4.5.6</version>
            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                        <goal>testCompile</goal>
                    </goals>
                    <configuration>
                        <args>
                            <arg>-Jbackend:GenBCode</arg>
                            <arg>-Jdelambdafy:method</arg>
                            <arg>-target:jvm-1.8</arg>
                            <arg>-deprecation</arg>
                            <arg>-feature</arg>
                            <arg>-unchecked</arg>
                            <arg>-language:implicitConversions</arg>
                            <arg>-language:postfixOps</arg>
                        </args>
                    </configuration>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>io.gatling</groupId>
            <artifactId>gatling-maven-plugin</artifactId>
            <version>4.1.1</version>
            <configuration>
                <runMultipleSimulations>true</runMultipleSimulations>
            </configuration>
            <executions>
                <execution>
                    <phase>test</phase>
                    <goals>
                        <goal>test</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

有什么想法吗?感谢您的帮助

I'm new in Gatling and I’m trying to set up a karate gatling project using the documentation here:
https://github.com/karatelabs/karate/tree/master/karate-gatling

I have a problem with pom.xml that I tried to build on the basis of that-which is given in the documentation.
Actually the plugin net.alchim31 presents a failure of execution of the goal. Here's the error message:

org.apache.maven.lifecycle.NoGoalSpecifiedException: No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format : or :[:]:.

Here's my pom.xml:

4.0.0

org.springframework.boot
spring-boot-starter-parent
2.5.6

<groupId>com.crm.e2e</groupId>
<artifactId>e2e-ui</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>e2e-ui</name>
<description>Getting started with Karate</description>

<properties>
    <java.version>1.8</java.version>
    <junit-jupiter.version>5.4.0</junit-jupiter.version>
    <mockito.version>3.2.4</mockito.version>
    <karate.version>0.9.6</karate.version>
</properties>

<dependencies>

    <dependency>
        <groupId>com.intuit.karate</groupId>
        <artifactId>karate-gatling</artifactId>
        <version>${karate.version}</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.intuit.karate</groupId>
        <artifactId>karate-junit5</artifactId>
        <version>0.9.6</version>
    </dependency>
    <dependency>
        <groupId>com.intuit.karate</groupId>
        <artifactId>karate-apache</artifactId>
        <version>0.9.6</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-firefox-driver</artifactId>
        <version>3.12.0</version>
        <scope>test</scope>
    </dependency>

    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-chrome-driver</artifactId>
        <version>3.12.0</version>
        <scope>test</scope>
    </dependency>

</dependencies>

<build>
    <testResources>
        <testResource>
            <directory>src/test/java</directory>
            <excludes>
                <exclude>**/*.java</exclude>
            </excludes>
        </testResource>
    </testResources>

    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.22.1</version>
            <configuration>
                <excludes>
                    <exclude>karate/**/*.java</exclude>
                </excludes>
            </configuration>
        </plugin>

        <plugin>
            <groupId>net.alchim31.maven</groupId>
            <artifactId>scala-maven-plugin</artifactId>
            <version>4.5.6</version>
            <executions>
                <execution>
                    <goals>
                        <goal>compile</goal>
                        <goal>testCompile</goal>
                    </goals>
                    <configuration>
                        <args>
                            <arg>-Jbackend:GenBCode</arg>
                            <arg>-Jdelambdafy:method</arg>
                            <arg>-target:jvm-1.8</arg>
                            <arg>-deprecation</arg>
                            <arg>-feature</arg>
                            <arg>-unchecked</arg>
                            <arg>-language:implicitConversions</arg>
                            <arg>-language:postfixOps</arg>
                        </args>
                    </configuration>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>io.gatling</groupId>
            <artifactId>gatling-maven-plugin</artifactId>
            <version>4.1.1</version>
            <configuration>
                <runMultipleSimulations>true</runMultipleSimulations>
            </configuration>
            <executions>
                <execution>
                    <phase>test</phase>
                    <goals>
                        <goal>test</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Any idea ? Thanks for your help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文