Maven 1.1.1 Build error


#1

I am trying to upgrade a project to 1.1.1 from 1.1.0, and I am having a build issue with Maven.

It’s complaining about a missing POM

**The POM for org.jetbrains.kotlin:kotlin-maven-plugin:jar:1.1.1 is missing, no dependency information available**
[WARNING] Error injecting: org.jetbrains.kotlin.maven.K2JVMCompileMojo
java.lang.NoClassDefFoundError: org/jetbrains/kotlin/cli/common/messages/MessageCollector

Was the artifact published to Maven Central incorrectly?


#2

You can see the POM is returning a 404 when accessed from Maven Central:

http://central.maven.org/maven2/org/jetbrains/kotlin/kotlin-maven-plugin/1.1.1/kotlin-maven-plugin-1.1.1.pom


#3

I ran into the same error. Looks like something failed in the deployment to central. I was able to work around it (and my build seems to work so far) by adding the kotlin-compiler dependency to the kotlin-maven-plugin like the following:

				<plugin>
					<groupId>org.jetbrains.kotlin</groupId>
					<artifactId>kotlin-maven-plugin</artifactId>
					<version>${kotlin.version}</version>
					<dependencies>
						<dependency>
							<groupId>org.jetbrains.kotlin</groupId>
							<artifactId>kotlin-compiler</artifactId>
							<version>${kotlin.version}</version>
						</dependency>
					</dependencies>
					<executions>
						<execution>
							<id>compile</id>
							<phase>process-sources</phase>
							<goals>
								<goal>compile</goal>
							</goals>
							<configuration>
							</configuration>
						</execution>
						<execution>
							<id>test-compile</id>
							<phase>process-test-sources</phase>
							<goals>
								<goal>test-compile</goal>
							</goals>
							<configuration>
							</configuration>
						</execution>
					</executions>
				</plugin>

#4

@jbunting Great tip! I never would have thought of that.

I’ll hold off on the upgrade. I wanna give it a week to see if it’s fixed by then, otherwise I’ll try your suggestion.


#5

This bit me when trying to host my project on Jitpack: https://github.com/jitpack/jitpack.io/issues/1236
Apparently their caches are not very fresh.

I had to include all non-test dependencies from the pom to fix it, not just the compiler.


#6

I can believe that. I was only trying to compile and not going much further. That being said, it appears that the correct pom file is there now - https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-maven-plugin/1.1.1/kotlin-maven-plugin-1.1.1.pom


#7

I’m not where we should address this further, but it appears that the pom is gone from maven central again. I’m not sure how kotlin is syncing its artifacts to maven central but there appears to be a problem. I definitely have it cached in my local repository with an indication that it came from central, but the link above is returning a 404 again.

#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Mon Mar 27 09:44:34 CDT 2017
kotlin-maven-plugin-1.1.1.jar>central=
kotlin-maven-plugin-1.1.1.pom>central=