facebook

Flexible project source

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #223572 Reply

    iklotzko
    Member

    I have a very unstandard web structure, or I should say source structure, that I work on and I’d like to configure MyEclipse to handle this. It says in your roadmap that this is one of your goals, I just wasn’t sure whether it was reached or how to do it. To explain more… Our project out of cvs has the following structure

    +src
    …..+package1
    ………+lib
    ………+com…
    …..+package2
    ………+lib
    ………+com…
    …..+package3
    ………+lib
    ………+com…
    …..+web-stuff
    ………+jsps
    ………+css

    We essentially have 3 seperate source folders which have both libs (jars) and packages *.java files.

    When we deploy we organize into a classic war structure (using ant)

    +app-name
    …..+WEB-INF
    ……….+classes
    ……….+lib
    ……….*.jslps
    ……….*.html

    I’d like to have MyEclipse take my packages (“package1, 2, …) compile them, then along with libs place them into app-name/WEB-INF/classes and app-name/WEB-INF/lib folders respectively. I also would like to take “web-stuff” and copy the contents directly under app-name…

    Is it possible to configure MyEclipse to do this? I’m about at the end of my roap trying to figure out how. When I create a new Web Project it only asks for one source folder? Does it expect my project out of cvs to be in an exploded war file structure? Hmmm, our cvs manager is very very fickle and doesn’t like changing this.

    I like your product a lot, especially the hot-swap and jsp debugging and would like to continue to use it. I’d therefore, rather not use ant as my main dev-build tool and prefer to use MyEclipse; mainly to keep consistency with what I build, develop and debug with. Any help is appreciated. I’m using Tomcat 5.x, and the latest ‘n greatest from MyEclipse (3.8.3)

    Thankyou,
    Ira Klotzko

    #223584 Reply

    Riyad Kalla
    Member

    I just wasn’t sure whether it was reached or how to do it.

    We haven’t rolled out our flexible project support yet, it is still a ways off considering how big of a chance it will be.

    I’d like to have MyEclipse take my packages (“package1, 2, …) compile them, then along with libs place them into app-name/WEB-INF/classes and app-name/WEB-INF/lib folders respectively. I also would like to take “web-stuff” and copy the contents directly under app-name…

    Given the structure you outlined above, MyEclipse will not be able to do these things for you. You have correctly used Ant for such a custom setup.

    I’m about at the end of my roap trying to figure out how.

    It would require creating multiple projects and setting up relationships between those projects. Then everything becomes nicely automated for you; but without that clear distinction for ME, it has no idea what it is looking at. Especially if you have this all setup as a single project.

    Does it expect my project out of cvs to be in an exploded war file structure?

    This is the most compatible out-of-box project structure for most any IDE. ME happens to really like this format as well as it immediately knows where everything is and where it goes. If you don’t have that structure, but atleast your projects are reminiscient of individual code bases then it might take some tweaking but you can usually get it working; however in your case the source tree is a composite of not only multiple source trees, but their libraries as well and the WebRoot. Obviously none of this is “wrong” persay, just not standard so most IDEs will balk at this as far as auto-importing the project.

    I’d therefore, rather not use ant as my main dev-build tool and prefer to use MyEclipse; mainly to keep consistency with what I build, develop and debug with

    There are a good handful of our users that are working on legacy code bases or simply cannot change their code base layout with much more complex layouts than this and the combination of ME and Ant do work well together in those cases. Unfortunately, if you did want to use ME exclusively you would need to reorganize this tree somewhat into multiple projects which might not be something you/your team wants to do. If you decide it is, I’ll get some more info from you and see if I can help.

    #223588 Reply

    iklotzko
    Member

    I’ve been playing around with the .classpath xml file, I’ve already had excellent success in getting my java source files to compile into my web-inf/classes directory, from all packages, also I’ve had success getting the jsps and such to copy under my webroot, however, I’m having issues getting the libs to copy from my different folders into web-inf/lib… i’m using the following statement, <classpathentry exported=”true” kind=”lib” path=”cetova-src/lib/jaxp.jar” output=”webroot/WEB-INF/lib”/> however, there is no lib directory being created, nor is this getting copied… here’s my hacked .classpath file:

    
    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
        <!-- handle the class stuff -->
        <classpathentry excluding="**/CVS/**" kind="src" path="cetova-src/trove/src"/>
        <classpathentry excluding="**/CVS/**" kind="src" path="cetova-src/common/src"/>
        <classpathentry excluding="**/CVS/**" kind="src" path="cetova-src/jni/src"/>
        <classpathentry excluding="**/CVS/**" kind="src" path="cetova-src/jamon/src"/>
        <classpathentry excluding="**/CVS/**" kind="src" path="cetova-src/openJMail/src"/>
        <classpathentry excluding="**/CVS/**" kind="src" path="cetova-src/backend/src"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
        <classpathentry kind="con" path="com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER"/>
        <!-- handle the lib stuff -->
        <classpathentry exported="true" kind="lib" path="cetova-src/lib/jaxp.jar" output="webroot/WEB-INF/lib"/>
        <classpathentry exported="true" kind="lib" path="cetova-src/lib/JSQLConnect.jar" output="webroot/WEB-INF/lib"/>
        <classpathentry exported="true" kind="lib" path="cetova-src/lib/jt400.jar" output="webroot/WEB-INF/lib"/>
        <classpathentry exported="true" kind="lib" path="cetova-src/lib/junit-3_8.jar" output="webroot/WEB-INF/lib"/>
        <classpathentry exported="true" kind="lib" path="cetova-src/lib/xerces.jar" output="webroot/WEB-INF/lib"/>
        <!-- handle the web stuff -->
        <classpathentry kind="output" path="webroot/WEB-INF/classes"/>
    </classpath>
     
    
    #223589 Reply

    Riyad Kalla
    Member

    Have you tried creating the lib dir? I’m assuming the reason the output dir works is because Eclipse makes sure that it stays there, maybe the /lib dir not being there is stopping the libs from being copied?

    #223598 Reply

    iklotzko
    Member

    I tried that and it didn’t work, moreover when I add this in

    <classpathentry excluding=”**/CVS/**” output=”webroot/” kind=”src” path=”cetova-src/backend/web”/>

    it erases my classes directory… This was to copy in my jsps. It seems this tag erases everything from the output down… any suggestions? that’s why my lib probably isn’t seen.

    Ira

    #223599 Reply

    Riyad Kalla
    Member

    No suggestions, I didn’t even know you could do that with the classpath file.

    Have you checked with the Eclipse newsgroup? I’m sure someone on there has done something like this…

    #223616 Reply

    iklotzko
    Member

    Well thanks for the help, I’m a bit dissapointed that there’s not more flexibility with the tool, but I definately appreciate your help, I certainly learned a bit more about eclipse…

    Sounds like I need a really robust flexible brute of a tool. Do you have any suggestions?

    Ira

    #223619 Reply

    Riyad Kalla
    Member

    Sounds like I need a really robust flexible brute of a tool. Do you have any suggestions?

    You mean IDE? I hear that IntelliJ has a fairly flexible project setup (module-based) and it is an excellent product. If you hate money you could buy JBuilder, although I don’t know how it fairs with complex projects.

    As far as free IDEs, I doubt that NetBeans would even come close to supporting this but you are welcome to give it a try.

    #224273 Reply

    forgotit
    Member

    As an aside, you might check this out as a plain Java project and use the ant scripts to do the deploying to the app server. What this buys you is that you can still debug + breakpoints etc. Please see this post for details:
    https://www.genuitec.com/forums/topic/make-me-work-with-existing-directory-structure-in-cvs/&highlight=
    Following on from that topic, we finally bit the bullet and restructured everything to ME’s expected format and we have been really happy with the results. AFAIK, IDEA’s flexibility comes from using ant scripts to do the packaging/deploying. Its slow compared to ME’s ‘auto-sync’ combined with the background incremental compile of eclipse and for me really gets in the way of my though process. Right now, I’ve got IE (I have to use IE because our app uses kerberos/SPNEGO for auth ) open in my second monitor and ME on my primary and I just hack away and can see the results straight away without waiting 20 seconds for some random ant script.
    ————–
    Ngapulay

    #224279 Reply

    Riyad Kalla
    Member

    Ngapulay,
    We really appreciate the “from the trenches” update. A lot of users are hesitent to make changes to their existing projects and I think your post helps to ease those concerns from another user’s perspective as opposed to comming from one of the employees of the product. Thank you for posting.

Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Flexible project source

You must be logged in to post in the forum log in