Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-52

'mvn test' requires initial 'mvn install'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • None
    • Core
    • None

    Description

      "mvn install" is required before "mvn test" can be run.

      Example:

      $ rm -rf ~/.m2/repository/org/apache/logging

      $ mvn -v
      Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
      Java version: 1.6.0_26
      Java home: /Library/Java/JavaVirtualMachines/1.6.0_26-b03-383.jdk/Contents/Home
      Default locale: en_US, platform encoding: MacRoman
      OS name: "mac os x" version: "10.7.1" arch: "x86_64" Family: "mac"

      $ mvn test
      ....

      Downloading: https://repository.cloudera.com/content/repositories/releases//org/apache/logging/log4j2-core/1.99.0-SNAPSHOT/log4j2-core-1.99.0-SNAPSHOT-tests.jar
      [WARNING] Unable to get resource 'org.apache.logging:log4j2-core:test-jar:tests:1.99.0-SNAPSHOT' from repository cloudera (https://repository.cloudera.com/content/repositories/releases/): Error transferring file: Server retur
      ned HTTP response code: 409 for URL: https://repository.cloudera.com/content/repositories/releases/org/apache/logging/log4j2-core/1.99.0-SNAPSHOT/log4j2-core-1.99.0-SNAPSHOT-tests.jar
      Downloading: http://repository.apache.org/snapshots/org/apache/logging/log4j2-core/1.99.0-SNAPSHOT/log4j2-core-1.99.0-SNAPSHOT-tests.jar
      [INFO] Unable to find resource 'org.apache.logging:log4j2-core:test-jar:tests:1.99.0-SNAPSHOT' in repository apache.snapshots (http://repository.apache.org/snapshots)
      [INFO] ------------------------------------------------------------------------
      [ERROR] BUILD ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Failed to resolve dependencies for one or more projects in the reactor. Reason: Missing:
      ----------
      1) org.apache.logging:log4j2-core:test-jar:tests:1.99.0-SNAPSHOT

      Try downloading the file manually from the project website.

      Then, install it using the command:
      mvn install:install-file -DgroupId=org.apache.logging -DartifactId=log4j2-core -Dversion=1.99.0-SNAPSHOT -Dclassifier=tests -Dpackaging=test-jar -Dfile=/path/to/file

      Alternatively, if you host your own repository you can deploy the file there:
      mvn deploy:deploy-file -DgroupId=org.apache.logging -DartifactId=log4j2-core -Dversion=1.99.0-SNAPSHOT -Dclassifier=tests -Dpackaging=test-jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

      Path to dependency:
      1) org.apache.logging:log4j12-api:jar:1.99.0-SNAPSHOT
      2) org.apache.logging:log4j2-core:test-jar:tests:1.99.0-SNAPSHOT

      ----------
      1 required artifact is missing.

      for artifact:
      org.apache.logging:log4j12-api:jar:1.99.0-SNAPSHOT

      from the specified remote repositories:
      apache.snapshots (http://repository.apache.org/snapshots),
      central (http://repo1.maven.org/maven2),
      cloudera (https://repository.cloudera.com/content/repositories/releases/)

      Attachments

        Activity

          People

            Unassigned Unassigned
            jvasileff John Vasileff
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: