Skip to content

[Enchancement] Don't print stack trace as errer output. #96

Closed

Description

@xycabcd

I think a stacktrace would not be useful to the user, and it also floods the console.
A long one for example. This whole thing will appear in the user's terminal if they mistyped the version number:

org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: org.springframework:spring-core:jar:lastest (absent): Could not find artifact org.springframework:spring-core:jar:lastest in central (https://repo.maven.apache.org/maven2/)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:365)
	at org.codejive.jpm.util.Resolver.resolveArtifacts(Resolver.java:83)
	at org.codejive.jpm.util.Resolver.resolve(Resolver.java:41)
	at org.codejive.jpm.util.Resolver.resolvePaths(Resolver.java:47)
	at org.codejive.jpm.Jpm.path(Jpm.java:229)
	at org.codejive.jpm.Main$PrintPath.call(Main.java:330)
	at org.codejive.jpm.Main$PrintPath.call(Main.java:313)
	at picocli.CommandLine.executeUserObject(CommandLine.java:2031)
	at picocli.CommandLine.access$1500(CommandLine.java:148)
	at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2469)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2461)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2423)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
	at picocli.CommandLine$RunLast.execute(CommandLine.java:2425)
	at picocli.CommandLine.execute(CommandLine.java:2174)
	at org.codejive.jpm.Main.main(Main.java:658)
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: The following artifacts could not be resolved: org.springframework:spring-core:jar:lastest (absent): Could not find artifact org.springframework:spring-core:jar:lastest in central (https://repo.maven.apache.org/maven2/)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:473)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:261)
	at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:353)
	... 15 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Could not find artifact org.springframework:spring-core:jar:lastest in central (https://repo.maven.apache.org/maven2/)
	at org.eclipse.aether.connector.basic.ArtifactTransportListener.transferFailed(ArtifactTransportListener.java:42)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector$TaskRunner.run(BasicRepositoryConnector.java:417)
	at org.eclipse.aether.connector.basic.BasicRepositoryConnector.get(BasicRepositoryConnector.java:260)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:537)
	at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:449)
	... 17 more

Activity

  1. added 3 commits that reference this issue on Jan 20, 2026
    1ba5496
    ef7873b
    a1323c5
  2. quintesse commented on Jan 20, 2026

    @quintesse
    Contributor

    Ok, stack traces are no longer shown and a -v/--verbose flag was added to show them again if you want.
    Will publish a release one of these days.
    Thanks for your suggestion @xycabcd !

  3. xycabcd commented on Jan 21, 2026

    @xycabcd
    Author

    Thank you very much

  4. quintesse commented on Jan 23, 2026

    @quintesse
    Contributor

    New version has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions