Сбой при запуске mvn test: невозможно загрузить mojo 'test' (или один из его обязательных компонентов) - PullRequest
0 голосов
/ 01 июня 2019

Я пытаюсь запустить команду типа " mvn -B -f ./pom.xml test ", но получаю сообщение об ошибке, подобное следующему:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.676 s
[INFO] Finished at: 2019-06-01T20:27:24+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.smartbear.soapui:soapui-pro-maven-plugin:5.1.2:test (default) on project apitest-hfa: Execution default of goal com.smartbear.soapui:soapui-pro-maven-plugin:5.1.2:test failed: Unable to load the mojo 'test' (or one of its required components) from the plugin 'com.smartbear.soapui:soapui-pro-maven-plugin:5.1.2': java.util.NoSuchElementException
[ERROR] role: org.apache.maven.plugin.Mojo
[ERROR] roleHint: com.smartbear.soapui:soapui-pro-maven-plugin:5.1.2:test
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

Но эта командаможет хорошо работать на моей другой машине, и все это также проходит, когда я пробую это с программным обеспечением SoapUIPro, но не командой , я не могу понять, что не так с моим pom.xml, есть ли что-то, что я пропустил в моем pomзависимости?

Действительно нужна помощь, большое спасибо.

Снимки экрана, как показано ниже: введите описание изображения здесь

1 Ответ

0 голосов
/ 05 июня 2019

Попробуйте добавить следующее, чего нет в вашем списке зависимостей -

<dependencies>
    <dependency>
        <groupId>org.reflections</groupId>
        <artifactId>reflections</artifactId>
        <version>0.9.9-RC1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.poi</groupId>
        <artifactId>poi-ooxml</artifactId>
        <version>3.10-FINAL</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>2.5.6</version>
        <type>pom</type>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.8.1</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>3.0.5</version>
    </dependency>
    <dependency>
        <groupId>com.jgoodies</groupId>
        <artifactId>forms</artifactId>
        <version>1.2.1</version>
    </dependency>
</dependencies>

org.codehaus.plexus может решить проблему.

Если возможно, вы можете поделиться своим pomфайл, который будет легче идентифицировать !!!

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...