← 返回首页
scyjava does not agree with jgo on default m2 repo path · Issue #69 · scijava/scyjava · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

scyjava does not agree with jgo on default m2 repo path #69

New issue
New issue

Description

As reported downstream in PyImageJ, scyjava sets the m2_repo to ~/.m2/repository by default. Although you can override it using scyjava.config.set_m2_repo, the upstream jgo library has a function jgo.m2_path which does as follows:

def m2_path(): return os.getenv("M2_REPO", (pathlib.Path.home() / ".m2").absolute())

In other words: it looks also at the M2_REPO environment variable, before falling back to ~/.m2.

This behavior in jgo is actually wrong because M2_REPO is supposed to point to the actual local Maven repository cache directory e.g. ~/.m2/repository, not the parent ~/.m2. So a fix is needed in jgo; see also apposed/jgo#99 which covers essentially the same issue for M2_HOME. Probably the m2_path function should be deprecated in favor of two functions m2_home and m2_repo instead.

And then what scyjava should do is ask jgo—once jgo yields the correct answer—what its default should be, so that it matches.

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

      Footer

      © 2026 GitHub, Inc.