Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-15662

It is impossible to add a test-jar dependency to the CLI module

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 3.0.0-alpha3
    • None

    Description

      Steps to reproduce

      1. Add a test-jar dependency to the pom.xml of the ignite-cli module, for example:

      <dependency>
          <groupId>org.apache.ignite</groupId>
          <artifactId>ignite-core</artifactId>
          <scope>test</scope>
          <type>test-jar</type>
      </dependency>

      2. Run the following command from the repository root:

      mvn package -Dmaven.test.skip -Dmaven.all-checks.skip
      

      Expected behavior

      The project is built successfully.

      Actual behavior

      The project cannot be built and the following error appears:

      [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]
      

      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), which are not created because of the maven.test.skip flag.

       

       

      Attachments

        Issue Links

          Activity

            People

              vveider Petr Ivanov
              apolovtcev Aleksandr Polovtsev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 10m
                  3h 10m