It is currently 19 Apr 2024, 01:53
   
Text Size

How to get started?

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: How to get started?

Postby Chris H. » 26 Nov 2013, 16:18

oskarolw, you will find additional info at Working out the multi-module maven setup.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: How to get started?

Postby oskarolw » 28 Nov 2013, 09:54

Thanks, I can once again compile and run now. Removing trunk did the trick :)
oskarolw
 
Posts: 39
Joined: 06 Jul 2012, 08:51
Has thanked: 0 time
Been thanked: 2 times

Re: How to get started?

Postby oskarolw » 03 Dec 2013, 12:38

I once again cannot compile no matter what. I get tons of errors most of which say something like:

Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile failed. (org.apache.maven.plugins:maven-compiler-plugin:3.1:compile:default-compile:compile) pom.xml /forge-ai line 6 Maven Build Problem


I even tried running IntelliJ IDEA instead of Eclipse but I can't get that to compile either, there I got some kind of issue with Maven aswell. There are tons of errors here aswell but it seems that it won't accept my maven installation (which I think is included by default) since it sais like "No Maven installation found" even though I have all the functionality and could check out the project.
oskarolw
 
Posts: 39
Joined: 06 Jul 2012, 08:51
Has thanked: 0 time
Been thanked: 2 times

Re: How to get started?

Postby Max mtg » 03 Dec 2013, 15:59

Today I had a similiar issue. Solved it by running "mvn install" from command line in the root folder. After I had clicked 'refresh' in eclipse context menu (right click on root project) the project agreed to compile and run from the named IDE.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: How to get started?

Postby Xitax » 01 Feb 2014, 17:43

Hey guys, I know I've been around forever, but I want to work on some card scripts and tokens. I don't want to mess with any Java, so which sections of http://www.slightlymagic.net/wiki/Forge ... he_project actually apply to me?
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: How to get started?

Postby Chris H. » 02 Feb 2014, 03:00

Xitax wrote:Hey guys, I know I've been around forever, but I want to work on some card scripts and tokens. I don't want to mess with any Java, so which sections of http://www.slightlymagic.net/wiki/Forge ... he_project actually apply to me?
 
Hello Xitax, there have been several conversations about changing the card scripts for cards that make tokens. The idea being that we would have them point to specific card pictures. Mark has spent some time doing this for recent new sets but there is additional work that needs to be done to finish off this portion of the project.

Are you offering to help in this are?

If you are it would help if you had a dev system set up on your computer. I just checked and I see that you have commit privileges.

As the card scripts are changed we would also need to have properly named token pics moved to the cardforge site. I think that this would require an FTP app (Cyberduck might be a good choice) and the proper password to the cardforge site.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: How to get started?

Postby Xitax » 02 Feb 2014, 04:21

Yes, that's exactly what I wanted to do.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: How to get started?

Postby Marek14 » 02 Feb 2014, 07:09

If you'd like, Xitax, I keep a current list of tokens in two versions -- with set information and without. Posted it here before, but it gets updated with each set. I also keep up-to-date list of HQ token pictures based on updating a file someone posted here a long time ago.
Marek14
Tester
 
Posts: 2759
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 296 times

Re: How to get started?

Postby Chris H. » 02 Feb 2014, 17:01

Xitax wrote:Yes, that's exactly what I wanted to do.
 
You should now have commit privileges to the Forge repo.

Do you have a dev systems set up on your computer?

If not, then follow the directions found on Forge:How to Get Started Developing Forge. And you should also read the messages located in the Working out the multi-module maven setup topic.

After you have imported the main trunk into Eclipse you will then want to use the

Code: Select all
File -> Import -> Maven: Existing Maven Projects
 
command and add the various modules into your local copy.

At this point the project should build. You should then be able to set up a run configuration and check to see that you can run Forge from within Eclipse.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: How to get started?

Postby Chris H. » 06 Feb 2014, 01:18

If you need some help I am willing to assist.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: How to get started?

Postby oskarolw » 06 Feb 2014, 09:54

Hello again, I will once again try to get my enviroment running! :D

It has worked before but keeps breaking, I have eclipse with maven and I can check out everything and also run the maven->update from gui, it does however give me tons of errors and refuses to compile or run. Mostly it just sais stuff can not be resolved so I'm guessing there is some issue with imports. Any ideas?

Also I have tried reading up on the Maven but could someone explain it like im 5? It's supposed to automate the project testing/setup/structure? Should I have the pom.xmls from the repo or should I delete them?
oskarolw
 
Posts: 39
Joined: 06 Jul 2012, 08:51
Has thanked: 0 time
Been thanked: 2 times

Re: How to get started?

Postby Chris H. » 06 Feb 2014, 16:17

Try

Code: Select all
Project -> Clean… -> Clean all projects
 
I have had to do this on occasion when the project stops building.

If this does not work then

Code: Select all
Edit -> Delete -> Delete project contents on disk
 
This will delete the project from your workspace and from your HD. You should then follow the wiki instructions and

Code: Select all
File -> Import… -> SVN -> Checkout Projects from SVN
 
and make sure that you follow the wiki instructions. :) Then when this is finished,

Code: Select all
File -> Import -> Maven: Existing Maven Projects
 
and at the least select the forge-gui directory. At this point the project should build and you should be able to

Code: Select all
Run -> Run Configurations…
 
and set up a run config which will allow you to run Forge from within the Eclipse environment.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: How to get started?

Postby Max mtg » 06 Feb 2014, 17:31

What helped in my case long ago:
make sure M2_HOME env. variable is set, ensure m2e is installed, then build from console (there was a command like "mvn install") Then open eclipse
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: How to get started?

Postby oskarolw » 07 Feb 2014, 10:14

I really appreciate you guys trying to help me :)

Anyway what I did now was to delete everything like Chris suggested and I then checked out everything under trunk. This seemed to work well enough and I don't get tons of errors anymore. It does not however, run.

When I tried to import from Maven I got a new version of forge-gui which had tons of errors. Do I have to go through Maven or is it enough to just check out from SVN?

I don't quite get how Run Configurations are supposed to work. I can not seem to run anything as Java but I have the options to run as Maven, that gives me some log-output which sais something like:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[INFO] Forge Parent ...................................... SKIPPED
[INFO] Forge Core ........................................ SKIPPED
[INFO] Forge Game ........................................ SKIPPED
[INFO] Forge AI .......................................... SKIPPED
[INFO] Forge Net ......................................... SKIPPED
[INFO] Forge ............................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
oskarolw
 
Posts: 39
Joined: 06 Jul 2012, 08:51
Has thanked: 0 time
Been thanked: 2 times

Re: How to get started?

Postby Max mtg » 07 Feb 2014, 10:41

When you have tons (that is over a thousand) of errors, that means your workspace does not see maven's imports.

What was wrong in the state when you got no errors, but "it did not however, run."? How did you try to make it run?
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 46 guests

cron

Who is online

In total there are 46 users online :: 0 registered, 0 hidden and 46 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 46 guests

Login Form