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.