GoogleCloudPlatform / google-cloud-eclipse

Google Cloud Platform plugin for Eclipse
Apache License 2.0
86 stars 49 forks source link

Cannot convert Maven AESv7 project to v8 #2919

Open briandealwis opened 6 years ago

briandealwis commented 6 years ago

With a native AES project, we can convert to a Java 8 project just by using <runtime>java8</runtime> in the appengine-web.xml. This doesn't work in Maven projects as the maven.compiler.source and maven.compiler.target determine the project Java facet version. But even after changing the maven.compiler.* properties, the project cannot be changed to Java 8 by adding the <runtime>java8</runtime> element.

Mar 08, 2018 2:34:40 PM com.google.cloud.tools.eclipse.appengine.standard.java8.AppEngineWebBuilder checkRuntimeElement
SEVERE: P/mvnaes: error updating facets
org.eclipse.core.runtime.CoreException: One or more constraints have not been satisfied.
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modifyInternal(FacetedProject.java:363)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.mergeChangesInternal(FacetedProject.java:1181)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.access$2(FacetedProject.java:1117)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject$1.run(FacetedProject.java:324)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240)
    at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267)
    at org.eclipse.wst.common.project.facet.core.internal.FacetedProject.modify(FacetedProject.java:339)
    at com.google.cloud.tools.eclipse.appengine.standard.java8.AppEngineWebBuilder.setupForJava8Runtime(AppEngineWebBuilder.java:137)
    at com.google.cloud.tools.eclipse.appengine.standard.java8.AppEngineWebBuilder.checkRuntimeElement(AppEngineWebBuilder.java:96)
    at com.google.cloud.tools.eclipse.appengine.standard.java8.AppEngineWebBuilder.build(AppEngineWebBuilder.java:73)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304)
    at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360)
    at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383)
    at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144)
    at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Contains: App Engine Java Standard Environment JRE8 requires Java 1.8.

But I can do it if I manually change the facets.

briandealwis commented 6 years ago

1941