powered by Jive Software

Help on CVS

I did the following steps in eclipse 3.1:

File -> new -> project ->checkout Pro. from CVS -> create repository

-> use an existing module -> choose messenger, then click Next

-> choose checkout as a project in the workspace, then use default localtion

-> in the select tag dialog, choose HEAD and click finish.

When I code and do some operations (e.g. ctrl+space), it tells me “this compilation unit is not on the build path of a java project”. I don’'t know how to correct it, can anybody help on this? Thanks!

And also, as I login the CVS as anonymous, I suppose I cannot upload my code via CVS, can I? If no, then should I send code to you by email, or by other means?

Regards

Hey,

The problem is that you are using “choose checkout as a project in the workspace” which implies that a new project will be generated in Eclipse but not a Java project. So you are not able to specify the source/build folders. Since you already created a Java Project[/b] in the first step you should use “checkout into an existing project” and choose the existing project. Once the checkout has finished you will need to open the project properties and click on Java Build Path. In the Source tab click on Add Folder and the src/java of Jive Messenger as well as the src/java folder of each plugin. Click on Libraries and add the jar files in build/lib/merge, build/lib/dist, build/lib and also the libs of the userImportExport plugin.

Also make sure that you have set “Compiler compliance level” to 5.0 in the project properties window.

I think that you should sign the contributor agreement before having CVS access. Anyway, I think that you can send your initial classes by email so we can review them and then add them to CVS.

Regards,

– Gato

Hey,Gato,i used your suggest complied JM2.1.5 src source in eclipse.all can complied success, maked code run is fine. just i can’‘t understand a problem,it’‘s display some question mark and fork mark in eclipse’'s workspace code list.example for SessionManager.java,it is a error in 769 row .error hint ‘‘The method sort(List)’’.

Hi tangzhen,

I used to see that same error with the beta versions of 3.1 but with the final release it has gone away. Which version are you using?

Thanks,

Ryan

I’‘m using the release 3.1 version of eclipse and I also don’'t have any error in the SessionManager class. One thing I noticed is that I have the following code

Collections.sort(filteredResults, filter.getSortComparator());[/code] in the line 889 (and not in 769 like it seems to be your case). Are you using the latest code in CVS (using HEAD)?

Regards,

– Gato

Hey Gato,i am using JM2.1.5 source complied on eclipse(Build id: I20050627-1435),now it isn’‘t error hint,but there are about 100 warnings info in eclipse.it is seem ‘‘type safety’’ waring info.whether you also same warning info hint.although it isn’'t affection code compiled,but thus much warning info make a kind of viewing obstacle.

Regards.

Hey Tom,

As you said what you are seeing are just warnings. Eclipse is very good at showing them and also very strict. However, you can run the server without any problem. I think that one day I will switch back to Eclipse and go over all those warnings…and then will go back to IntelliJ.

Regards,

– Gato

I got the same. I think Eclipse is extremely unintuitive in this regard. I will go so far as to say it flat out sucks (the IDE as a whole is great, I am specifically unhappy about the new project / CVS behavior).

Complaint # 1: If I check out a new project from CVS, Eclipse has no idea it’'s a Java project (of course it never asks, and never gives me the option to change it once checked out). Thus the “compilation unit not on buildpath” error.

Complaint # 2: On the other hand, if I create a new, blank Java project in Eclipse, then check out a CVS project into this new, empty Java project, I get a superfluous layer of folder. Here’'s an example:

Say I have a project called “Foo” in CVS, and it has a typical directory layout (src, lib, webroot, etc.). Then I create a new Java project in Eclipse called “Foo,” (because that’‘s what the @)(#*$&!! project is called!!). Then I check the CVS “Foo” project out into the existing “Foo” Eclipse project. Now instead of my nice directory layout, I have Foo.src, Foo.lib, Foo.webroot. ???. A little steam is coming out of my ears at this point, but I proceed. I refactor everything, moving all the java files, jars, config docs and everything to their proper place. But what’‘s this? Now none of the files are showing that they are part of version control any longer. Right-click, choose Team --> Add to Version Control. Then Team --> Commit. Eclipse doesn’‘t send the root project folder, so CVS thinks I’'m trying to check things in to an empty folder:

Error: Foo: cvs : cannot add to /usr/local/cvsroot/CVSROOT/Emptydir

Lather, rinse, repeat with a few variations. You can definitely cook an egg on my head at this point. AAUUUGHHH!!!

The only way I got Eclipse and CVS to play nice together and not cause problems for the other developers was to do the following:

  1. Check out my “Foo” project from CVS into Eclipse.

  2. Create a new, empty Java project in Eclipse and name it “Bar.”

  3. Open the Resource perspective

  4. Copy the buildSpec and natures nodes from the .project file in the Bar project, and overwrite the corresponding nodes int the “Foo” project.

  5. AHA, now Eclipse understands that “Foo” is a Java project!

  6. Project --> Properties --> Java Build Path lets me specify the JDK, add the jars from the lib and stuff to my classpath.

  7. Right-click on .project and .classpath and select Add to .cvsignore (so I don’'t torpedo the other guys with my settings).

Seems like a lot of headache. Am I missing something obvious?

GojiraDeMonstah:

Hey GojiraDeMonstah,now wildfire’‘s cvs project already convert to svn.you can check out svn’‘s project,it’'s building process very easy.this is address.http://www.jivesoftware.org/source.jsp

-Tom

I think you get a superfluous layer of folder because Eclipse cannot understand which is your source (src) directory.

Try with: right click on the project’'s name -> properties -> java build path (left menue) -> source

and now specify your source directory.

The superfluous layer should disappear.