Maven build file - generation of OSX, Windows, Linux files
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Maven build file - generation of OSX, Windows, Linux fil
by friarsol » 15 Jul 2011, 17:02
This is used by perSetTrackingInfo (which someone else wrote) and eventually I want the setInfoScript to convert to use this instead of how it currently works. All of these scripts (and the mtgdata file) are handy for development but are not needed in the final package.Rob Cashwalker wrote:There's a file mtg-data.txt. I'm guessing it's used by one of Sol's python scripts, but we probably don't need to include it in the beta release.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Maven build file - generation of OSX, Windows, Linux fil
by Braids » 15 Jul 2011, 18:19
is there an easy way to get the warnings generated by http://cardforge.googlecode.com/svn/site/checkstyle.html and http://cardforge.googlecode.com/svn/site/findbugs.html for a specific class or package? those pages are too long for my lesser machine.
is there an eclipse integration that shows these in the Problems view or similar?
edit 1. i suggest we make project-specific settings for style especially for not using tabs. all of eclipse helios's defaults use tabs only or mix tabs with spaces.
is there an eclipse integration that shows these in the Problems view or similar?
edit 1. i suggest we make project-specific settings for style especially for not using tabs. all of eclipse helios's defaults use tabs only or mix tabs with spaces.
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. 

-
Braids - Programmer
- Posts: 556
- Joined: 22 Jun 2011, 00:39
- Location: Unknown. Hobby: Driving myself and others to constructive madness.
- Has thanked: 1 time
- Been thanked: 1 time
Re: Maven build file - generation of OSX, Windows, Linux fil
by Snacko » 15 Jul 2011, 21:55
Checkstyle and Findbugs plugins via Eclipse marketplace.
Re: Maven build file - generation of OSX, Windows, Linux fil
by Chris H. » 17 Jul 2011, 02:34
I looked at the CheckStyle report and found the list of problems with the CardFActory_Auras class. It was interesting reading. Most of this list was in reference to lines being longer than 80 characters.
There were several other minor issues with this class and I think that Itook care of most of them. The lines longer than 80 characters I ignored. Is there someway to tune the report so that we only get a report on long lines over, say 120 chars or so?
There were several other minor issues with this class and I think that Itook care of most of them. The lines longer than 80 characters I ignored. Is there someway to tune the report so that we only get a report on long lines over, say 120 chars or so?
-
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: Maven build file - generation of OSX, Windows, Linux fil
by jendave » 17 Jul 2011, 04:35
Probably, I will look into it. I already set up a custom ruleset for Checkstyle, so I can jsut add it to that.Chris H. wrote:I looked at the CheckStyle report and found the list of problems with the CardFActory_Auras class. It was interesting reading. Most of this list was in reference to lines being longer than 80 characters.
There were several other minor issues with this class and I think that Itook care of most of them. The lines longer than 80 characters I ignored. Is there someway to tune the report so that we only get a report on long lines over, say 120 chars or so?
Dave
Re: Maven build file - generation of OSX, Windows, Linux fil
by jendave » 17 Jul 2011, 06:09
Fixed r10832jendave wrote:Probably, I will look into it. I already set up a custom ruleset for Checkstyle, so I can jsut add it to that.Chris H. wrote:I looked at the CheckStyle report and found the list of problems with the CardFActory_Auras class. It was interesting reading. Most of this list was in reference to lines being longer than 80 characters.
There were several other minor issues with this class and I think that Itook care of most of them. The lines longer than 80 characters I ignored. Is there someway to tune the report so that we only get a report on long lines over, say 120 chars or so?
Dave
Re: Maven build file - generation of OSX, Windows, Linux fil
by Chris H. » 17 Jul 2011, 13:38
`jendave wrote:Fixed r10832
Thank you Dave.
We might be able to take care of a few of the style items that are reported.
-
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: Maven build file - generation of OSX, Windows, Linux fil
by Rob Cashwalker » 10 Aug 2011, 14:04
In the error reports, we have $Revision$. Maven can do the replacement right? We have a properties file entry that could hold the revision as well, right? This could be useful data for the bug report gui.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Maven build file - generation of OSX, Windows, Linux fil
by jendave » 10 Aug 2011, 14:25
Yes. Maven can do replacment. In fact, I use the replacement functionality when creating the linux Forge.sh script.Rob Cashwalker wrote:In the error reports, we have $Revision$. Maven can do the replacement right? We have a properties file entry that could hold the revision as well, right? This could be useful data for the bug report gui.
Re: Maven build file - generation of OSX, Windows, Linux fil
by Rob Cashwalker » 10 Aug 2011, 15:11
Then the question was if Maven had access to the SVN revision number? (or for that matter Git revision code, which is why I was researching it at the time...)
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Maven build file - generation of OSX, Windows, Linux fil
by jendave » 10 Aug 2011, 16:24
Yes, there is a plugin that will grab the SVN (or GIT, Mercurial) rev number. The best place to put it would be in the manifest file. Then your Mantis code could grab it. I am also going to use it to stamp the snapshot names. The snapshots usually have a timestamp, but it would be better to use the rev number.Rob Cashwalker wrote:Then the question was if Maven had access to the SVN revision number? (or for that matter Git revision code, which is why I was researching it at the time...)
Re: Maven build file - generation of OSX, Windows, Linux fil
by jendave » 10 Aug 2011, 17:00
done.jendave wrote:Yes, there is a plugin that will grab the SVN (or GIT, Mercurial) rev number. The best place to put it would be in the manifest file. Then your Mantis code could grab it. I am also going to use it to stamp the snapshot names. The snapshots usually have a timestamp, but it would be better to use the rev number.Rob Cashwalker wrote:Then the question was if Maven had access to the SVN revision number? (or for that matter Git revision code, which is why I was researching it at the time...)
The manifest file now includes a new parameter - "Implementation-Build"
[dhudson_mbp41] META-INF > cat MANIFEST.MF
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: dhudson
Build-Jdk: 1.6.0_26
Implementation-Title: Forge
Implementation-Version: 1.1.2-SNAPSHOT
Implementation-Vendor-Id: forge
Implementation-Vendor: CardForge
Main-Class: forge.Gui_NewGame
Implementation-Build: 9734 <----- SVN Rev
Here is a simple code snippet.
- Code: Select all
File manifestFile = new File(appServerHome, "META-INF/MANIFEST.MF");
Manifest mf = new Manifest();
mf.read(new FileInputStream(manifestFile));
Attributes atts = mf.getMainAttributes();
System.out.println("Version: " + atts.getValue("Implementation-Version"));
System.out.println("Build: " + atts.getValue("Implementation-Build"));
Last edited by jendave on 10 Aug 2011, 22:47, edited 1 time in total.
Re: Maven build file - generation of OSX, Windows, Linux fil
by Rob Cashwalker » 10 Aug 2011, 17:01
Cool... thanks Dave.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Re: Maven build file - generation of OSX, Windows, Linux fil
by moomarc » 10 Aug 2011, 17:14
Can similar code be used to put the rev number on the splash screen or the main UI screen similar to what I did on my concept layout?
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Maven build file - generation of OSX, Windows, Linux fil
by Rob Cashwalker » 10 Aug 2011, 17:15
Yeah, the code dave provided just prints to the console as an example. a little tweaking and it becomes a callable method that can be used by any part of Forge that needs it.
The Force will be with you, Always.
-
Rob Cashwalker - Programmer
- Posts: 2167
- Joined: 09 Sep 2008, 15:09
- Location: New York
- Has thanked: 5 times
- Been thanked: 40 times
Who is online
Users browsing this forum: No registered users and 44 guests