stupid newbye request

The RPTools applications are written in Java. If you're interested in contributing to any project here by submitting patches to the source code, this is the forum to ask questions about how to do so. Please put the two-letter tool name abbreviation in your thread Title. To enter this group, go to the Usergroups page of your User Control Panel and join the Java Developer group.

Moderators: dorpond, trevor, Azhrei

brunoPatin
Kobold
Posts: 10
Joined: Tue Mar 06, 2012 3:56 pm
Location: Paris, France
Contact:

stupid newbye request

Post by brunoPatin »

I downloaded using the svn last version the project that I imported after in eclipse in order to be able to compile it using ant. Problem is that build.xml begins with

Code: Select all

<project name="maptool" default="dist">
	<import file="../common.build/common-webstart-targets.xml" />
	<target name="sign-jars" depends="setup, prepare-dist">
resulting when building to the error

Code: Select all

Buildfile: /Users/bruno/Documents/workspace/maptool/build.xml

BUILD FAILED
/Users/bruno/Documents/workspace/maptool/build.xml:2: Cannot find /Users/bruno/Documents/workspace/common.build/common-webstart-targets.xml imported from /Users/bruno/Documents/workspace/maptool/build.xml 
it is certainly a trivial thing (I am used to C++ more than to JAVA)

Thanks

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: stupid newbye request

Post by Azhrei »

The maptool project has a dependency on the common.build project, but there's no way to tell SVN that checking out one project should automatically check out another one.

brunoPatin
Kobold
Posts: 10
Joined: Tue Mar 06, 2012 3:56 pm
Location: Paris, France
Contact:

Re: stupid newbye request

Post by brunoPatin »

Thanks for the help. Following your answer I have two more questions related:
- when considering the tree in the svn repository, there are many folders that could be used by rptools that I did not upload (e.g. rptools.resource)
- do you have somewhere some developper documentation I could use to be able to shuffle through this bunch of sources w/o bothering you?
Bruno

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: stupid newbye request

Post by Azhrei »

Um, unfortunately no. Or rather, "Yes, this is the place." :?

I believe the original developer just checked out the entire project from SF! That's waaaay too much junk for me to leave laying around on my drive, so I only grab the projects I need.

Most of the projects result in either application JAR files or library JAR files. The library JARs are then moved into the application project directory and that's what the dependency is on (which makes sense for application code). But the common.build project has ANT build files that are used by all of the applications (there are 5 of them right now) so it only makes sense for it to be separate.

We're planning a new library/project strategy for the next version but it won't completely solve this problem (which is that some files are source dependencies and some are runtime dependencies).

brunoPatin
Kobold
Posts: 10
Joined: Tue Mar 06, 2012 3:56 pm
Location: Paris, France
Contact:

Re: stupid newbye request

Post by brunoPatin »

Thank you for your help. I am now compiling trying to find out my way in the classes maze. :wink:

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: stupid newbye request

Post by Azhrei »

There are certainly a lot of them!

I suggest starting with MapTool.java since that will give you an idea of how the basic error handling works and demonstrate the startup process (ignore the classes that have "Server" in their name at the beginning).

Then take a look at AppActions.java. That class contains all of the various menu function and keystroke implementations. Well, almost all of them. Some of the keystrokes and mouse events are handled differently depending on which htoolbar tool has been selected (Pointer, Fog, VBL, etc) and those are handled in each specific class (like Pointer.java).

It'll take a long time, but you'll get it eventually. I try to add javadoc to the source whenever I edit it, but there's still a huge amount to do...

brunoPatin
Kobold
Posts: 10
Joined: Tue Mar 06, 2012 3:56 pm
Location: Paris, France
Contact:

Re: stupid newbye request

Post by brunoPatin »

I am following your suggestion in fact shuffling through the code during debugging session in order to know when those pieces of codes are loaded. I am trying just now to find when the resource library pointers are loaded (in fact I am trying to do just that because unable to find in what configuration file these pointers are saved).

Thanks for the help

BTW, I am working on a macbook

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: stupid newbye request

Post by Azhrei »

Heh, another Mac user. Well met, my friend! 8)

That's why I suggested starting with AppActions. Almost all menu options go through that file. Some mouse clicks and keyboard events are tracked elsewhere, but it's a good place to start.

