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

assertj-error-prone:jar:0.6.0 references unpublished assertj-automation-root:jar:0.6.0 #438

Open
vlsi opened this issue May 30, 2022 · 2 comments

Comments

@vlsi
Copy link

vlsi commented May 30, 2022

What happened?

I'm adding assertj-error-prone to a Maven project, and Maven fails :(

See the very end of https://repo1.maven.org/maven2/com/palantir/assertj-automation/assertj-error-prone/0.6.0/assertj-error-prone-0.6.0.pom

    <dependency>
      <groupId>com.palantir.assertj-automation</groupId>
      <artifactId>assertj-automation-root</artifactId>
      <version>0.4.0</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>
</project>

My configuration:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <configuration combine.children="append">
    <showWarnings>true</showWarnings>
    <compilerArgs>
      <arg>-XDcompilePolicy=simple</arg>
      <arg>
        -Xplugin:ErrorProne \
        -Xep:ClassCanBeStatic:ERROR \
        -Xep:FieldCanBeStatic:ERROR \
        -Xep:MethodCanBeStatic:ERROR
      </arg>
    </compilerArgs>
    <annotationProcessorPaths>
      <path>
        <groupId>com.google.errorprone</groupId>
        <artifactId>error_prone_core</artifactId>
        <version>${error-prone.version}</version>
      </path>
      <path>
        <groupId>com.palantir.assertj-automation</groupId>
        <artifactId>assertj-error-prone</artifactId>
        <version>${assertj-error-prone.version}</version>
      </path>
      <!-- Other annotation processors go here.

      If 'annotationProcessorPaths' is set, processors will no longer be
      discovered on the regular -classpath; see also 'Using Error Prone
      together with other annotation processors' below. -->
    </annotationProcessorPaths>
  </configuration>
</plugin>
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project assertj-core: Resolution of annotationProcessorPath dependencies failed: Missing:
[ERROR] ----------
[ERROR] 1) com.palantir.assertj-automation:assertj-automation-root:jar:0.6.0
[ERROR]
[ERROR]   Try downloading the file manually from the project website.
....
[ERROR]
[ERROR]   Path to dependency:
[ERROR]   	1) com.palantir.assertj-automation:assertj-error-prone:jar:0.6.0
[ERROR]   	2) com.palantir.assertj-automation:assertj-automation-root:jar:0.6.0
[ERROR]
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR]
[ERROR] for artifact:
[ERROR]   com.palantir.assertj-automation:assertj-error-prone:jar:0.6.0
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR]   central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)

What did you want to happen?

It would be best if assertj-error-prone/pom.xml would not reference assertj-automation-root

@berlam
Copy link

berlam commented Jan 11, 2023

Same issue here. I think this is coming from settings.gradle (the root project) and is added during conversion from the palantir gradle-external-publish-plugin. But for now it looks like being unusable - at least from maven - without publishing a fixed fork to the company repo.

@Stephan202
Copy link

I see that this ticket involves an <optional>true</optional> dependency. The root cause is then likely the same as for palantir/gradle-baseline#2362.

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

No branches or pull requests

3 participants