MAGE Join the developers
Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins
MAGE Join the developers
by LevelX » 13 Jun 2013, 20:32
If you have programming knowlege and you want to contribute to the MAGE project, use the following link to get some "getting-started" information.
https://github.com/magefree/mage/wiki/Developer-Getting-Started
Feel free to ask questions here in the forum if you are missing specific information.
https://github.com/magefree/mage/wiki/Developer-Getting-Started
Feel free to ask questions here in the forum if you are missing specific information.
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
Re: MAGE Join the developers
by mluds » 11 Jul 2013, 19:51
Do I need to be a collaborator to contribute or should I create a fork or something? My name is mluds on github.
- mluds
- Posts: 2
- Joined: 11 Jul 2013, 19:45
- Has thanked: 0 time
- Been thanked: 0 time
Re: MAGE Join the developers
by LevelX » 13 Jul 2013, 05:37
Hello mluds,mluds wrote:Do I need to be a collaborator to contribute or should I create a fork or something? My name is mluds on github.
you used a fork to contribute, that's ok.
You're contributions are very welcome.
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
Re: MAGE Join the developers
by mluds » 13 Jul 2013, 20:34
Awesome. I'm a bit new to git, just figured out how to fork and pull request yesterday, so I'll stick with that. Thanks
- mluds
- Posts: 2
- Joined: 11 Jul 2013, 19:45
- Has thanked: 0 time
- Been thanked: 0 time
Re: MAGE Join the developers
by RoyK » 27 Sep 2013, 09:28
I managed to get the project running on my computer using IntelliJ12.
There were some additional steps required to get it running, and since I'm not experienced in Java it took me several hours to figure them out.
For the sake of future developers who want to get this project running on their computer, here's what I did:
Set local repository directory of maven to 'repository' at the root of the project (I am sure it can be configured per project and doesn't need to be a global config but I didn't look into how to do that). This will fix the error where JSPF cannot be found in the repositories. You will have to reimport all maven projects and rebuild them.
Both server and client will search for /config/ folder under the root of the project, I just created that folder and copied the relevant files there.
The config.xml in the repo is missing some attributes, I just copy/pasted the config.xml from the release file (specifically, it threw exception on not being able to find maxUserNameLength).
Then, to run the project in intellij:
1) Run the server by creating a new Application Configuration. Select mage.server.Main as the Main class and select mage-server as the module.
2) Run the client by creating a new Application Configuration. Select mage.client.MageFrame as the main class and select mage-client as the module.
I took some screenshots of the above processes but the forum won't let me post off-site urls... The screenshots can be found here:
http imgur Y5ix9eT,OtRFQRs,2rI0YnJ
There were some additional steps required to get it running, and since I'm not experienced in Java it took me several hours to figure them out.
For the sake of future developers who want to get this project running on their computer, here's what I did:
Set local repository directory of maven to 'repository' at the root of the project (I am sure it can be configured per project and doesn't need to be a global config but I didn't look into how to do that). This will fix the error where JSPF cannot be found in the repositories. You will have to reimport all maven projects and rebuild them.
Both server and client will search for /config/ folder under the root of the project, I just created that folder and copied the relevant files there.
The config.xml in the repo is missing some attributes, I just copy/pasted the config.xml from the release file (specifically, it threw exception on not being able to find maxUserNameLength).
Then, to run the project in intellij:
1) Run the server by creating a new Application Configuration. Select mage.server.Main as the Main class and select mage-server as the module.
2) Run the client by creating a new Application Configuration. Select mage.client.MageFrame as the main class and select mage-client as the module.
I took some screenshots of the above processes but the forum won't let me post off-site urls... The screenshots can be found here:
http imgur Y5ix9eT,OtRFQRs,2rI0YnJ
Re: MAGE Join the developers
by jeffwadsworth » 29 Sep 2013, 03:28
Or just use Netbeans. It has everything you need right off the bat.
- jeffwadsworth
- Super Tester Elite
- Posts: 1171
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 69 times
Re: MAGE Join the developers
by RoyK » 03 Oct 2013, 07:36
TBH I had most of the same issues with netbeans so the above steps should help developers get up and running in both.
Re: MAGE Join the developers
by North » 09 Oct 2013, 19:38
A "mvn install" in the root directory (from the command line) will install the missing artefact or in NetBeans right click and build the root project. You will need to set to use the local maven instalation if you run it from the command line.
For IntelliJ, when running the server or client you need to set the working directory to Mage.Server or Mage.Client. With NetBeans I didn't have this issue.
For IntelliJ, when running the server or client you need to set the working directory to Mage.Server or Mage.Client. With NetBeans I didn't have this issue.
Re: MAGE Join the developers
by oskarolw » 11 Aug 2014, 11:23
I followed the guide linked but after the MageSets fail even though I increased memory. The reason however is that the tests fail. I am not sure if I did something wrong or maybe I just checked out the project at a bad time with an actual bug in it?
Included stacktrace below:
Included stacktrace below:
- | Open
- -------------------------------------------------------------------------------
Test set: org.mage.test.cards.abilities.activated.EquipAbilityTest
-------------------------------------------------------------------------------
Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 3.083 sec <<< FAILURE! - in org.mage.test.cards.abilities.activated.EquipAbilityTest
testEquipHexproof(org.mage.test.cards.abilities.activated.EquipAbilityTest) Time elapsed: 2.645 sec <<< ERROR!
java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file mage/sets/urzassaga/SlipperyKarst
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at mage.util.ClassScanner.findClassesInJar(ClassScanner.java:126)
at mage.util.ClassScanner.findClasses(ClassScanner.java:79)
at mage.cards.repository.CardScanner.scan(CardScanner.java:61)
at org.mage.test.serverside.base.impl.CardTestPlayerAPIImpl.<clinit>(CardTestPlayerAPIImpl.java:40)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:209)
at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:258)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:255)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
testEquipShroud(org.mage.test.cards.abilities.activated.EquipAbilityTest) Time elapsed: 0 sec <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class org.mage.test.cards.abilities.activated.EquipAbilityTest
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:209)
at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:258)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:255)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
testEquipOpponentsCreature(org.mage.test.cards.abilities.activated.EquipAbilityTest) Time elapsed: 0 sec <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class org.mage.test.cards.abilities.activated.EquipAbilityTest
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:209)
at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:258)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:255)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Re: MAGE Join the developers
by LevelX » 11 Aug 2014, 13:43
No this is not correct.
Try to "Clean an build" the project maybe pull project from remote before.
Currently only one test fails, because the problem it tests is not solved yet.
Try to "Clean an build" the project maybe pull project from remote before.
Currently only one test fails, because the problem it tests is not solved yet.
- Code: Select all
Results :
Failed tests:
PersistTest.testUndyingTriggersInTime:130->CardTestPlayerAPIImpl.assertPermanentCount:457 (Battlefield) Card counts are not equal (Soldier) expected:<2> but was:<1>
Tests run: 434, Failures: 1, Errors: 0, Skipped: 6
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
Re: MAGE Join the developers
by fmammal » 12 Aug 2014, 03:40
Hey guys just a heads up, I just found out about the program on the weekend and I think you've done a bangup job. I've made some local commits and intend to start pushing them up soon.
I'm not too familiar with netbeans and am thinking of switching over to idea. My biggest pet peeves at the moment are:
- mage.sets deploys as a jar, and doesn't do an incremental edit if I change one file. It scans all .class files and rebuilds the whole thing. The desktop I'm using is a real POS and this step takes 5-7 minutes. Is there a way it the rest of the project can simply find the compiled classes directly, at least for local development?
- Autocomplete & imports. Netbeans is terrible with this it seems. Ideally I could begin typing a class type and it would autocomplete as if I had gone mage.abilties.foo.bar etc, plus autocomplete constructors, then put the import line in.
Anyways, hope to share in the work soon. Look for @author / git user Tim Haloun
I'm not too familiar with netbeans and am thinking of switching over to idea. My biggest pet peeves at the moment are:
- mage.sets deploys as a jar, and doesn't do an incremental edit if I change one file. It scans all .class files and rebuilds the whole thing. The desktop I'm using is a real POS and this step takes 5-7 minutes. Is there a way it the rest of the project can simply find the compiled classes directly, at least for local development?
- Autocomplete & imports. Netbeans is terrible with this it seems. Ideally I could begin typing a class type and it would autocomplete as if I had gone mage.abilties.foo.bar etc, plus autocomplete constructors, then put the import line in.
Anyways, hope to share in the work soon. Look for @author / git user Tim Haloun
- fmammal
- Posts: 1
- Joined: 12 Aug 2014, 03:22
- Has thanked: 0 time
- Been thanked: 0 time
Re: MAGE Join the developers
by noxx » 12 Aug 2014, 05:11
Hi, fmammal
First of all, welcome to our team!
As for me I use Intelij Idea and I like it more especially as it works better on my computer (from resources point of view). So if you want to switch to it feel free to ask any questions in case of any issue.
Next, I thought I was the only one who experienced this issue with waiting for cards needed to be loaded. It might be related to SQL stuff but what I can suggest is: if you don't add any new card then you can start your server with "-fastDbMode=true" parameter. Then it will start at once.
Finally if you open project in IDEA then you should see in Mage.Server project settings that Mage.Sets is added as module not as a jar. That means that it will be used with a incremental edit as you say. Sorry don't know how it is in Netbeans.
First of all, welcome to our team!
As for me I use Intelij Idea and I like it more especially as it works better on my computer (from resources point of view). So if you want to switch to it feel free to ask any questions in case of any issue.
Next, I thought I was the only one who experienced this issue with waiting for cards needed to be loaded. It might be related to SQL stuff but what I can suggest is: if you don't add any new card then you can start your server with "-fastDbMode=true" parameter. Then it will start at once.
Finally if you open project in IDEA then you should see in Mage.Server project settings that Mage.Sets is added as module not as a jar. That means that it will be used with a incremental edit as you say. Sorry don't know how it is in Netbeans.
Re: MAGE Join the developers
by andyfries » 27 Oct 2014, 00:00
Hey guys,
I just found this project a couple days ago and decided to try to contribute some missing cards.
I've got the repo up in IntelliJ, but when I try to build the server it always fails out with an out of memory exception. I tried increasing the max memory in the JVM to 4GB but that still wasn't enough. Am I doing something wrong here, or does the project just take a ton of resources to build?
I just found this project a couple days ago and decided to try to contribute some missing cards.
I've got the repo up in IntelliJ, but when I try to build the server it always fails out with an out of memory exception. I tried increasing the max memory in the JVM to 4GB but that still wasn't enough. Am I doing something wrong here, or does the project just take a ton of resources to build?
- andyfries
- Posts: 1
- Joined: 26 Oct 2014, 23:56
- Has thanked: 0 time
- Been thanked: 0 time
Re: MAGE Join the developers
by LevelX » 27 Oct 2014, 07:23
Hey Andy,andyfries wrote:Hey guys,
I just found this project a couple days ago and decided to try to contribute some missing cards.
I've got the repo up in IntelliJ, but when I try to build the server it always fails out with an out of memory exception. I tried increasing the max memory in the JVM to 4GB but that still wasn't enough. Am I doing something wrong here, or does the project just take a ton of resources to build?
welcome to the XMage developers.
I don't use IntelliJ so I'm not sure about your issue.
Netbeans (what I use) uses a Maven child process to build the projects.
And this process uses his own memory definition/allocation which you can change with maven options.
For Netbeans it's described here (under point 5).
https://github.com/magefree/mage/wiki/Developer-Getting-Started#netbeans
I guess you can (and probably have to) to a similar definition in IntelliJ to raise the memory the Maven process can use.
Regards
LevelX2
-
LevelX - DEVELOPER
- Posts: 1677
- Joined: 08 Dec 2011, 15:08
- Has thanked: 174 times
- Been thanked: 374 times
Re: MAGE Join the developers
by mnapoleon » 24 Feb 2015, 19:47
Hi guys. I love this program. I wanted to start getting into magic and this program is a great way to do that with out all the initial investment. This will really get me moving in the right direction when I start to play more MTGO and real life magic.
I also happen to be a java developer who was looking for some interesting programming work outside of my boring job. I think I will start doing some card implementation to get familiar with the code and then move into different areas after that.
Thanks for the great product.
I also happen to be a java developer who was looking for some interesting programming work outside of my boring job. I think I will start doing some card implementation to get familiar with the code and then move into different areas after that.
Thanks for the great product.
- mnapoleon
- Posts: 6
- Joined: 12 Feb 2015, 15:22
- Has thanked: 0 time
- Been thanked: 0 time
Who is online
Users browsing this forum: No registered users and 7 guests