Keep trudging along... It's a long road, but enlightenment can be found, grasshopper.

:mrgreen:

brunoPatin
Kobold
Posts: 10
Joined: Tue Mar 06, 2012 3:56 pm
Location: Paris, France
Contact:

Re: stupid newbye request

Post by brunoPatin »

sometimes I'm thinking developers must be a little sadistic to their colleagues ... :wink:
BTW I'm on it. If there is somewhere I (a kobold) could be of help (doc perhaps or some recap of code) let me know, I'll try.

username
Dragon
Posts: 277
Joined: Sun Sep 04, 2011 7:01 am

Re: stupid newbye request

Post by username »

Azhrei wrote:We're planning a new library/project strategy for the next version but it won't completely solve this problem (which is that some files are source dependencies and some are runtime dependencies).
Have you considered switching to maven? It solves that problem efficiently, if I understand that correctly. (Not that I am a big fan of maven, it is quite patronizing.)

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: stupid newbye request

Post by jfrazierjr »

username wrote:
Azhrei wrote:We're planning a new library/project strategy for the next version but it won't completely solve this problem (which is that some files are source dependencies and some are runtime dependencies).
Have you considered switching to maven? It solves that problem efficiently, if I understand that correctly. (Not that I am a big fan of maven, it is quite patronizing.)
There has been talk of using either Maven or Ivy. They both have pluses and minuses. Note that the "official" approach right now is to target the use of Maven. Personally, I would rather use Ivy since it's easier to deal with in absence of someone who already knows Maven and is willing to put in the work to set it up. ie, all things being equal, why pick the harder to learn and configure tool set...
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: stupid newbye request

Post by Craig »

jfrazierjr wrote:
There has been talk of using either Maven or Ivy. They both have pluses and minuses. Note that the "official" approach right now is to target the use of Maven. Personally, I would rather use Ivy since it's easier to deal with in absence of someone who already knows Maven and is willing to put in the work to set it up. ie, all things being equal, why pick the harder to learn and configure tool set...
But all things are not equal, there is always the possibility that Ivy only does a subset of what Maven does. Apart from dependency management there are other problems to solve, one of them is I want to get away from being semi dependant on Eclipse -- I am at the point that I really loathe it as an IDE, I shouldn't have to spend so much time fixing up problems with my IDE, its like the Windows Vista of IDEs. Maven projects can be imported into many IDEs with a lot more configuration information than projects only using Ant. Although I like to use Vim where can so that's not such a biggie to me, but I can imagine some people will want to use Eclipse, or NetBeans or IntelliJ or.... and then there is the other problem where people just have trouble using a simple ant build and have to complicate it as soon as you turn your back and suddenly you end up with this monstrosity of a build file.

Then again maybe we should just go Ivy and Ant and let everyone deal with their own IDE project setup.

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: stupid newbye request

Post by jfrazierjr »

Craig wrote:
jfrazierjr wrote:
There has been talk of using either Maven or Ivy. They both have pluses and minuses. Note that the "official" approach right now is to target the use of Maven. Personally, I would rather use Ivy since it's easier to deal with in absence of someone who already knows Maven and is willing to put in the work to set it up. ie, all things being equal, why pick the harder to learn and configure tool set...
But all things are not equal,
Well, in the context I am talking about, they are equal or at least I don't know that they are not. My context is from the point of view that none of the current developers are fairly proficient in either Maven or Ivy. If this is NOT the case and someone(you for example) who will be committed to making the build files or documenting the process already has fairly extensive knowledge of Maven, yea, it makes sense to at least evaluate the differences before choosing a tool, especially when both my limited personal experience as well as tons of people have reported that Ivy is simpler than Maven.

From the point of view of a developer who just wants to do a build AND the build process is already established, I would not care less which of the two(or even others not considered for that matter) is used. From the point of view of someone who might want to invest the time to learn one vs the other to contribute in absence of an existing expert on one or the other, THIS is where I say Ivy is the easier tool to learn and should be considered at least from that standpoint.
Craig wrote:there is always the possibility that Ivy only does a subset of what Maven does.
Well... I am sure there might be one or two things it might do Ivy can't, but the question is do we need that thing that we don't know what it is or if we need it....

