VASL compile issue

Hello, I created a Ubuntu 12.10 VM and using Eclipse 3.8 and the new SVN repos I have checked out the trunks for VASSAL Engine, CASL and ASL. I got VASSAL and CASL compiling fine. But the ASL portion is throwing me for a loop.

Basically my main error is:

The type org.apache.commons.io.IOUtils cannot be resolved. It is indirectly referenced from required .class files.

The first instance of this occurring is down in:

package VASL.build.module.map.boardPicker

on line 70 with a call to:

IOUtils.closeQuietly(in);

The quick fix displays the above type cannot be resolved error and the suggested fix is to correct the java build path.

I already added CASL and VASSAL to the Projects tab but so far no joy.

I also tried editing the VASSAL Access Rule from above and added in an Accessible rule via: VASSAL.commons.io.IOUtils.* but still no joy.

I know I must be missing something silly and obvious and feel pretty stupid about it but any ideas?

Thanks…

In the Configure Build Path, Projects section, make sure you are referencing the Vassal engine project you checked out. and in the Order and Export section, move that project to the top of the list.
Brent.

PS, please be careful, no checking in on any of the Trunks. If you want to play with changing the code and saving your changes, please create a branch to work on.

Brent,

Thanks for the tip. I tried moving the VASSAL project up in the Order and Export section to the top but no joy.

Maybe I’ll scratch this whole thing and try checking out each project as a branch.

Okay I just trashed all that and will try to checkout a branch and see if I have any better luck.

Okay, downloaded the latest version of eclipse and got that guy working okay with all the needed dependencies. Set Up the SVN repo (the new one) and checked out the latest VASSAL tag (3.2.4) locally and got that to compile correctly. Did same with CASL and he is okay, now did same with ASL-src (all the latest tags, down locally) and what I get now is 5 errors, not quite sure what there are complaining about yet so any help would be welcome (by the way, this is on a Windows 7 64bit OS with Juno).

archive cannot be resolved	ASLBoard.java
/ASL-src-DGL-tag-v5_9_3/src/VASL/build/module/map/boardPicker	line 367	Java Problem

MappedBufferedImage cannot be resolved to a type
ASLBoard.java
/ASL-src-DGL-tag-v5_9_3/src/VASL/build/module/map/boardPicker	line 378	Java Problem

PREFER_MEMORY_MAPPED cannot be resolved or is not a field	ASLBoard.java	/ASL-src-DGL-tag-v5_9_3/src/VASL/build/module/map/boardPicker	line 362	Java Problem

The import VASSAL.tools.image.memmap cannot be resolved	ASLBoard.java	/ASL-src-DGL-tag-v5_9_3/src/VASL/build/module/map/boardPicker	line 53	Java Problem

The method useMappedImages() is undefined for the type ImageUtils	ASLBoard.java	/ASL-src-DGL-tag-v5_9_3/src/VASL/build/module/map/boardPicker	line 378	Java Problem

The very first error points to this:

return ImageIO.read(new MemoryCacheImageInputStream(archive.getImageInputStream(name)));

The three (reasonable quick fixes) are:

Change to ‘boardArchive’
Change to ‘ArchiveWriter (VASSAL.tools)’
Fix project setup

Ideas?

I tried fix project setup but that fails, and I tried to change it to a boardArchive, that sort of works but it shows depreciated members.

Okay, on my ubuntu vm, I got all working well.

I reverted back to what we do at work.

I checked out the VASSAL-src trunk, the CASL trunk and the ASL-src trunk, got them all all compiled and working out.

It seems this is the only way to get a good full working copy (getting the trunk’s checked out).

Now to work on VASL 5.9.3, since it looks like no one has stepped up to take ownership of this project.

Also I think I’d like to switch this over to GitHub, much easier to maintain and deal with.

Thus spake zov66:

Okay, on my ubuntu vm, I got all working well.

I reverted back to what we do at work.

I checked out the VASSAL-src trunk, the CASL trunk and the ASL-src
trunk, got them all all compiled and working out.

It seems this is the only way to get a good full working copy (getting
the trunk’s checked out).

Now to work on VASL 5.9.3, since it looks like no one has stepped up to
take ownership of this project.

Also I think I’d like to switch this over to GitHub, much easier to
maintain and deal with.

Don, could you describe what your trying to do rather than what you’re
doing?

There are a lot of things you’re doing wrong here:

  • You can’t compile VASL 5.9.3 against the VASSAL 3.2 classes. VASAL
    5.9.3 depends on classes which were remvoved from VASSAL 3.2. The whole
    point of the work that Lance and I did on the VASL trunk was to remove
    this dependency.

  • You don’t need the CASL code at all unless you’re planning to work on
    CASL (which is disabled in VASL 5.9.3 and in the VASL trunk).

  • You don’t need VASSAL checked out if you’re planning to work on VASL.
    The VASSAL classes are in lib/Vengine.jar, which you’ll get if you
    check out the VASL trunk.

  • You should reread the error message you’re getting when compiling VASL.
    It’s about org.apache.commons.io.IOUtils, not VASSAL.tools.io.IOUtils.
    The probable cause for this error is that you’re compiling without the
    Apache Commons IO JAR on your classpath. That JAR is one you should
    already have if you’ve checked out the VASL trunk. It’s path will be
    lib/commons-io-1.4.jar.


J.

Joel,

