It is currently 27 Aug 2025, 09:28
   
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 Chris H. » 12 Jun 2011, 20:34

friarsol wrote:
Chris H. wrote:I think that I will use my old time consuming method to get this next beta out. Afterwards, we might be able to figure out this issue. :D
Can't you just do the build without having it upload to get the local files?

mvn -U clean install
`
I was able to get two archives built but they use jar with dependancies. And they are named forge + snapshot number + jar with dependancies. It is not what I was expecting. It did not get far enough along for me to pick a new snapshot number.

Will the Windows exe launcher work with a jar that is not named run-forge.jar?

Give Dave and I a chance to run through a few tests and try to figure out what is happening.
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 Chris H. » 13 Jun 2011, 13:15

friarsol wrote:Can't you just do the build without having it upload to get the local files?

mvn -U clean install
`
I tried this command again this morning.

This gives me a simple build of the jar-with-dependencies but does not give me the two archives to upload to MediaFire.

There are a couple of support files but this is all I get. At least I get a build success and no failures that I can find.
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 Chris H. » 13 Jun 2011, 13:23

I just checked http://code.google.com/p/cardforge/downloads/list and I found two archives for download from Dave. They were uploaded a couple of days ago.
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 » 13 Jun 2011, 15:00

Sorry Chris, I was offline during the weekend. I finally fixed the issues with the Maven build. It requires some slightly different commands though.

Code: Select all
mvn -U -B clean -P osx,windows-linux install release:clean release:prepare release:perform
Is the full command. This will create packages for OSX and Windows/Linux and upload them to Google. I was able to fix the DMG drag-n-drop issue so the OSX package looks great now. In one of your previous possts, it looks like you are still getting a credentials error however. It may be difficult to fix that.

If you try this:
Code: Select all
mvn -U -B clean -P osx,windows-linux install
you will get SNAPSHOT packages of all platforms. I know, not quite what you want. To create true release packages we will have to solve the credentials problem. As a workaround, I could run the command, upload to Google and you could post the packages to Mediafire and make the announcments etc.

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 Chris H. » 13 Jun 2011, 15:34

jendave wrote:Sorry Chris, I was offline during the weekend. I finally fixed the issues with the Maven build. It requires some slightly different commands though.
`
That is OK, we will work at it.

I will try these new variants of the commands and will get back to you.
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 » 13 Jun 2011, 16:15

Started writing some documentation on the Forge Wiki
http://www.slightlymagic.net/wiki/Forge_Maven_Build_System
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. » 13 Jun 2011, 17:20

I had a question. The windows launcher, forge.exe is built using Launch4j. The pre-existing forge.exe file is hard coded to run a jar file named run-forge.jar.

Did you by any chance update this forge.exe file? Could someone with the WIndows OS download the forge-1.0.12.tar.bz2 file from cardforge and try launching from the forge.exe file?
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 » 13 Jun 2011, 17:29

Chris H. wrote:I had a question. The windows launcher, forge.exe is built using Launch4j. The pre-existing forge.exe file is hard coded to run a jar file named run-forge.jar.

Did you by any chance update this forge.exe file?
Yes. The Maven build process auto-generates a new forge.exe using launch4j every time it creates a build. It puts in the name of the new jar file.
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. » 13 Jun 2011, 18:18

jendave wrote:Yes. The Maven build process auto-generates a new forge.exe using launch4j every time it creates a build. It puts in the name of the new jar file.
`
Thank you.

I now have two shell script commands that work. Once does a snapshot package build and the other does a "mvn clean release:clean".

I will now try the full package build and upload to GoogleCode.
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 Chris H. » 13 Jun 2011, 18:57

Chris H. wrote:I will now try the full package build and upload to GoogleCode.
`
Things appear to be looking good.

I used the command

Code: Select all
mvn -U -B clean -P osx,windows-linux install release:clean release:prepare release:perform
`
BUT I also added the username and password fields from last week to the end of the above command.

We now have forge-1.0.13 archives located on http://code.google.com/p/cardforge/downloads/list.
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 » 13 Jun 2011, 19:04

Chris H. wrote:
Chris H. wrote:I will now try the full package build and upload to GoogleCode.
`
Things appear to be looking good.

I used the command

Code: Select all
mvn -U -B clean -P osx,windows-linux install release:clean release:prepare release:perform
`
BUT I also added the username and password fields from last week to the end of the above command.

We now have forge-1.0.13 archives located on http://code.google.com/p/cardforge/downloads/list.
Great! I tested out your packages. The Mac and Linux packages work. I have not tried Windows yet (I have to fire up a VM for that). I'll add the -Dusername -Dpassword items to the wiki doc. Thanks for all of the hard work testing out the Maven build. I can start working on other part of Forge now :-D
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. » 13 Jun 2011, 19:14

jendave wrote:Great! I tested out your packages. The Mac and Linux packages work. I have not tried Windows yet (I have to fire up a VM for that). I'll add the -Dusername -Dpassword items to the wiki doc. Thanks for all of the hard work testing out the Maven build. I can start working on other part of Forge now :-D
`
It was interesting figuring out how to get this working.

And thank you for putting this build and release system together.
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 » 25 Jun 2011, 20:37

why is the forge.exe 11+ MB? It seems like it must have the jar file inside of it. This isn't how the previous forge.exe worked. It doubles the size of the release package.
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 Chris H. » 01 Jul 2011, 16:17

Using rev10266 I attempted to do a Snapshot Package Build - local archives only:

Code: Select all
mvn -U -B clean -P osx,windows-linux install
`
and got the following error in the terminal:

Code: Select all
Last login: Fri Jul  1 10:43:10 on ttys000
/Users/chrish/Desktop/Forge/Maven\ Build\ File/\ Commands/Snapshot\ Package\ Build\ -\ local\ archives\ only.command ; exit;
Macintosh:~ chrish$ /Users/chrish/Desktop/Forge/Maven\ Build\ File/\ Commands/Snapshot\ Package\ Build\ -\ local\ archives\ only.command ; exit;
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Forge 1.0.15-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.google.code.jyield:jyield:jar:1.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.266s
[INFO] Finished at: Fri Jul 01 12:10:33 EDT 2011
[INFO] Final Memory: 3M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project forge: Could not resolve dependencies for project forge:forge:jar:1.0.15-SNAPSHOT: Could not find artifact com.google.code.jyield:jyield:jar:1.0-SNAPSHOT -> [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/DependencyResolutionException
logout

[Process completed]

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 » 01 Jul 2011, 19:06

Please do an svn update. I fixed the pom.xml yesterday. It "works for me" but let me know. The jyield.jar os the new dep for braid's code. I uploaded it into my Maven repo I use to support Forge.

On another front - I changed the Maven build so that it zips up the cardsfolder and includes only the zip file. I also am not including res/lib since those files are bundled in the jar-with-dependencies. This results in a build time that is *much* faster (~x4 for me) and *much* smaller release packages (50% of the previous size).
jendave
 
Posts: 307
Joined: 01 Jun 2008, 07:19
Has thanked: 8 times
Been thanked: 21 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 22 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 22 users online :: 0 registered, 0 hidden and 22 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 22 guests

Login Form