Page 8 of 9

Re: Maven build file - generation of OSX, Windows, Linux fil

PostPosted: 15 Jul 2011, 17:02
by friarsol
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.
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.

Re: Maven build file - generation of OSX, Windows, Linux fil

PostPosted: 15 Jul 2011, 18:19
by Braids
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.

Re: Maven build file - generation of OSX, Windows, Linux fil

PostPosted: 15 Jul 2011, 21:55
by Snacko
Checkstyle and Findbugs plugins via Eclipse marketplace.

Re: Maven build file - generation of OSX, Windows, Linux fil

PostPosted: 17 Jul 2011, 02:34
by Chris H.
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?

Re: Maven build file - generation of OSX, Windows, Linux fil

PostPosted: 17 Jul 2011, 04:35
by jendave
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?
Probably, I will look into it. I already set up a custom ruleset for Checkstyle, so I can jsut add it to that.

Dave

Re: Maven build file - generation of OSX, Windows, Linux fil

PostPosted: 17 Jul 2011, 06:09
by jendave
jendave wrote:
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?
Probably, I will look into it. I already set up a custom ruleset for Checkstyle, so I can jsut add it to that.

Dave
Fixed r10832

Re: Maven build file - generation of OSX, Windows, Linux fil

PostPosted: 17 Jul 2011, 13:38
by Chris H.
jendave wrote:Fixed r10832
`
Thank you Dave.

We might be able to take care of a few of the style items that are reported.

Re: Maven build file - generation of OSX, Windows, Linux fil

PostPosted: 10 Aug 2011, 14:04
by Rob Cashwalker
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

PostPosted: 10 Aug 2011, 14:25
by jendave
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.
Yes. Maven can do replacment. In fact, I use the replacement functionality when creating the linux Forge.sh script.

Re: Maven build file - generation of OSX, Windows, Linux fil

PostPosted: 10 Aug 2011, 15:11
by Rob Cashwalker
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

PostPosted: 10 Aug 2011, 16:24
by jendave
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...)
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.

Re: Maven build file - generation of OSX, Windows, Linux fil

PostPosted: 10 Aug 2011, 17:00
by jendave
jendave wrote:
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...)
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.
done.

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"));

Re: Maven build file - generation of OSX, Windows, Linux fil

PostPosted: 10 Aug 2011, 17:01
by Rob Cashwalker
Cool... thanks Dave.

Re: Maven build file - generation of OSX, Windows, Linux fil

PostPosted: 10 Aug 2011, 17:14
by moomarc
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?

Re: Maven build file - generation of OSX, Windows, Linux fil

PostPosted: 10 Aug 2011, 17:15
by Rob Cashwalker
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.