It is currently 28 Aug 2025, 20:13
   
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 jendave » 08 Jun 2011, 22:18

Yes. The keychain is a utility on OSX. It is in /Applications/Utilities. I am looking at my Keychains - "login" and Category - "All Items". I see "application passwords" for cardforge.googlecode.com. It has my username/password and the access control is for IntelliJ (my Java IDE). I want to test it for SVN
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 » 08 Jun 2011, 22:52

Any luck? I see a checkin for the pom.xml via Maven
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. » 08 Jun 2011, 23:06

jendave wrote::( no obvious problems from the output. It is definitely a problem with SVN not Maven however.
At the very least, you have the two built packages in your target directory.

Try
Code: Select all
mvn clean release:clean
Revert the changed pom.xml file 'svn revert pom.xml' should do it.
mvn clean install release:prepare release:perform -Dusername="<user>" -Dpassword="<pw>"
where the username and password are you googlecode creds. I would use the "" since you will have an '@' in the username
Also, do you mind if I do a release to CardForge Google? It works on my GoogleCode site "http://arcane.googlecode.com" but I noticed a discrepancy between my Keychain settings for both sites. I would want to do a test.
`
I have tried a few times and their has been a problems. I am trying several minor adjustments to the user and pw .

And yes, by all means do a release to CardForge Google. We will get this figured out at some point. Somehow I changed the pom.xml file and I had to fix it from Eclipse but it should be OK now that it has the missing "-SNAPSHOT" added to the version string.
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. » 08 Jun 2011, 23:21

jendave wrote:Any luck? I see a checkin for the pom.xml via Maven
`
I got an svn tag command failed and attempted to clear everything out but I guess that the pom file was somehow modified. On my latest attempt I got:

Code: Select all
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 2:38.707s
[INFO] [INFO] Finished at: Wed Jun 08 19:09:23 EDT 2011
[INFO] [INFO] Final Memory: 30M/115M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /Users/chrish/workspace/ForgeSVN && svn --username chris.mtg.h@gmail.com --password '*****' --non-interactive commit --file /var/folders/0V/0Vuo2rLY2Rmm2k+BYpeWKU+++TI/-Tmp-/maven-scm-2027986300.commit --targets /var/folders/0V/0Vuo2rLY2Rmm2k+BYpeWKU+++TI/-Tmp-/maven-scm-3363479990180534382-targets
[INFO] Working directory: /Users/chrish/workspace/ForgeSVN
[INFO] Tagging release with the label forge-1.0.0...
[INFO] Executing: /bin/sh -c cd /Users/chrish/workspace/ForgeSVN && svn --username chris.mtg.h@gmail.com --password '*****' --non-interactive copy --file /var/folders/0V/0Vuo2rLY2Rmm2k+BYpeWKU+++TI/-Tmp-/maven-scm-546583207.commit --revision 9417 https://cardforge.googlecode.com/svn/src/tags/forge-1.0.0 https://cardforge.googlecode.com/svn/src/tags/forge-1.0.0
[INFO] Working directory: /Users/chrish/workspace/ForgeSVN
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7:06.221s
[INFO] Finished at: Wed Jun 08 19:09:27 EDT 2011
[INFO] Final Memory: 33M/113M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project forge: Unable to tag SCM
[ERROR] Provider message:
[ERROR] The svn tag command failed.
[ERROR] Command output:
[ERROR] svn: Path 'https://cardforge.googlecode.com/svn/src/tags/forge-1.0.0' does not exist in revision 9417
[ERROR] -> [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/MojoFailureException
Macintosh:ForgeSVN chrish$
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. » 08 Jun 2011, 23:30

jendave wrote:Yes. The keychain is a utility on OSX. It is in /Applications/Utilities. I am looking at my Keychains - "login" and Category - "All Items". I see "application passwords" for cardforge.googlecode.com. It has my username/password and the access control is for IntelliJ (my Java IDE). I want to test it for SVN
`
I went to Eclipse to fix a bad merge of the pom.xml file and I was asked if I wanted to save my user and password to keychain.

I now have two different accounts. They have the same password but one is missing the original is missing the "@gmail.com" from the user name.
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. » 09 Jun 2011, 02:08

jendave wrote:Any luck? I see a checkin for the pom.xml via Maven
`
It has been a long day.

Yes the checkin for the pom.xml via Maven is removing the "-SNAPSHOT" from the pom.xml file. I add it back in though.

At least I have my author back to it's old form.

I am still getting the "The svn tag command failed."

Code: Select all
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 1:54.171s
[INFO] [INFO] Finished at: Wed Jun 08 21:56:30 EDT 2011
[INFO] [INFO] Final Memory: 43M/112M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /Users/chrish/workspace/ForgeSVN && svn --username Chris.MTG.H --password '*****' --non-interactive commit --file /var/folders/0V/0Vuo2rLY2Rmm2k+BYpeWKU+++TI/-Tmp-/maven-scm-1511403229.commit --targets /var/folders/0V/0Vuo2rLY2Rmm2k+BYpeWKU+++TI/-Tmp-/maven-scm-8748243653305610911-targets
[INFO] Working directory: /Users/chrish/workspace/ForgeSVN
[INFO] Tagging release with the label forge-1.0.0...
[INFO] Executing: /bin/sh -c cd /Users/chrish/workspace/ForgeSVN && svn --username Chris.MTG.H --password '*****' --non-interactive copy --file /var/folders/0V/0Vuo2rLY2Rmm2k+BYpeWKU+++TI/-Tmp-/maven-scm-1243688038.commit --revision 9429 https://cardforge.googlecode.com/svn/src/tags/forge-1.0.0 https://cardforge.googlecode.com/svn/src/tags/forge-1.0.0
[INFO] Working directory: /Users/chrish/workspace/ForgeSVN
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5:22.675s
[INFO] Finished at: Wed Jun 08 21:57:00 EDT 2011
[INFO] Final Memory: 33M/117M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.0:prepare (default-cli) on project forge: Unable to tag SCM
[ERROR] Provider message:
[ERROR] The svn tag command failed.
[ERROR] Command output:
[ERROR] svn: Path 'https://cardforge.googlecode.com/svn/src/tags/forge-1.0.0' does not exist in revision 9429
[ERROR] -> [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/MojoFailureException
Macintosh:ForgeSVN chrish$
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 » 09 Jun 2011, 15:07

So I worked on this late last night, but still ran into problems. Due to the size of the SVN repo (the res folder in particular), Maven runs out of Java heap space after the tagging, even after increasing it. This is a bad one. I am trying to find a workaround.
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. » 09 Jun 2011, 17:59

jendave wrote:So I worked on this late last night, but still ran into problems. Due to the size of the SVN repo (the res folder in particular), Maven runs out of Java heap space after the tagging, even after increasing it. This is a bad one. I am trying to find a workaround.
`
Yesterday was a full day. :mrgreen:

The ReadCard.ReadCard() method can handle not just indivual card.txt files, of which thee are many. It can also handle a .zip archive containing every card. The archive must be named cardsfolder.zip.

If maven can be set up to compress all of the card.txt files into a single .zip file, would this then in turn lower the number of tags?

Would this help to get past the java heap space problem that you noticed?
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 » 09 Jun 2011, 21:17

It could. I will try it out. I am a bit stumped right now. I copied the entire tree into my googlecode repo and was able to create a package without issue. I am not certain why it does not work in the cardforge repo. I will keep looking.
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 » 09 Jun 2011, 23:25

Made some progress. My theory is: during the packaging, I create a symlink that is used to do the drag-n-drop installation for the OSX build. Just after the tagging, the build tries to bundle this up. Instead of just grabbing the symlink, it follows it to the /Applications directory. It then tries to include all of the app into the dmg file. Of course that breaks the build. I removed the OSX package for the moment so I can fix it.

I was able to automate uploading the Windows/Linux build.
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. » 09 Jun 2011, 23:56

jendave wrote:Made some progress. My theory is: during the packaging, I create a symlink that is used to do the drag-n-drop installation for the OSX build. Just after the tagging, the build tries to bundle this up. Instead of just grabbing the symlink, it follows it to the /Applications directory. It then tries to include all of the app into the dmg file. Of course that breaks the build. I removed the OSX package for the moment so I can fix it.

I was able to automate uploading the Windows/Linux build.
`
Ah, progress.

Worst case scenario, I can release the next beta by using a terminal .command file on my computer:

Code: Select all
#!/bin/sh
cd /Users/chrish/workspace/ForgeSVN/
mvn -U clean install
`
This should give me the two archives on my local computer and I can upload it to MediaFire. The Maven work of yours is very interesting although I had no prior experience with it. I have enjoyed helping with the testing.
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 » 10 Jun 2011, 18:23

Pretty much there. I moved the Window/Linux and OSX builds into their own profiles so the build time for the jar is considerably shortened. The OSX symlink to /Applications still does not work so I left it out for now. The Maven scripts now create packages and upload them to google for Windows/Linux and OSX.

So for a simple build of the jar-with-dependencies
Code: Select all
mvn -U clean install
For a full package build and upload
Code: Select all
mvn -U --batch-mode clean -P osx,windows-linux release:prepare release:perform
I'll keep working on the symlink so the OSX package can have drag-n-drop installation.
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. » 10 Jun 2011, 18:42

Thank you Dave.

I can wait until Monday for the next beta release. This will give us a couple of more days just in case.
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. » 12 Jun 2011, 20:08

jendave wrote:For a full package build and upload
Code: Select all
mvn -U --batch-mode clean -P osx,windows-linux release:prepare release:perform
`
I was attempting to use this command for our next beta and got the following error:

Code: Select all
[INFO] [INFO] BUILD SUCCESS
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 2:18.712s
[INFO] [INFO] Finished at: Sun Jun 12 16:03:08 EDT 2011
[INFO] [INFO] Final Memory: 30M/120M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] Checking in modified POMs...
[INFO] Executing: /bin/sh -c cd /Users/chrish/workspace/ForgeSVN && svn --non-interactive commit --file /var/folders/0V/0Vuo2rLY2Rmm2k+BYpeWKU+++TI/-Tmp-/maven-scm-1895936341.commit --targets /var/folders/0V/0Vuo2rLY2Rmm2k+BYpeWKU+++TI/-Tmp-/maven-scm-577486942417665487-targets
[INFO] Working directory: /Users/chrish/workspace/ForgeSVN
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:25.544s
[INFO] Finished at: Sun Jun 12 16:03:09 EDT 2011
[INFO] Final Memory: 4M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.1:prepare (default-cli) on project forge: Unable to commit files
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: Commit failed (details follow):
[ERROR] svn: MKACTIVITY of '/svn/!svn/act/aeb6ebbe-9871-4df2-986c-58653110bf83': authorization failed: Could not authenticate to server: rejected Basic challenge (https://cardforge.googlecode.com)
[ERROR] -> [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/MojoFailureException
`
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
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 friarsol » 12 Jun 2011, 20:12

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
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 37 guests

Main Menu

User Menu

Our Partners


Who is online

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

Login Form