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

Compilation error on first run in dev mode #6881

Closed
kipcd opened this issue Jan 30, 2020 · 11 comments · Fixed by #6894
Closed

Compilation error on first run in dev mode #6881

kipcd opened this issue Jan 30, 2020 · 11 comments · Fixed by #6894
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@kipcd
Copy link

kipcd commented Jan 30, 2020

Describe the bug
After updating to Quarkus 1.2.0.Final sometimes me and my teammate get a compilation error when we run
mvn quarkus:dev

[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /some/path/SomeService.java:[107,34] multi-catch statements are not supported in -source 6
(use -source 7 or higher to enable multi-catch statements)

When we repeat the same command it compiles and starts successfully. Never occurred before on version 1.1.1.Final

Expected behavior
Shouldn't get the compile error on executing mvn quarkus:dev

Environment:

  • Output of uname -a:
    Linux denis 5.3.0-29-generic #31-Ubuntu SMP Fri Jan 17 17:27:26 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • Output of java -version:
openjdk version "11.0.5" 2019-10-15
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.5+10)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.5+10, mixed mode)
  • Output of mvn -version:
Apache Maven 3.6.1
Maven home: /usr/share/maven
Java version: 11.0.5, vendor: AdoptOpenJDK, runtime: /home/denis/.sdkman/candidates/java/11.0.5.hs-adpt
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.3.0-29-generic", arch: "amd64", family: "unix"
  • Quarkus version or git rev:
    1.2.0.Final

pom.xml:

<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
		 xmlns="http://maven.apache.org/POM/4.0.0"
		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<groupId>dummy.group</groupId>
	<artifactId>some-service</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<properties>
		<compiler-plugin.version>3.8.1</compiler-plugin.version>
		<maven.compiler.parameters>true</maven.compiler.parameters>
		<java.version>11</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<quarkus-plugin.version>1.2.0.Final</quarkus-plugin.version>
		<quarkus.platform.artifact-id>quarkus-universe-bom</quarkus.platform.artifact-id>
		<quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
		<quarkus.platform.version>1.2.0.Final</quarkus.platform.version>
		<surefire-plugin.version>2.22.1</surefire-plugin.version>
		<lombok.version>1.18.10</lombok.version>
		<maxmind.geoip2.version>2.13.0</maxmind.geoip2.version>
		<amazon.sdk.version>2.10.48</amazon.sdk.version>
	</properties>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>${quarkus.platform.group-id}</groupId>
				<artifactId>${quarkus.platform.artifact-id}</artifactId>
				<version>${quarkus.platform.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-resteasy</artifactId>
		</dependency>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-resteasy-jackson</artifactId>
		</dependency>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-smallrye-health</artifactId>
		</dependency>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-smallrye-metrics</artifactId>
		</dependency>
		<dependency>
			<groupId>com.maxmind.geoip2</groupId>
			<artifactId>geoip2</artifactId>
			<version>${maxmind.geoip2.version}</version>
		</dependency>
		<dependency>
			<groupId>software.amazon.awssdk</groupId>
			<artifactId>s3</artifactId>
			<version>${amazon.sdk.version}</version>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>${lombok.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-junit5</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>io.rest-assured</groupId>
			<artifactId>rest-assured</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>io.quarkus</groupId>
				<artifactId>quarkus-maven-plugin</artifactId>
				<version>${quarkus-plugin.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>build</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${compiler-plugin.version}</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${surefire-plugin.version}</version>
				<configuration>
					<systemProperties>
						<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
					</systemProperties>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>native</id>
			<activation>
				<property>
					<name>native</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-failsafe-plugin</artifactId>
						<executions>
							<execution>
								<goals>
									<goal>integration-test</goal>
									<goal>verify</goal>
								</goals>
								<configuration>
									<systemProperties>
										<native.image.path>
											${project.build.directory}/${project.build.finalName}-runner
										</native.image.path>
									</systemProperties>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<properties>
				<quarkus.package.type>native</quarkus.package.type>
			</properties>
		</profile>
	</profiles>
</project>
@kipcd kipcd added the kind/bug Something isn't working label Jan 30, 2020
@kipcd
Copy link
Author

kipcd commented Jan 30, 2020

mvn -e quarkus:dev output
mvn-quarkus-dev.log

@gsmet
Copy link
Member

gsmet commented Jan 30, 2020 via email

@gsmet
Copy link
Member

gsmet commented Jan 30, 2020

And if you can come up with a simple reproducer project, that would be really helpful!

@kipcd
Copy link
Author

kipcd commented Jan 30, 2020

And if you can come up with a simple reproducer project, that would be really helpful!

Here it is, the simplest I could do:
https://github.com/DenisKipchakbaev/bug-example-quarkus

@kipcd
Copy link
Author

kipcd commented Jan 30, 2020

mvn -X quarkus:dev output:
mvn-x-quarkus-dev.log

@ghost
Copy link

ghost commented Jan 30, 2020

I confirm I have the same error.

ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.2.0.Final:dev (default-cli) on project bug-example-quarkus: Unable to execute mojo: Compilation failure
[ERROR] /Users/amartinez/_Weekendesk_examples/quarkus/bug-example-quarkus/src/main/java/me/kipc/BugExample.java:[10,30] multi-catch statements are not supported in -source 6
[ERROR]   (use -source 7 or higher to enable multi-catch statements)
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.quarkus:quarkus-maven-plugin:1.2.0.Final:dev (default-cli) on project bug-example-quarkus: Unable to execute mojo
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute mojo
    at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:132)
    at io.quarkus.maven.DevMojo.execute (DevMojo.java:271)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
/Users/amartinez/_Weekendesk_examples/quarkus/bug-example-quarkus/src/main/java/me/kipc/BugExample.java:[10,30] multi-catch statements are not supported in -source 6
  (use -source 7 or higher to enable multi-catch statements)

    at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:1220)
    at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:187)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.twdata.maven.mojoexecutor.MojoExecutor.executeMojo (MojoExecutor.java:119)
    at io.quarkus.maven.DevMojo.execute (DevMojo.java:271)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[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

@ghost
Copy link

ghost commented Jan 30, 2020

if we do
mvn clean package quarkus:dev it works
with mvn clean quarkus:dev is when it fails

@kipcd
Copy link
Author

kipcd commented Jan 30, 2020

Seems the problem is in the quarkus-maven-plugin 1.2.0.Final, because when we rollback the version of the plugin to 1.1.1.Final the error never occurred.

@gsmet
Copy link
Member

gsmet commented Jan 30, 2020

@gastaldi interested in having a look? Reproducer is here: #6881 (comment) .

@gsmet
Copy link
Member

gsmet commented Jan 30, 2020

My guess is that we somehow miss to pass some settings to the compilation.

@gastaldi gastaldi self-assigned this Jan 30, 2020
@gastaldi
Copy link
Contributor

Sure, I'll have a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants