Issue with the Maven plugin and Eclipse

I recently faced 2 issues with MOE when using maven and Eclipse

1- I got, again, the MOE home not found when executing a maven update
But I was able to narrow the problem. It happens during MOE setup:
Could not execute build using Gradle distribution ‘https://services.gradle.org/distributions/gradle-2.14.1-bin.zip’.
(org.multi-os-engine:moe-maven:1.3.1:setupSDK:default:validate)
org.apache.maven.plugin.MojoFailureException: Could not execute build using Gradle distribution ‘https://
services.gradle.org/distributions/gradle-2.14.1-bin.zip’. at org.moe.maven.GradleTask.execute(GradleTask.java:
189) at org.moe.maven.SetupSDKTask.execute(SetupSDKTask.java:73)
The exception is actually the following:
java.lang.RuntimeException: Unable to find MOE home
at org.moe.internal.MOEProjectConfigurator.setSdk(MOEProjectConfigurator.java:106)
at org.moe.internal.MOEProjectConfigurator.configureClasspath(MOEProjectConfigurator.java:82)
at org.eclipse.m2e.jdt.internal.DefaultClasspathManagerDelegate.populateClasspath(DefaultClasspathManagerDelegate.java:61)

It happens because of these settings in build.gradle:
moe {
xcode.mainTarget = ‘DWOTPL_IOS_NATIVE_PROJECTNAME’
xcode.testTarget = ‘DWOTPL_IOS_NATIVE_PROJECTNAME-Test’
xcode.packageName = ‘DWOTPL_IOS_NATIVE_PROJECTNAME.app’
xcode.launchScreenFilePath = ‘src/main/resources/LaunchScreen.xib’
xcode.infoPlistPath ‘src/main/resources/Info.plist’
xcode.bundleID = ‘DWOTPL_IOS_NATIVE_PROJECTNAME’
xcode.generateProject false
xcode.xcodeProjectDirPath ‘xcode’
}

If I reply that with the following from another project, then the maven update works:
moe {
xcode {
project “xcode/DWOTPL_IOS_HYBRID_PROJECTNAME.xcodeproj”
mainTarget ‘DWOTPL_IOS_HYBRID_PROJECTNAME’
testTarget = ‘DWOTPL_IOS_HYBRID_PROJECTNAME-Test’

	    workspace 'xcode/DWOTPL_IOS_HYBRID_PROJECTNAME.xcworkspace'
	    mainScheme 'DWOTPL_IOS_HYBRID_PROJECTNAME'
	    testScheme 'DWOTPL_IOS_HYBRID_PROJECTNAME-Test'
	}
}

I tried many combination but I have not got it to work. Is there a log somewhere I can look at and send you more info?

2- Upgrade the MOE version
A maven update adds, some how, the MOE jar as dependencies. If I bump the MOE version in pom.xml and execute a maven update, the MOE jar dependencies are not updated n the build path.

Hi!

MOE version found in the build.gradle file, pom.xml contain moe-maven plugin version.
Please see: https://github.com/multi-os-engine/moe-samples-java/tree/moe-master/HelloMaven

Best Regards,
Roland

Thanks Roland. this is what we are already doing.
Our current main issue is with ‘MOE home not found’. I suspect that the error message is somehow not the proper one, but a consequence of another error/exception being caught. Changing the setupSDK content makes it work, so it has access to the variable. Is there any log I can look at so we can narrow down the problem?

Hi!

Moe-maven plugin configurations in the pom.xml:

  • Gradle Log Level. Available settings: "", --quiet, --info, --debug
<configuration>
	...
	<gradleLogLevel>--debug</gradleLogLevel>
	...
</configuration>
  • Gradle Stacktrace Level. Available settings: --stacktrace, --full-stacktrace
<configuration>
	...
	<gradleStacktraceLevel>--stacktrace</gradleStacktraceLevel>
	...
</configuration>

Best Regards,
Roland

Thanks, we found out that the project is using some properties that are no longer valid:

xcode.packageName = 'DWOTPL_IOS_NATIVE_PROJECTNAME.app’

We are fixing our projects accordingly, as something changed behind the scene.