[
https://issues.apache.org/jira/browse/IGNITE-15662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17424065#comment-17424065
]
Aleksandr Polovtcev commented on IGNITE-15662:
----------------------------------------------
LGTM, thank you!
> It is impossible to add a test-jar dependency to the CLI module
> ---------------------------------------------------------------
>
> Key: IGNITE-15662
> URL: https://issues.apache.org/jira/browse/IGNITE-15662
> Project: Ignite
> Issue Type: Task
> Reporter: Aleksandr Polovtcev
> Assignee: Petr Ivanov
> Priority: Minor
> Labels: ignite-3
> Time Spent: 3h
> Remaining Estimate: 0h
>
> h2. Steps to reproduce
> 1. Add a {{test-jar}} dependency to the {{pom.xml}} of the {{ignite-cli}}
> module, for example:
> {code:java}
> <dependency>
> <groupId>org.apache.ignite</groupId>
> <artifactId>ignite-core</artifactId>
> <scope>test</scope>
> <type>test-jar</type>
> </dependency>{code}
> 2. Run the following command from the repository root:
> {code:java}
> mvn package -Dmaven.test.skip -Dmaven.all-checks.skip
> {code}
> h2. Expected behavior
> The project is built successfully.
> h2. Actual behavior
> The project cannot be built and the following error appears:
> {code:java}
> [ERROR] Failed to execute goal on project ignite-cli: Could not resolve
> dependencies for project org.apache.ignite:ignite-cli:jar:3.0.0-SNAPSHOT:
> Could not find artifact
> org.apache.ignite:ignite-core:jar:tests:3.0.0-SNAPSHOT in apache.snapshots
> (https://repository.apache.org/snapshots) -> [Help 1]
> {code}
> h2. Supposed cause
> {{ignite-cli}} module uses the {{maven-antrun-plugin}} to create a
> self-executing JAR. This plugin requires the test dependencies to be present
> during the {{package}} execution phase (see the [source
> code|https://github.com/apache/maven-antrun-plugin/blob/master/src/main/java/org/apache/maven/plugins/antrun/AntRunMojo.java#L67]),
> which are not created because of the {{maven.test.skip}} flag.
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)