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. » 09 Nov 2013, 15:35
Chris H. wrote:I then launched Eclipse and had it open my workspace folder. I then used a Maven command to build a local copy and it worked. The archive does not include the CHANGES.txt, LICENSE.txt, forge.profile.properties.example and README.txt files.
I moved the CHANGES.txt, LICENSE.txt, forge.profile.properties.example and README.txt files to forge-gui folder. I built a local archive via Maven and these files are now included in the archive.
Last edited by Chris H. on 10 Nov 2013, 16:49, edited 1 time in total.
Reason: subject change
Reason: subject change
-
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. » 09 Nov 2013, 15:48
I attempted to do a snapshot build and delpoy to cardforge and it ended in a build failure:
- Code: Select all
Last login: Sat Nov 9 09:55:13 on ttys000
CardForge-2:~ me$ /Users/me/\ My\ Desktop/Snapshot\ Temp\ no\ tests.command ; exit;
At revision 23616.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Forge Parent
[INFO] Forge Core
[INFO] Forge AI
[INFO] Forge
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Forge Parent 1.5.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ forge ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Forge Core 1.5.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ forge-core ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Forge AI 1.5.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ forge-ai ---
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Forge 1.5.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ forge-gui ---
[INFO] Deleting /Users/me/Workspace_SVN/ForgeSVN/forge-gui/target
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Forge Parent 1.5.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.0:clean (default-cli) @ forge ---
[INFO] Cleaning up after release...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Forge Parent 1.5.5-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ forge ---
[INFO] Installing /Users/me/Workspace_SVN/ForgeSVN/pom.xml to /Users/me/.m2/repository/forge/forge/1.5.5-SNAPSHOT/forge-1.5.5-SNAPSHOT.pom
[INFO]
[INFO] --- maven-site-plugin:2.0.1:site (default-site) @ forge ---
Downloading: http://repo1.maven.org/maven2/org/mortbay/jetty/jetty/6.1.5/jetty-6.1.5.pom
Downloaded: http://repo1.maven.org/maven2/org/mortbay/jetty/jetty/6.1.5/jetty-6.1.5.pom (5 KB at 5.8 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/mortbay/jetty/project/6.1.5/project-6.1.5.pom
Downloaded: http://repo1.maven.org/maven2/org/mortbay/jetty/project/6.1.5/project-6.1.5.pom (13 KB at 126.3 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/mortbay/jetty/jetty-util/6.1.5/jetty-util-6.1.5.pom
Downloaded: http://repo1.maven.org/maven2/org/mortbay/jetty/jetty-util/6.1.5/jetty-util-6.1.5.pom (4 KB at 40.1 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/mortbay/jetty/servlet-api-2.5/6.1.5/servlet-api-2.5-6.1.5.pom
Downloaded: http://repo1.maven.org/maven2/org/mortbay/jetty/servlet-api-2.5/6.1.5/servlet-api-2.5-6.1.5.pom (4 KB at 41.4 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/mortbay/jetty/jetty/6.1.5/jetty-6.1.5.jar
Downloading: http://repo1.maven.org/maven2/org/mortbay/jetty/jetty-util/6.1.5/jetty-util-6.1.5.jar
Downloading: http://repo1.maven.org/maven2/org/mortbay/jetty/servlet-api-2.5/6.1.5/servlet-api-2.5-6.1.5.jar
Downloaded: http://repo1.maven.org/maven2/org/mortbay/jetty/servlet-api-2.5/6.1.5/servlet-api-2.5-6.1.5.jar (130 KB at 370.8 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/mortbay/jetty/jetty-util/6.1.5/jetty-util-6.1.5.jar (135 KB at 375.8 KB/sec)
Downloaded: http://repo1.maven.org/maven2/org/mortbay/jetty/jetty/6.1.5/jetty-6.1.5.jar (475 KB at 825.2 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/skins/maven-default-skin/maven-metadata.xml (370 B at 3.1 KB/sec)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/skins/maven-default-skin/1.1/maven-default-skin-1.1.jar
Downloaded: http://repo1.maven.org/maven2/org/apache/maven/skins/maven-default-skin/1.1/maven-default-skin-1.1.jar (13 KB at 123.7 KB/sec)
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ forge ---
[INFO] Installing /Users/me/Workspace_SVN/ForgeSVN/pom.xml to /Users/me/.m2/repository/forge/forge/1.5.5-SNAPSHOT/forge-1.5.5-SNAPSHOT.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.5:deploy (default-deploy) @ forge ---
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Forge Parent ...................................... FAILURE [3.796s]
[INFO] Forge Core ........................................ SUCCESS [0.004s]
[INFO] Forge AI .......................................... SUCCESS [0.003s]
[INFO] Forge ............................................. SUCCESS [0.124s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.967s
[INFO] Finished at: Sat Nov 09 10:36:30 EST 2013
[INFO] Final Memory: 14M/151M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy (default-deploy) on project forge: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
logout
[Process completed]
Last edited by Chris H. on 10 Nov 2013, 16:48, edited 1 time in total.
Reason: subject change
Reason: subject change
-
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 jendave » 09 Nov 2013, 19:10
Chris - regarding the snapshot deploy issue, I'll take a look. I know what the problem is, but I may not have time until Sunday.
Last edited by Chris H. on 10 Nov 2013, 16:48, edited 1 time in total.
Reason: subject change
Reason: subject change
Re: Working out the multi-module maven setup
by Chris H. » 09 Nov 2013, 19:37
jendave wrote:Chris - regarding the snapshot deploy issue, I'll take a look. I know what the problem is, but I may not have time until Sunday.
Thank you Dave.
I did a google search on the error message and I guess that the original distributionManagement element needs to be moved to a different pom file and/or it needs some adjustments to make it work.
Last edited by Chris H. on 10 Nov 2013, 16:47, edited 1 time in total.
Reason: subject change
Reason: subject change
-
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 ptx » 10 Nov 2013, 08:08
Nice to see that (even though I did not do anything
), the multi-module maven setup seems to be moving swiftly after an apparent long impasse!
We might run into some more similar issues to the ones you guys already solved (or are still solving). I noticed for example that checkstyle probably won't work yet, as it's config file is still looking for source code in the old location. I did not yet attempt fixing it, because I'm still busy getting everything set up and exploring. Other plugins and configuration files might have similar issues though...
On the subject of getting everything set up, my current configuration seems to build and run fine, but I wanted to quickly run it by you guys to make sure I did everything right. And, also, to make sure we are all in agreement about what the right way is, so we can update the "getting started" guide on the wiki once everything stabilizes a bit
I initially did what the guide currently says, create a new project by importing the SVN trunk. This gave me a ForgeLocal project, but that wouldn't compile etc. Based on what you guys said in the thread, I then created 3 additional projects by importing the separate modules as individual projects. They initially had some build errors too, but once I "closed" the main project, everything was good to go.
I reckon we should keep this thread for the discussion about ironing out all initial kinks of the multi-module setup (I'll see if I have sufficient rights to modify the thread name to reflect it's content a bit better).
Later this weekend (or somewhere in the following week, depending on how much time I have) I'll probably post a separate thread about my initial findings regarding testing, as well as some initial test-code (temporary, but maybe already useful)

We might run into some more similar issues to the ones you guys already solved (or are still solving). I noticed for example that checkstyle probably won't work yet, as it's config file is still looking for source code in the old location. I did not yet attempt fixing it, because I'm still busy getting everything set up and exploring. Other plugins and configuration files might have similar issues though...
On the subject of getting everything set up, my current configuration seems to build and run fine, but I wanted to quickly run it by you guys to make sure I did everything right. And, also, to make sure we are all in agreement about what the right way is, so we can update the "getting started" guide on the wiki once everything stabilizes a bit

I initially did what the guide currently says, create a new project by importing the SVN trunk. This gave me a ForgeLocal project, but that wouldn't compile etc. Based on what you guys said in the thread, I then created 3 additional projects by importing the separate modules as individual projects. They initially had some build errors too, but once I "closed" the main project, everything was good to go.
I reckon we should keep this thread for the discussion about ironing out all initial kinks of the multi-module setup (I'll see if I have sufficient rights to modify the thread name to reflect it's content a bit better).
Later this weekend (or somewhere in the following week, depending on how much time I have) I'll probably post a separate thread about my initial findings regarding testing, as well as some initial test-code (temporary, but maybe already useful)
Last edited by Chris H. on 10 Nov 2013, 16:47, edited 1 time in total.
Reason: subject change
Reason: subject change
Re: Working out the multi-module maven setup
by friarsol » 10 Nov 2013, 13:59
Is anyone else unable to compile? My forge-core has like 8 errors due to overriding inherited functions. It doesn't look particularly wrong. Things were working on Friday when I re-imported the project, but since a few files moved over to the split, they haven't seem to.
- Errors | Open
- Description Resource Path Location Type
The method compareTo(CardType) of type CardType must override a superclass method CardType.java /forge-core/src/main/java/forge/card line 213 Java Problem
The method compareTo(ColorSet) of type ColorSet must override a superclass method ColorSet.java /forge-core/src/main/java/forge/card line 185 Java Problem
The method compareTo(ManaCost) of type ManaCost must override a superclass method ManaCost.java /forge-core/src/main/java/forge/card/mana line 206 Java Problem
The method getTotalColorlessCost() of type ManaCostParser must override a superclass method ManaCostParser.java /forge-core/src/main/java/forge/card/mana line 33 Java Problem
The method hasNext() of type ManaCostParser must override a superclass method ManaCostParser.java /forge-core/src/main/java/forge/card/mana line 46 Java Problem
The method next() of type ManaCostParser must override a superclass method ManaCostParser.java /forge-core/src/main/java/forge/card/mana line 56 Java Problem
The method remove() of type ManaCostParser must override a superclass method ManaCostParser.java /forge-core/src/main/java/forge/card/mana line 74 Java Problem
- 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 Sloth » 10 Nov 2013, 14:56
I have the same Problems, but i can still compile by clicking Proceed.friarsol wrote:Is anyone else unable to compile? My forge-core has like 8 errors due to overriding inherited functions. It doesn't look particularly wrong. Things were working on Friday when I re-imported the project, but since a few files moved over to the split, they haven't seem to.
- Errors | Open
- Description Resource Path Location Type
The method compareTo(CardType) of type CardType must override a superclass method CardType.java /forge-core/src/main/java/forge/card line 213 Java Problem
The method compareTo(ColorSet) of type ColorSet must override a superclass method ColorSet.java /forge-core/src/main/java/forge/card line 185 Java Problem
The method compareTo(ManaCost) of type ManaCost must override a superclass method ManaCost.java /forge-core/src/main/java/forge/card/mana line 206 Java Problem
The method getTotalColorlessCost() of type ManaCostParser must override a superclass method ManaCostParser.java /forge-core/src/main/java/forge/card/mana line 33 Java Problem
The method hasNext() of type ManaCostParser must override a superclass method ManaCostParser.java /forge-core/src/main/java/forge/card/mana line 46 Java Problem
The method next() of type ManaCostParser must override a superclass method ManaCostParser.java /forge-core/src/main/java/forge/card/mana line 56 Java Problem
The method remove() of type ManaCostParser must override a superclass method ManaCostParser.java /forge-core/src/main/java/forge/card/mana line 74 Java Problem
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Working out the multi-module maven setup
by Chris H. » 10 Nov 2013, 16:43
My local copy builds OK but I imported the project after Max had moved a few files over.
-
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 » 10 Nov 2013, 20:53
If you have the root project imported into Eclipse workspace, a single click on update (from the context menu of project) should be sufficient.friarsol wrote:Is anyone else unable to compile? My forge-core has like 8 errors due to overriding inherited functions. It doesn't look particularly wrong. Things were working on Friday when I re-imported the project, but since a few files moved over to the split, they haven't seem to.
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 friarsol » 11 Nov 2013, 00:30
Are you saying update Maven? I did that, but it didn't seem to do anything. I still have compile errors listed, and if I do the proceed thing that Sloth mentioned below it works ok, until the first time one of those compilation errors get run. I've also re-deleted and re-imported the project. So, I'm pretty much in a completely broken state right now.Max mtg wrote:If you have the root project imported into Eclipse workspace, a single click on update (from the context menu of project) should be sufficient.
- 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 Max mtg » 11 Nov 2013, 08:04
No I didn't mean maven, maven version mismatch is identified with a different error message.
It's hard to guess what's wrong with your projects setup.
You say you've re-deleted and re-imported the project. Does that refer to a single project like core/gui or to the root project?
Do your projects loaded in Eclipse look like the picture attached? (ignore the red crosses - those are my further class translation compile errors)
It's hard to guess what's wrong with your projects setup.
You say you've re-deleted and re-imported the project. Does that refer to a single project like core/gui or to the root project?
Do your projects loaded in Eclipse look like the picture attached? (ignore the red crosses - those are my further class translation compile errors)
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 friarsol » 11 Nov 2013, 13:05
Yep looks like that. Ironically, I have the same red crosses due to the inheritance "Errors" there's no context menu option called "Update"Max mtg wrote:No I didn't mean maven, maven version mismatch is identified with a different error message.
It's hard to guess what's wrong with your projects setup.
You say you've re-deleted and re-imported the project. Does that refer to a single project like core/gui or to the root project?
Do your projects loaded in Eclipse look like the picture attached? (ignore the red crosses - those are my further class translation compile errors)
To clarify, I do have 4 project folders in Eclipse, where before the split, I used to only have one. It refers to the root project, which is the same thing I did the other day.
http://imgur.com/tft5pHN
- 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 ptx » 11 Nov 2013, 13:46
Have you tried closing the main project? I do not know exactly why it would make a difference, but for me it helped.friarsol wrote:Yep looks like that. Ironically, I have the same red crosses due to the inheritance "Errors" there's no context menu option called "Update"Max mtg wrote:No I didn't mean maven, maven version mismatch is identified with a different error message.
It's hard to guess what's wrong with your projects setup.
You say you've re-deleted and re-imported the project. Does that refer to a single project like core/gui or to the root project?
Do your projects loaded in Eclipse look like the picture attached? (ignore the red crosses - those are my further class translation compile errors)
To clarify, I do have 4 project folders in Eclipse, where before the split, I used to only have one. It refers to the root project, which is the same thing I did the other day.
http://imgur.com/tft5pHN
Re: Working out the multi-module maven setup
by Max mtg » 11 Nov 2013, 14:00
@sol, the last 6 errors indicate you have to upgrade maven to 3.1.x - don't forget to check the environment variables
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 Chris H. » 11 Nov 2013, 14:34
My local copy is now at rev 23632. I attempted a snapshot build and deploy to cardfogre. I receive a BUILD SUCCESS at the end.
But http://cardforge.org/releases/snapshots/forge/forge/1.5.5-SNAPSHOT/ does not show today's build.
Looking at the text in my terminal window it looks like Maven is uploading the files to a new directory.
Uploading: ftp.cardforge.org/snapshots/forge/forge-gui/1.5.5-SNAPSHOT/forge-gui-1.5.5-20131111.135511-1.tar.bz2
Uploaded: ftp.cardforge.org/snapshots/forge/forge-gui/1.5.5-SNAPSHOT/forge-gui-1.5.5-20131111.135511-1.tar.bz2 (34119 KB at 43407.9 KB/sec)
From my prospective cardforge will not allow access to this new directory and I have not been able to access this new archive from my web browser.
The older snapshots can be found at
http://cardforge.org/releases/snapshots/forge/forge/
but today's snapshot is found at
http://cardforge.org/releases/snapshots/forge/forge-gui/
But http://cardforge.org/releases/snapshots/forge/forge/1.5.5-SNAPSHOT/ does not show today's build.
Looking at the text in my terminal window it looks like Maven is uploading the files to a new directory.
Uploading: ftp.cardforge.org/snapshots/forge/forge-gui/1.5.5-SNAPSHOT/forge-gui-1.5.5-20131111.135511-1.tar.bz2
Uploaded: ftp.cardforge.org/snapshots/forge/forge-gui/1.5.5-SNAPSHOT/forge-gui-1.5.5-20131111.135511-1.tar.bz2 (34119 KB at 43407.9 KB/sec)
From my prospective cardforge will not allow access to this new directory and I have not been able to access this new archive from my web browser.
The older snapshots can be found at
http://cardforge.org/releases/snapshots/forge/forge/
but today's snapshot is found at
http://cardforge.org/releases/snapshots/forge/forge-gui/
- Attachments
-
log.txt.zip
- (18.37 KiB) Downloaded 404 times
-
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
Who is online
Users browsing this forum: No registered users and 34 guests