Working out the multi-module maven setup
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Working out the multi-module maven setup
by Chris H. » 11 Nov 2013, 16:17
I see that I can now access the new folders at cardforge. It looks like the url http://cardforge.org/releases/snapshots/forge/forge/ will now only give us the root pom files for future snapshot builds.
The url http://cardforge.org/releases/snapshots/forge/ now includes these new directories:
forge-ai
forge-core
forge-gui
So it looks like those who want to download the newest snapshot builds will need to use this url instead:
http://cardforge.org/releases/snapshots/forge/forge-gui/
and we will find the newest 1.5.5 snapshot dir at this url
http://cardforge.org/releases/snapshots/forge/forge-gui/1.5.5-SNAPSHOT/
Notice!
We recently had a change as of April 20 2014 which moves the snapshot location. Snapshot dirs are now found at
http://cardforge.org/releases/snapshots/forge/forge-gui-desktop/
The url http://cardforge.org/releases/snapshots/forge/ now includes these new directories:
forge-ai
forge-core
forge-gui
http://cardforge.org/releases/snapshots/forge/forge-gui/
and we will find the newest 1.5.5 snapshot dir at this url
http://cardforge.org/releases/snapshots/forge/forge-gui/1.5.5-SNAPSHOT/
Notice!
We recently had a change as of April 20 2014 which moves the snapshot location. Snapshot dirs are now found at
http://cardforge.org/releases/snapshots/forge/forge-gui-desktop/
-
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: Working out the multi-module maven setup
by Max mtg » 11 Nov 2013, 18:16
If anyone is to add any project to forge, possibly that "rules" and "cards" separation or console application, which actions are to be taken?
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: Working out the multi-module maven setup
by jendave » 11 Nov 2013, 18:57
If you mean what steps are needed to add new modules to the Forge project, luckily most of the heavy lifting has been done. All you have to do to create a new module is copy the directory structure (and pom.xml) of one of the current modules (forge-ai may be best) and change the names in the pom.xml. You then need to add the <module> entry to the parent pom.xml. The only caveat there is that make sure that the module is listed after any other modules it may depend on. Usually though, it becomes pretty obvious what to do when you build it for the first time and get the errors.Max mtg wrote:If anyone is to add any project to forge, possibly that "rules" and "cards" separation or console application, which actions are to be taken?
Re: Working out the multi-module maven setup
by friarsol » 12 Nov 2013, 01:40
The last errors only popped up after I started doing other things when nothing else worked. Closing/reopening the project didn't matter. Restarting the machine didn't matter. Upgrading Maven didn't seem to matter. I've given up on Eclipse and am trying IntelliJ IDEA now. Seems to be working better than Eclipse did. Hopefully I won't run into other issues.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Working out the multi-module maven setup
by jendave » 12 Nov 2013, 08:33
You should have better results with IntelliJ. It is what I use. The Maven integration is much better.friarsol wrote:The last errors only popped up after I started doing other things when nothing else worked. Closing/reopening the project didn't matter. Restarting the machine didn't matter. Upgrading Maven didn't seem to matter. I've given up on Eclipse and am trying IntelliJ IDEA now. Seems to be working better than Eclipse did. Hopefully I won't run into other issues.
Re: Working out the multi-module maven setup
by drdev » 12 Nov 2013, 17:06
I brought up my plan here, but I wanted to make sure making changes to most card script files wasn't going to cause a conflict with things moving around. If I commit the changes tonight or tomorrow, will that be ok?
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Working out the multi-module maven setup
by Chris H. » 16 Nov 2013, 14:44
After updating to the head version (rev 23687) I attempted to do a snapshot build and deploy but my project now has these build errors:
- Code: Select all
Missing artifact forge:forge-ai:jar:1.5.6-SNAPSHOT pom.xml /forge-gui line 166 Maven Dependency Problem
Missing artifact forge:forge-core:jar:1.5.6-SNAPSHOT pom.xml /forge-gui line 161 Maven Dependency Problem
The container 'Maven Dependencies' references non existing library '/Users/me/.m2/repository/forge/forge-core/1.5.6-SNAPSHOT/forge-core-1.5.6-SNAPSHOT.jar' forge-gui Build path Build Path Problem
The project cannot be built until build path errors are resolved forge-gui Unknown Java Problem
-
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: Working out the multi-module maven setup
by Chris H. » 20 Nov 2013, 15:31
I finally figured out how to fix the errors and was able to do a snapshot build and deploy today.
At first I noticed that I had only the root and forge-gui projects listed so I Imported Existing Maven Projects and added the other two. This did not resolve the issue.
I then did a google search on:
and found a suggestion to Update the project configuration and to update snapshots and this took care of the problem for me.
At first I noticed that I had only the root and forge-gui projects listed so I Imported Existing Maven Projects and added the other two. This did not resolve the issue.
I then did a google search on:
The container 'Maven Dependencies' references non existing library
and found a suggestion to Update the project configuration and to update snapshots and this took care of the problem for me.
-
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: Working out the multi-module maven setup
by Max mtg » 20 Nov 2013, 20:33
It looks like, there will be a fourh module, named 'game' (and later on the fifth one standing for network).
The 'game' module will import 'core' and hold all code that is used to run a magic game, but it won't include specific code for any player (only the base player class). So that core will keep all the basic things, that are preserved between games, and gui holds the imahe cache and all those controllers, prerefernces and quests.
What do you think of this?
The 'game' module will import 'core' and hold all code that is used to run a magic game, but it won't include specific code for any player (only the base player class). So that core will keep all the basic things, that are preserved between games, and gui holds the imahe cache and all those controllers, prerefernces and quests.
What do you think of this?
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: Working out the multi-module maven setup
by Max mtg » 21 Nov 2013, 23:01
Noone has replied... so it looks like there are no objection.
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: Working out the multi-module maven setup
by drdev » 22 Nov 2013, 01:27
I can't run Forge now because it's looking for cards at this path, which is hard-coded in the new file forge.profile.properties that Max added. I'm running Windows and there is no A directory, so Forge crashes on startup.
cardPicsDir=A:\\mtg\\images
EDIT: So it appears this file was committed to SVN by accident. Deleting it on my end fixed the startup crash for me, so I committed deleting it back to SVN, as well as adding that file to the SVN ignore list.
Max, let me know if adding this file to SVN was intentional, and I'll revert the changes I just committed.
cardPicsDir=A:\\mtg\\images
EDIT: So it appears this file was committed to SVN by accident. Deleting it on my end fixed the startup crash for me, so I committed deleting it back to SVN, as well as adding that file to the SVN ignore list.
Max, let me know if adding this file to SVN was intentional, and I'll revert the changes I just committed.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Working out the multi-module maven setup
by Max mtg » 22 Nov 2013, 08:27
I am sorry, added my .properties by accident.
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: Working out the multi-module maven setup
by drdev » 13 Dec 2013, 18:39
Now that we're working towards breaking things up into modules, how feasible would it be to have multiple gui modules, one that uses Java Swing and one that uses Android XML? It'd be awesome if we could have both a PC version and a tablet version, and given that all code is already in Java, it'd just be a matter of creating a new GUI module for Android without Swing that uses the same back-end modules like forge-core, forge-ai, and forge-game.
I've actually thought about trying my hand at Android development in the past, and would be interested in tackling the challenge of designing a Forge UI that would work on an Android tablet (and maybe even phones).
I'm curious how many people would be interested in that if it is feasible.
I've actually thought about trying my hand at Android development in the past, and would be interested in tackling the challenge of designing a Forge UI that would work on an Android tablet (and maybe even phones).
I'm curious how many people would be interested in that if it is feasible.
- drdev
- Programmer
- Posts: 1958
- Joined: 27 Jul 2013, 02:07
- Has thanked: 189 times
- Been thanked: 565 times
Re: Working out the multi-module maven setup
by squee1968 » 13 Dec 2013, 19:45
I've been considering buying a tablet, and have had to limit myself to windows tablets just because any tablet I would buy would HAVE to be able to run Forge. So I, for one, would be very interested if there was an Android version of Forge, as it would expand my options tremendously. Not to mention reduce the cost. And I'm sure I'm not the only one.
Re: Working out the multi-module maven setup
by timmermac » 13 Dec 2013, 20:32
I would be all kinds of thrilled if I could play forge on my EVO 4G LTE.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
Who is online
Users browsing this forum: Google [Bot] and 12 guests