It is currently 16 Apr 2024, 04:16
   
Text Size

Build Failure - Ant BuildException

Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins

Build Failure - Ant BuildException

Postby jb11 » 27 May 2016, 21:02

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
Attachments
mage_error.txt
(4.34 KiB) Downloaded 233 times
jb11
 
Posts: 11
Joined: 27 May 2016, 20:46
Has thanked: 0 time
Been thanked: 0 time

Re: Build Failure - Ant BuildException

Postby LevelX » 28 May 2016, 09:04

Make a "Clean and Build" on the MageRoot project.
User avatar
LevelX
DEVELOPER
 
Posts: 1677
Joined: 08 Dec 2011, 15:08
Has thanked: 174 times
Been thanked: 374 times

Re: Build Failure - Ant BuildException

Postby jb11 » 29 May 2016, 16:15

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.
Attachments
mage.png
jb11
 
Posts: 11
Joined: 27 May 2016, 20:46
Has thanked: 0 time
Been thanked: 0 time

Re: Build Failure - Ant BuildException

Postby escplan9 » 29 May 2016, 16:37

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
escplan9
 
Posts: 257
Joined: 10 Aug 2015, 22:38
Has thanked: 26 times
Been thanked: 40 times

Re: Build Failure - Ant BuildException

Postby jb11 » 29 May 2016, 23:01

Same thing. Fresh clone, Maven 3.3.9. I attached the full console output, though most is the same.
Attachments
mage_error2.txt
(6.11 KiB) Downloaded 237 times
jb11
 
Posts: 11
Joined: 27 May 2016, 20:46
Has thanked: 0 time
Been thanked: 0 time

Re: Build Failure - Ant BuildException

Postby LevelX » 30 May 2016, 07:41

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
User avatar
LevelX
DEVELOPER
 
Posts: 1677
Joined: 08 Dec 2011, 15:08
Has thanked: 174 times
Been thanked: 374 times

Re: Build Failure - Ant BuildException

Postby jb11 » 30 May 2016, 15:36

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.
jb11
 
Posts: 11
Joined: 27 May 2016, 20:46
Has thanked: 0 time
Been thanked: 0 time

Re: Build Failure - Ant BuildException

Postby jb11 » 02 Jun 2016, 15:26

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.
jb11
 
Posts: 11
Joined: 27 May 2016, 20:46
Has thanked: 0 time
Been thanked: 0 time

Re: Build Failure - Ant BuildException

Postby jb11 » 03 Jun 2016, 17:43

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.
jb11
 
Posts: 11
Joined: 27 May 2016, 20:46
Has thanked: 0 time
Been thanked: 0 time

Re: Build Failure - Ant BuildException

Postby LevelX » 04 Jun 2016, 08:30

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.
User avatar
LevelX
DEVELOPER
 
Posts: 1677
Joined: 08 Dec 2011, 15:08
Has thanked: 174 times
Been thanked: 374 times

Re: Build Failure - Ant BuildException

Postby jb11 » 04 Jun 2016, 23:32

Okay. Still can't build anything, but thanks.
jb11
 
Posts: 11
Joined: 27 May 2016, 20:46
Has thanked: 0 time
Been thanked: 0 time

Re: Build Failure - Ant BuildException

Postby jb11 » 10 Jul 2016, 15:15

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.
jb11
 
Posts: 11
Joined: 27 May 2016, 20:46
Has thanked: 0 time
Been thanked: 0 time

Re: Build Failure - Ant BuildException

Postby escplan9 » 10 Jul 2016, 15:40

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
escplan9
 
Posts: 257
Joined: 10 Aug 2015, 22:38
Has thanked: 26 times
Been thanked: 40 times

Re: Build Failure - Ant BuildException

Postby jb11 » 10 Jul 2016, 15:50

That was my issue. So thanks.
jb11
 
Posts: 11
Joined: 27 May 2016, 20:46
Has thanked: 0 time
Been thanked: 0 time


Return to Developers Talk

Who is online

Users browsing this forum: No registered users and 5 guests


Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 5 guests

Login Form