Craig wrote: Apart from dependency management there are other problems to solve, one of them is I want to get away from being semi dependant on Eclipse.
This part puzzled me... are you believing Ivy is dependent upon Eclipse? While I use Eclipse, I have no problem with the team(as if it really mattered to anyone anyway) wants to make it more IDE agnostic. I think this is a very good idea. Just for the record, when I was doing some testing with Ivy and the parser project a few months ago, I intentionally set up Ivy+Ant to work from the command line vs Eclipse based and ran into no problems, so there is no dependency upon Eclipse to use Ivy for builds. In fact, the integration with Eclipse seemed to be far more trouble that it was worth, but I have read many complaints from Maven people with the same experience of the respective Eclipse plug-ins



Craig wrote: -- I am at the point that I really loathe it as an IDE, I shouldn't have to spend so much time fixing up problems with my IDE, its like the Windows Vista of IDEs. Maven projects can be imported into many IDEs with a lot more configuration information than projects only using Ant. Although I like to use Vim where can so that's not such a biggie to me, but I can imagine some people will want to use Eclipse, or NetBeans or IntelliJ or.... and then there is the other problem where people just have trouble using a simple ant build and have to complicate it as soon as you turn your back and suddenly you end up with this monstrosity of a build file.
I don't have a problem with making the code structure and build processes IDE agnostic. Some people STILL program in a plain text editor and while that's not for me, I am not going to suggest they change what they like and are used to(unless they ask for opinions) Personally, I would love to learn Vim enough, but it something you have to use consistently and I just end up giving up and doing things the fast way and then of course forget what I did when I try again 2 months later. On the flip side, my day job is working with a middle ware product, so I rarely do "real" low level coding on a frequent basis any more. The closest I have come lately was working on upgrading some functionality of a .Net web application off and on for a few months.



Craig wrote: Then again maybe we should just go Ivy and Ant and let everyone deal with their own IDE project setup.
Fine by me... I can used the command line/shell without a problem for most fairly simple things on the three big OS's.


I guess my point here with keeping bringing this up is that it appears Maven was chosen because it was the "big guy" as opposed to choosing the best tool for the job. There are people who can make some amazing art work with a chain saw, but about all I can do with it is cut some wood in half. If you are an expert on Maven configuration, then by all means it's probably best to use the tool we have someone dedicated to the project who already knows it. But I know Azhrei has stated repeatedly he does not know more than the basics of either Ivy or Maven and he won't have time to learn. Ditto me, but at least I have test driven both and in my opinion, either Maven was far harder than Ivy or I was just to darn stupid to figure it out(and someone else may easily pick it up.)

Hence my suggestion of Ivy over Maven or AT THE LEAST let's do some due diligence of researching the tools before making a decision. As noted, I DID look at both (Maven first) and after 4+ hours trying to figure out Maven, I was no closer to getting anything even close to a "prototype". With less than an hour of Ivy, I had built one of the existing projects and within 2.5, I had tweaked the existing ant scripts with Ivy to build 3 projects, 2 independent ones(parser and rplib) and a "parent"(dicelib in this case) which depended upon both of the previous ones.

Based upon our stated goals of OSGi, added to my already existing experience of the two tools and reading other people who have used one or the other of the tools trying to move an existing application to OSGi, Maven's complexity(which I personally thinks is already high) goes WAY up. Of course, Ivy's does too, but the complexity appears to be much more linear as opposed to Maven's exponentially.


I hope I have finally conveyed the objective of why I keep bringing "issue" this up. To summarize:
  • In absence of an expect at configuring one vs the other, we should not just pick one arbitrarily, but perform an evaluation to determine which once will best meet the needs without undue future burden.
  • I have performed an evaluation as above and believe Ivy is a clear front runner from the ease of use and learning curve for a build dependency management tool.
  • If anyone else want's to take the time to do as I have and compare the two (or even more than these two for that matter!!!), I don't have a problem with that and would encourage it!
  • Alternately, If someone says "I am going to learn Maven and make all of the build files", I say great, have at it and would have no problem with using Maven. So far, no one has committed the time to do either 3 or 4 and has stuck around.