Thanks for the help. The documentation is kind of confusing and misleading. Also, it appears that we have a trunk (the latest code base) the branches (what other people are working on and have checked in at various points in time, and tags, what I thought I needed in the first place to get the correct version.

It seems I’ll delete everything once more and try this again fresh. So it seems that for what I am really interested in is working on VASL all I need is the VASL trunk to get the latest and greatest. I don’t need any of the dependencies from CASL or VASSAL, correct?

I downloaded the IDE for Java Developers which does not include the web stuff, I’ll add that to my eclipse and double check my class paths/envs too.

Here is some of my responses below, any help is greatly appreciated (nothing beats learning as beating one’s head against a wall…lol)

Don, could you describe what your trying to do rather than what you’re
doing?

There are a lot of things you’re doing wrong here:

- Well, that does not surprise me the documentation seems a little dated, most of it sort of works but its’ not 100% clear.

  • You can’t compile VASL 5.9.3 against the VASSAL 3.2 classes. VASAL
    5.9.3 depends on classes which were remvoved from VASSAL 3.2. The whole
    point of the work that Lance and I did on the VASL trunk was to remove
    this dependency.

- Okay, that does explain all the compilation errors I was getting when I tried to check out the tags. All I got were more compilation issues. But when I did all the trunks all seems well.

  • You don’t need the CASL code at all unless you’re planning to work on
    CASL (which is disabled in VASL 5.9.3 and in the VASL trunk).

- Good, per the instructions it seemed I needed to add that as a depancacy to VASL.

  • You don’t need VASSAL checked out if you’re planning to work on VASL.
    The VASSAL classes are in lib/Vengine.jar, which you’ll get if you
    check out the VASL trunk.

- Ah, now that is cool and makes sense, all I really want to work with is VASL but the documentation indicated that I needed the VASSAL engine and put those depenciancy into VASL.

  • You should reread the error message you’re getting when compiling VASL.
    It’s about org.apache.commons.io.IOUtils, not VASSAL.tools.io.IOUtils.
    The probable cause for this error is that you’re compiling without the
    Apache Commons IO JAR on your classpath. That JAR is one you should
    already have if you’ve checked out the VASL trunk. It’s path will be
    lib/commons-io-1.4.jar.

- Okay thanks.

Thus spake zov66:

Joel,

Thanks for the help. The documentation is kind of confusing and
misleading. Also, it appears that we have a trunk (the latest code base)
the branches (what other people are working on and have checked in at
various points in time, and tags, what I thought I needed in the first
place to get the correct version.

Yes, I know the docs are not current. I’m reluctant to spend any time
updating (developer) docs for 3.2 myself, as they won’t continue to be
useful at all for VASSAL 4.

It seems I’ll delete everything once more and try this again fresh. So
it seems that for what I am really interested in is working on VASL all
I need is the VASL trunk to get the latest and greatest. I don’t need
any of the dependencies from CASL or VASSAL, correct?

Yes, that’s correct. Everything you need to compile VASL is already in
the VASL trunk. (If you find that this is not the case, then let me
know so I can take a look, because it’s intended to be the case.)


J.

Wow for ASL (VASL) can you say “That was easy?”

I feel like an idiot!

So all you really need to do is to download the Eclipse IDE for Java Developers (I think I only added in the support for subversion 1.7, and some swt stuff I wanted) and then download the latest ASL trunk from the new svn repo, “Find/Check out as” (in Juno it’s different now, the checkout does not do a normal checkout, it checks out the whole folder it seems but with the find/checkout it lets you check it out as a normal java project). Add the lib in ASL/lib and poof you’re all set!

So once I make any changes Joel, I can just check them in as a branch correct?

Cheers and thanks.

Don

Thus spake zov66:

Wow for ASL (VASL) can you say “That was easy?”

I feel like an idiot!

So all you really need to do is to download the Eclipse IDE for Java
Developers (I think I only added in the support for subversion 1.7, and
some swt stuff I wanted) and then download the latest ASL trunk from the
new svn repo, “Find/Check out as” (in Juno it’s different now, the
checkout does not do a normal checkout, it checks out the whole folder
it seems but with the find/checkout it lets you check it out as a normal
java project). Add the lib in ASL/lib and poof you’re all set!

So once I make any changes Joel, I can just check them in as a branch
correct?

Yes, create a branch under VASL-src/branches to which to commit your
changes.

What still needs doing for 5.10.0, btw? I keep pestering people every
few weeks, but get very little in reply.


J.

Thanks Joel, I got a small list from GS and I’ll start looking into that first. First I need to get comfortable with the code. I think I may update the html files (they are listed at VASL 4.0, s/b 5.9.3 etc.

Little steps.

Thus spake zov66:

Thanks Joel, I got a small list from GS and I’ll start looking into that
first. First I need to get comfortable with the code. I think I may
update the html files (they are listed at VASL 4.0, s/b 5.9.3 etc.

Little steps.

Is there anything on your list which is broken in the trunk but not in
5.9.3? If so, that should get priority. If not, then I think we should
release the trunk as 5.10.0.


J.

So the trunk (what I checked out) is basically 5.10?

I won’t be able to contribute much and get a full grip on things for at least a good month or so, so I say release what we got at 5.10 to the public. When I get into the code base, I can email or post here.

Unless I update the html docs which would be a great first baby step to update them to 5.10 or 5.9.3. I may convert these over to AngularJS at one point as well.