Skip to content

Add --resolve-only option #37

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions jgo/jgo.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ def jgo_parser():
parser.add_argument( '--additional-endpoints', nargs='+', help='Add additional endpoints', default=[], required=False)
parser.add_argument('--ignore-jgorc', action='store_true', help='Ignore ~/.jgorc')
parser.add_argument('--link-type', default=None, type=str, help='How to link from local maven repository into jgo cache. Defaults to the `links\' setting in ~/.jgorc or \'auto\' if not specified.', choices=('hard', 'soft', 'copy', 'auto'))
parser.add_argument('--resolve-only', action='store_true', help='Only resolve dependencies and print workspace location. Will not run any code.', required=False)

return parser

Expand Down Expand Up @@ -552,6 +553,12 @@ def run(parser, argv=sys.argv[1:], stdout=None, stderr=None):
shortcuts = shortcuts,
verbose = args.verbose,
link_type = link_type)
if args.resolve_only:
print(workspace)
class MockObject(object):
def check_returncode(self):
pass
return MockObject()

main_class_file = os.path.join(workspace, primary_endpoint.main_class, 'mainClass') if primary_endpoint.main_class else os.path.join(workspace, 'mainClass')

Expand Down