At this point, from a consistency stand point, it's Azhrei, yourself, and me as developers of MapTool. With the occasional contribution from Phergus and Rumble(thinking about those who have been trusted to join the mailing list). Based upon the past, I doubt Phergus will have time to learn Maven or Ivy and I rather doubt Rumble wants to. So that leaves you, me, or someone unknown to take the time to create a build system for all of the existing projects. Who knows, perhaps username already has the experience with Maven and will volunteer. He has contributed a number of bug fixes in the past year or so... Of course, he seems to have an opinion similar to mine in that Maven is a big PITA unless you do things exactly the way it want's them done.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

Craig
Great Wyrm
Posts: 2107
Joined: Sun Jun 22, 2008 7:53 pm
Location: Melbourne, Australia

Re: stupid newbye request

Post by Craig »

jfrazierjr wrote:
Craig wrote:
jfrazierjr wrote:
There has been talk of using either Maven or Ivy. They both have pluses and minuses. Note that the "official" approach right now is to target the use of Maven. Personally, I would rather use Ivy since it's easier to deal with in absence of someone who already knows Maven and is willing to put in the work to set it up. ie, all things being equal, why pick the harder to learn and configure tool set...
But all things are not equal,
Well, in the context I am talking about, they are equal or at least I don't know that they are not. My context is from the point of view that none of the current developers are fairly proficient in either Maven or Ivy.
Huh? I have never driven a Humvee nor a DeLorean with a time machine, so I guess in that context these two things are equal, not sure its an extremely
helpful way to decide which one I should get if I had a chance to choose either.

Its not set in stone that we will be using Maven, just like its not set in stone that we will use OSGi -- at the moment its just proving too problematic -- but before you continue arguing that Ivy is better you should take them time to learn what Maven is and does. Ivy does dependancy management, Maven does several things -- one of which is dependancy management -- and yes some of those other things are things we would like to have.

I also somewhat resent the implication that I just chose Maven because it was bigger without giving it any thought where as you are the voice of reason who is the only one that has explored the alternatives.

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: stupid newbye request

Post by jfrazierjr »

Reversed the order of the quotes
Craig wrote: I also somewhat resent the implication that I just chose Maven because it was bigger without giving it any thought where as you are the voice of reason who is the only one that has explored the alternatives.
If I that was the impression I gave, I am sincerely sorry. Text based conversations, especially via forum or email instead of real time makes it really easy to misconstrue meanings. Also note that from what I remember, this initially appears to be a finalized decision based upon whitted(who was already quite familiar with Maven) volunteering to help us with the build system. Then he had to back out, but to me, it "seemed" as if the decision had already been made and was cast in stone.
Craig wrote: Its not set in stone that we will be using Maven, just like its not set in stone that we will use OSGi -- at the moment its just proving too problematic --
Again, I apologize, but in various previous conversations, this did not appear to be the case(ie, my understanding was the Maven was the de-facto choice. Of course, not having more than a tiny bit of playing with OSGi, I would love to hear more specifics on what issues you may have already run into(perhaps via email list?))


Craig wrote: but before you continue arguing that Ivy is better you should take them time to learn what Maven is and does. Ivy does dependancy management, Maven does several things -- one of which is dependancy management -- and yes some of those other things are things we would like to have.
This is the part I am not quite sure of. From reading on the Maven's site(http://maven.apache.org/what-is-maven.html) as well a few other sites explaining Maven, I don't see any drastic departure in Maven's functional toolset vs Ivy+Ant. Yes, it enforces a more strict project structure, but I would not call that a feature. I can see both good and bad things about that restriction.

The only section I am not sure of from the Maven "about" page was this one "Providing quality project information" and I don't know enough to know how important that is. However, in my defense, What good is it knowing that you your new car can make toasts once you are driving highway speeds if you can't figure out how to get the car started in the first place.... As I said, I really did try, for multiple hours to figure out Maven enough to get something from RPTools built(and perhaps that was the problem, trying to start with an existing structure!!!) while in less that 1/4 of that time I already have Ivy+Ant up and running...

If you could, I would love to hear the things that Maven does that Ivy+Ant CAN'T do(or at least not easily). Again, feel free to take this to the mailing list if you want.

Finally, again I want to apologize if you felt I was being disrespectful, rude, or anything else...
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

Post Reply

Return to “Java Programming Info”