Home Features Docs Blog Support GitHub

Issue with the Maven plugin and Eclipse

(Philippe Riand) #1

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.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.packageName = ‘DWOTPL_IOS_NATIVE_PROJECTNAME.app’
xcode.launchScreenFilePath = ‘src/main/resources/LaunchScreen.xib’
xcode.infoPlistPath ‘src/main/resources/Info.plist’
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”

	    workspace 'xcode/DWOTPL_IOS_HYBRID_PROJECTNAME.xcworkspace'

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.

(Roland Vigh - Migeran) #2


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,

(Philippe Riand) #3

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?

(Roland Vigh - Migeran) #4


Moe-maven plugin configurations in the pom.xml:

  • Gradle Log Level. Available settings: "", --quiet, --info, --debug
  • Gradle Stacktrace Level. Available settings: --stacktrace, --full-stacktrace

Best Regards,

(Philippe Riand) #5

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.