facebook

Importing existing J2EE apps into MyEclipse

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #252787 Reply

    vvprasad
    Member

    Hello all,
    I have an exisiting source tree structure with an ant build file and I’m having trouble importing the same into a MyEclipse J2EE project with both the Enterprise and Web App modules. MyEclipse seems to look for 3 different source structures one each for Web, Enterprise and other Java code. But we really don’t want to change the source tree structure and be able to provide the developers ability to build and deploy from within IDE as well as outside IDE using our own build.xml
    I’d appreciate your suggestions in this regard

    The source structure we have is as follows

    <app-dir>/
    — build.xml (compile, web services compile, ejb compile, package jar, war and ear are the targets here)
    — build/ (created by ant build to group all built artifacts)
    —- web/ (all web based stuff eg: html, jsp, css etc in respective folders)
    —- src/ (for all the source project. Includes java, EJBs, Webservices, web app components etc)
    — src/main/ (all main source source code of the project)
    — src/main/java/ (the main java source code)
    — src/main/config/ (the application config hibernate.cfg, log4j.properties etc)
    — src/main/resources/ (meta-inf/web.xml, app.xml, ejb-jar.xml etc)

    — src/test/ (all the unitest code of the project)
    — src/test/java/ (the test java source code)
    — src/test/config/ (the test application config hibernate.cfg, log4j.properties etc)

    thanks
    -Prasad

    #252819

    Riyad Kalla
    Member

    Prasad,
    This isn’t going to work nicely in MyEclipse because of the division of src/main/config and src/main/resources. MyEclipse expects those artifacts in specific locations (like the root of your /src dir or in your WEB-INF dir). So in a way you have not only spread your project across multiple dirs, but spread individual directory resources across multiple dirs.

    If this project is relatively small and easy to digest I could take a try at organizing it into projects and sending it back to you if you like. Let me know.

    #253311

    rtulloh
    Member

    Is this a Windows dev env? If so, maybe you could use junction to link the directories the way that MyEclipse prefers to see it? IMO, the IDE should not enforce any kind of organization to the source of a project. This should all be controlled by prefs and properties to accomodate legacy integration. It is a pain to reorganize around an IDE and that should not be required. FYI, junction is a tool that acts like ‘ln -s’ (symbolic linking) for Windows.

    #253312

    rtulloh
    Member
    #253318

    Riyad Kalla
    Member

    rtulloh,
    Just for the record we agree with you, the tool (IDE in this case) should *never* enforce structure on folks. Unfortunately this is a legacy situation we are working on enhancing and changing slowly (so as to support older configs) so we aren’t there quite yet.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Importing existing J2EE apps into MyEclipse

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