Page 1 of 1

Build Failure - Ant BuildException

PostPosted: 27 May 2016, 21:02
by jb11
I want to add some missing cards and am trying to set up the environment. I typically use Eclipse but installed NetBeans so that I could work on this. Everything has cloned and opened properly in the IDE but when I try to build with dependencies, it fails on Mage Framework with the below error. I am using Win 7 64-bit and Java 1.8.0_91. I have tried troubleshooting this but cannot seem to find any solution in my search.

Code: Select all
Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.8:run (exec-protoc) on project mage: An Ant BuildException has occured: exec returned: 1
around Ant part ...<exec failonerror="true" executable="${protoc.filepath}">... @ 14:60 in D:\NetBeans 8.1\workspace\mage\Mage\target\antrun\build-main.xml
Attached full output because it looks too "spammy" to post.

Any help is appreciated. Thanks

Re: Build Failure - Ant BuildException

PostPosted: 28 May 2016, 09:04
by LevelX
Make a "Clean and Build" on the MageRoot project.

Re: Build Failure - Ant BuildException

PostPosted: 29 May 2016, 16:15
by jb11
That is one of the first things I did. Clean and Build, Clean + Build, Clean + Build with Dependencies... I always fail with that error. I am looking at the build and assume that the exec-protoc is building the resources relating to the new rating system? I noticed that as soon as the repo is cloned and opened, there are lots of missing package errors throughout Mage Framework for mage.game.result.* (attached image). I figured this process is supposed to build what is necessary to resolve those issues.

Re: Build Failure - Ant BuildException

PostPosted: 29 May 2016, 16:37
by escplan9
Not sure if it will help here, but with Maven installed, try
Code: Select all
mvn clean install -DskipTests
on the command line in your XMage development directory. It will take a while to complete but resolves most build related issues. Read more about it on the XMage Developer Getting Started Guide here:
https://github.com/magefree/mage/wiki/D ... rted#maven

Re: Build Failure - Ant BuildException

PostPosted: 29 May 2016, 23:01
by jb11
Same thing. Fresh clone, Maven 3.3.9. I attached the full console output, though most is the same.

Re: Build Failure - Ant BuildException

PostPosted: 30 May 2016, 07:41
by LevelX
Do you invoke the "Clean and build" from within the netbeans IDE?

CleanAndBuild.jpg


Did you install the bundle of Java and Netbeans or do you use another java version?

Probably not related but also causing problems often. Did you uncheck the "Comple on save" options?
CompileOnSave.jpg

Re: Build Failure - Ant BuildException

PostPosted: 30 May 2016, 15:36
by jb11
Yes, as a I mentioned above, I did all combinations of cleans and builds, primarily from the IDE. It was only until the last suggestion that I even used the command line. I have jdk1.8.0_91 on my machine because I develop otherwise in Eclipse. NetBeans is pointing at that version in the config. I had previously only disabled 'compile on save' for Client, Server, and Tests, as instructed in the directions on GitHub. I just disabled the option for Framework but it still errors.

Re: Build Failure - Ant BuildException

PostPosted: 02 Jun 2016, 15:26
by jb11
After more troubleshooting, I found this. I tried doing a "Resolve Project Problems" on Mage Framework and it returns

Code: Select all
Custom build participant(s) found

The IDE will not execute any 3rd party extension code during Maven project loading.
These can have significant influence on performance of the Maven model (re)loading or interfere with IDE's own codebase. On the other hand the model loaded can be incomplete without their participation. In this project we have discovered the following external build participants:
kr.motd.maven.os.DetectExtension
I assume it is referring to the kr.motd.maven extension in the Mage Framework pom.xml.

Re: Build Failure - Ant BuildException

PostPosted: 03 Jun 2016, 17:43
by jb11
I give up. I have tried NetBeans, IntelliJ, and Eclipse, and all three fail to compile at one stage or another for various reasons, and troubleshooting only makes it worse. I have followed the directions on GitHub to set up NetBeans and IntelliJ, but nothing works for me. I guess I will just have to wait until someone eventually implements the missing cards that I need.

Re: Build Failure - Ant BuildException

PostPosted: 04 Jun 2016, 08:30
by LevelX
jb11 wrote:After more troubleshooting, I found this. I tried doing a "Resolve Project Problems" on Mage Framework and it returns

Code: Select all
Custom build participant(s) found

The IDE will not execute any 3rd party extension code during Maven project loading.
These can have significant influence on performance of the Maven model (re)loading or interfere with IDE's own codebase. On the other hand the model loaded can be incomplete without their participation. In this project we have discovered the following external build participants:
kr.motd.maven.os.DetectExtension
I assume it is referring to the kr.motd.maven extension in the Mage Framework pom.xml.
That's not the problem. This only raises a message during build of Mage Framework. The same is shown for me but building works correctly.

Re: Build Failure - Ant BuildException

PostPosted: 04 Jun 2016, 23:32
by jb11
Okay. Still can't build anything, but thanks.

Re: Build Failure - Ant BuildException

PostPosted: 10 Jul 2016, 15:15
by jb11
I am now able to build successfully in NetBeans. It turns out that it was because my path to the project had spaces (was in D:\NetBeans 8.1\workspace). Moving the repo fixed it.

Re: Build Failure - Ant BuildException

PostPosted: 10 Jul 2016, 15:40
by escplan9
I noticed this issue when I was trying to setup my XMage environment on a new computer - Maven really does not like spaces in your repository path. In my case, I believe the error message showed an incomplete path where the space was which helped me identify it quicker. Anyways, found a Git issue on this the other day while doing some cleanup there and helped OP here to resolve the issue.

Maven on Windows pre-requisites page mentions to not use spaces in paths:
http://maven.apache.org/guides/getting- ... sites.html

I updated the Developer Getting Started guide so at the step where they are cloning the repository and setting the local path for it, to make sure it does not contain spaces: https://github.com/magefree/mage/wiki/D ... ng-Started

Re: Build Failure - Ant BuildException

PostPosted: 10 Jul 2016, 15:50
by jb11
That was my issue. So thanks.