Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependency:go-offline fails to pull in required surefire testing dependency. #3819

Closed
silverdev opened this issue Oct 15, 2018 · 0 comments
Closed
Assignees
Labels
dependencies priority: p2 Moderately-important priority. Fix may not be included in next release. status: in progress There is an open PR type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@silverdev
Copy link
Contributor

Thanks for stopping by to let us know something could be better!

Please include as much information as possible:

Environment details

  • OS: Linux
  • Java version: java8
  • google-cloud-java version(s):

Steps to reproduce

  1. Start with a completely clean environment.
  2. Run a command that builds the project without running tests: mvn install -DskipTests
  3. Pull down the dependencies: dependency:go-offline
  4. Trying running the tests off line: mvn --fail-at-end -o verify

Stacktrace

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project google-cloud-core: Unable to generate classpath: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:
[ERROR] ----------
[ERROR] 1) org.apache.maven.surefire:surefire-junit4:jar:2.19.1
[ERROR]
[ERROR] Try downloading the file manually from the project website.
[ERROR]
[ERROR] Then, install it using the command:
[ERROR] mvn install:install-file -DgroupId=org.apache.maven.surefire -DartifactId=surefire-junit4 -Dversion=2.19.1 -Dpackaging=jar -Dfile=/path/to/file
[ERROR]
[ERROR] Alternatively, if you host your own repository you can deploy the file there:
[ERROR] mvn deploy:deploy-file -DgroupId=org.apache.maven.surefire -DartifactId=surefire-junit4 -Dversion=2.19.1 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR] Path to dependency:
[ERROR] 1) dummy:dummy:jar:1.0
[ERROR] 2) org.apache.maven.surefire:surefire-junit4:jar:2.19.1
[ERROR]
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR]
[ERROR] for artifact:
[ERROR] dummy:dummy:jar:1.0
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] central (http://repo.maven.apache.org/maven2, releases=true, snapshots=false)
[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/MojoExecutionException

Thanks!

@chingor13 chingor13 added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. dependencies status: in progress There is an open PR priority: p2 Moderately-important priority. Fix may not be included in next release. labels Oct 15, 2018
indrekpr pushed a commit to sympower/slf4j that referenced this issue Mar 19, 2019
…pache.maven.surefire:surefire-junit4:jar:2.20.1` and `dummy:dummy:jar:1.0` dependencies while offline

Apparently the `surefire-junit4` dependency needs to be listed explicitly as the plugin's dependency, so that `mvn dependency:go-offline` could see it needs to be downloaded too.

There was a nice discussion over here:
  googleapis/google-cloud-java#3819
  googleapis/google-cloud-java#3820
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies priority: p2 Moderately-important priority. Fix may not be included in next release. status: in progress There is an open PR type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

3 participants