It is currently 28 Aug 2025, 09:35
   
Text Size

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

Postby friarsol » 15 Jul 2011, 17:02

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.
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

Postby 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.
"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. ;)
User avatar
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

Postby Snacko » 15 Jul 2011, 21:55

Checkstyle and Findbugs plugins via Eclipse marketplace.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

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

Postby 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?
User avatar
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

Postby jendave » 17 Jul 2011, 04:35

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
jendave
 
Posts: 307
Joined: 01 Jun 2008, 07:19
Has thanked: 8 times
Been thanked: 21 times

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

Postby jendave » 17 Jul 2011, 06:09

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
jendave
 
Posts: 307
Joined: 01 Jun 2008, 07:19
Has thanked: 8 times
Been thanked: 21 times

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

Postby 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.
User avatar
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

Postby 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.
User avatar
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

Postby jendave » 10 Aug 2011, 14:25

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.
jendave
 
Posts: 307
Joined: 01 Jun 2008, 07:19
Has thanked: 8 times
Been thanked: 21 times

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

Postby 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.
User avatar
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

Postby jendave » 10 Aug 2011, 16:24

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.
jendave
 
Posts: 307
Joined: 01 Jun 2008, 07:19
Has thanked: 8 times
Been thanked: 21 times

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

Postby jendave » 10 Aug 2011, 17:00

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"));
Last edited by jendave on 10 Aug 2011, 22:47, edited 1 time in total.
jendave
 
Posts: 307
Joined: 01 Jun 2008, 07:19
Has thanked: 8 times
Been thanked: 21 times

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

Postby Rob Cashwalker » 10 Aug 2011, 17:01

Cool... thanks Dave.
The Force will be with you, Always.
User avatar
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

Postby 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
User avatar
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

Postby 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.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 19 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 19 users online :: 0 registered, 0 hidden and 19 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 19 guests

Login Form