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

dokka-maven-plugin ignores non-standard maven local repo #1625

Closed
adangel opened this issue Nov 13, 2020 · 2 comments · Fixed by #1644
Closed

dokka-maven-plugin ignores non-standard maven local repo #1625

adangel opened this issue Nov 13, 2020 · 2 comments · Fixed by #1644
Labels

Comments

@adangel
Copy link
Contributor

adangel commented Nov 13, 2020

Describe the bug
When you run your maven build and use a local maven repo at a non-standard location (not ~/.m2/repository), then dokka-maven-plugin still downloads dependencies there. If you want to keep your dependencies separate, that's not possible then.

Expected behaviour
When Maven is configured or instructed to use a specific location for the local maven repository, then the default local repo location should not be modified.

To Reproduce

  • A maven project with the dokka-maven-plugin added
  • clear your default local maven repo location (e.g. mv ~/.m2/repository ~/.m2/repository-old)
  • run mvn clean verify -Dmaven.repo.local=$(pwd)/m2repo

Now all dependencies should be placed into ./m2repo and ~/.m2/repository should not exist.

Dokka configuration

            <plugin>
                <groupId>org.jetbrains.dokka</groupId>
                <artifactId>dokka-maven-plugin</artifactId>
                <version>${dokka.version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>javadocJar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

Installation

  • Operating system: Linux
  • Build tool: Maven
  • Dokka version: 1.4.10.2

Additional context
The path ~/.m2/repository seems to be hard coded here:

val localRepo = LocalRepository(System.getProperty("user.home") + "/.m2/repository")

@MarcinAman
Copy link
Contributor

Hi, since you already debugged what is the cause of this behaviour would you mind contributing a PR for that?

@adangel
Copy link
Contributor Author

adangel commented Nov 27, 2020

@MarcinAman I've created a PR, see #1644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants