It is currently 05 Sep 2025, 06:59
   
Text Size

JAR creation failed

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

JAR creation failed

Postby Chris H. » 06 Aug 2010, 00:03

I updated my local copy to rev 1656. As I was exporting a runnable JAR file I received a message that the JAR creation failed. I captured a screen shot which is below.

The JAR file does export and runs. I guess that I could ignore this error. It appears that Mana_PayCost.java was merged with ManaCost.java. As such, it is no longer a class file.
`
Attachments
JAR creation failed.jpg
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: JAR creation failed

Postby friarsol » 06 Aug 2010, 02:01

Yea since ManaCost was an extremely thin wrapper over Mana_PayCost it made sense just to merge the two files, since PayCost wasn't used anywhere on it's own. I guess we should just remove Mana_PayCost from the JAR file creation setup? I didn't want to just remove it because I didn't want the file history to be lost.
Last edited by friarsol on 06 Aug 2010, 02:35, edited 1 time in total.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: JAR creation failed

Postby DennisBergkamp » 06 Aug 2010, 02:32

Chris,

What I did is just delete Mana_PayCost from my local copy. JAR gets created no probs :)
User avatar
DennisBergkamp
AI Programmer
 
Posts: 2602
Joined: 09 Sep 2008, 15:46
Has thanked: 0 time
Been thanked: 0 time

Re: JAR creation failed

Postby Rob Cashwalker » 06 Aug 2010, 02:45

I don't think all history for a file is lost if it's deleted even from the SVN. I'm sure it's still stored in the archive.
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: JAR creation failed

Postby friarsol » 06 Aug 2010, 03:41

I've been on systems where this wasn't the case (or you had to recreate the filename before the history became available again). Since I wasn't sure I decided to play it safe.

If it'll be easier for everyone we should just nuke the file.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: JAR creation failed

Postby Chris H. » 06 Aug 2010, 09:50

I played with last night before going to bed. 8)

When I update my local copy I will create a zip archive of the then current SVN project. As such, I was able to quickly unzip an archive and I peeked at the old class file. It came to me that we could make a minor mod of the Mana_PayCost class file.

The file now looks like this:

Code: Select all
// merged with ManaCost since it was a thin wrapper// file NOT deleted to keep SVN history available
`
I changed it to this on my local copy:

Code: Select all
package forge;

public class Mana_PayCost {
   
    /**
     *  Merged with ManaCost since it was a thin wrapper.
     *  File NOT deleted to keep SVN history available.
     */
   
}
`
The project built without any problems. The JAR will now export without that weird "the JAR creation failed message". I think that I will merge this into the SVN.
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: JAR creation failed

Postby silly freak » 06 Aug 2010, 13:02

anyway, the file history is not deleted from SVN when removed. this is the whole point of the system, to be able to restore any previous version.

To restore a deleted file in eclipse, you can right-click on the containing folder and choose "Restore from local history...". To do the same from SVN, I guess you have to update your local copy to the specific revision, or alternately look for the file directly on google code
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Re: JAR creation failed

Postby Snacko » 06 Aug 2010, 21:01

However it is possible to alter SVN repo to completely remove a file from history.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 74 times

Re: JAR creation failed

Postby Chris H. » 06 Aug 2010, 21:18

Chris H. wrote:I think that I will merge this into the SVN.
`
I went ahead and merged my simple solution to the issue. I am just a jr. coder in training and I will allow the more experienced programmers decide whether or not to delete the class from the SVN. :wink:
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


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 26 guests

Main Menu

User Menu

Our Partners


Who is online

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

Login Form