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

Failure to find com.google.devtools.ksp:symbol-processing-api:jar:1.5.20-1.0.0-beta03 in https://repo1.maven.org/maven2/ #2816

Closed
joostpapendorp opened this issue Aug 14, 2021 · 2 comments

Comments

@joostpapendorp
Copy link

The sub-dependency Dagger-SPI depends on an artifact that is not present in the Maven repository:

Failure to find com.google.devtools.ksp:symbol-processing-api:jar:1.5.20-1.0.0-beta03 in https://repo1.maven.org/maven2/

which indeed does not seem to exist.

The latest version of SPI still depends on this version

Workaround:
Dagger resolves fine up to at least 2.36

Relevant POM:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>org.something</groupId>
	<artifactId>stuff</artifactId>
	<version>0.1-SNAPSHOT</version>
	<name>changeme</name>

	<packaging>jar</packaging>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<project.java.version>16</project.java.version>

		<dagger.version>2.38.1</dagger.version>
		<lombok.version>1.18.20</lombok.version>

		<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.google.dagger</groupId>
			<artifactId>dagger</artifactId>
			<version>${dagger.version}</version>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>${lombok.version}</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<configuration>
					<release>${project.java.version}</release>
					<annotationProcessorPaths>
						<path>
							<groupId>com.google.dagger</groupId>
							<artifactId>dagger-compiler</artifactId>
							<version>${dagger.version}</version>
						</path>
						<path>
							<groupId>org.projectlombok</groupId>
							<artifactId>lombok</artifactId>
							<version>${lombok.version}</version>
						</path>
					</annotationProcessorPaths>
					<compilerArgs>--enable-preview</compilerArgs>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>

Full Maven output:

$ mvn clean install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< org.something:stuff >-------------------------
[INFO] Building changeme 0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ stuff ---
[INFO] Deleting D:\coding\modules\java\examples\daggerbug\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ stuff ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory D:\coding\modules\java\examples\daggerbug\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ stuff ---
[WARNING] Missing POM for com.google.devtools.ksp:symbol-processing-api:jar:1.5.20-1.0.0-beta03
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  0.592 s
[INFO] Finished at: 2021-08-14T16:56:50+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project stuff: Resolution of annotationProcessorPath dependencies failed: Missing:
[ERROR] ----------
[ERROR] 1) com.google.devtools.ksp:symbol-processing-api:jar:1.5.20-1.0.0-beta03
[ERROR]
[ERROR]   Try downloading the file manually from the project website.
[ERROR]
[ERROR]   Then, install it using the command:
[ERROR]       mvn install:install-file -DgroupId=com.google.devtools.ksp -DartifactId=symbol-processing-api -Dversion=1.5.20-1.0.0-beta03 -Dpackaging=jar -Dfile=/path/to/file
[ERROR]
[ERROR]   Alternatively, if you host your own repository you can deploy the file there:
[ERROR]       mvn deploy:deploy-file -DgroupId=com.google.devtools.ksp -DartifactId=symbol-processing-api -Dversion=1.5.20-1.0.0-beta03 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[ERROR]
[ERROR]   Path to dependency:
[ERROR]         1) com.google.dagger:dagger-compiler:jar:2.38.1
[ERROR]         2) com.google.dagger:dagger-spi:jar:2.38.1
[ERROR]         3) com.google.devtools.ksp:symbol-processing-api:jar:1.5.20-1.0.0-beta03
[ERROR]
[ERROR] ----------
[ERROR] 1 required artifact is missing.
[ERROR]
[ERROR] for artifact:
[ERROR]   com.google.dagger:dagger-compiler:jar:2.38.1
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR]   UK (https://repo1.maven.org/maven2/, releases=true, snapshots=false)
[ERROR] Path to dependency:
[ERROR]         1) com.google.dagger:dagger-compiler:jar:2.38.1
[ERROR]
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
@tbroyer
Copy link

tbroyer commented Aug 14, 2021

As pointed out in the release notes, you need to add another repository: https://github.com/google/dagger/releases/tag/dagger-2.38

And as noted in #2779, KSP should soon be published to The Central Repository.

@joostpapendorp
Copy link
Author

Thank you for the swift reply and the links. It solves the issue. Unfortunately, the dependency on the google maven repo is not possible for us, however it is good to know that you're on it and we appreciate the dilemma.

Fortunately it seems that the the publishing of KSP has been completed, since #2779 indicated it was supposed to be for version beta07 (which, as I linked above, did manage to find on Maven central). We'll delay our migration until the version has been picked up.

Again, thanks, and I'll close the issue.

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

2 participants