facebook

Naming of jar file created for a dependent java project

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

    miller786
    Member

    Hi,

    I have made the following entry into application.xml of my j2ee project:

    <module id=”MyJavaProject”>
    <java id=”test.jar”>test.jar</java>
    </module>

    When I look at the generated ear file, the name of the jar file is always MyJavaProject. How can I specify the name of the jar file? I have already changed the <name></name> element in the .project file of the dependent java project however without success. Any ideas?

    Thanks,
    KM

    #269081 Reply

    miller786
    Member

    I just noticed that the GUI in myeclipse does not even allow my to add ordinary POJ projects. I actually manually edited application.xml and added that <java> entry above.

    #269905 Reply

    miller786
    Member

    Does anyone have some clues about this? My j2ee project produces ear files with ejb modules which dont have a .jar extension. How can I change this behavior? I dont want to rename each eclipse project to .jar or .war at the end.
    Cheers,
    KM

    #269912 Reply

    Riyad Kalla
    Member

    KM,
    Do you have periods in the name of the projects? That could be screwing up the packager. Also you manage modules from the MyEclipse > Add/Remove Modules menu entry under your EAR project. That will modify the application.xml file for you automatically.

    Also you cannot add Java Projects directly, but you can add them as depdencies and have them packaged up, if for example, other projects all share the same code.

    #269926 Reply

    miller786
    Member

    Yes I have periods in the web, ejb and parent ear project names.
    .mymetadata – j2ee project – archive=”server.j2ee.ear”
    .mymetadata – j2ee project –
    archive=”my.server.j2ee.ear”
    archive=”my.server.j2eeWeb.war”
    archive=”my.server.j2eeEJB.jar”

    .mymetadata – web project – archive=”my.server.j2eeWeb.war”
    .mymetadata – ejb project – archive=”my.server.j2eeEJB.jar”

    Problems here are:
    – The ear file is generated without the .ear extension
    – The ear file contains a my.server.j2eeEJB file instead of a my.server.j2eeEJB.jar file
    – The ear file contains a correct my.server.j2eeWeb.war (not a problem for me 🙂

    Looks like the packaging works for projects with dots in their name – but only for web projects. It does not work for parent ear and ejb projects. Could this bug be fixed in the next build?
    Thanks,
    KM

    #269935 Reply

    Riyad Kalla
    Member

    KM,
    The periods are the problem. We added a “feature” that has since turned into a bug that we try and honor custom project names that have periods in them to allow people to create any kind of deployable archive.

    I don’t think this will be fixed in 5.5. The work around is to rename the projects.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Naming of jar file created for a dependent java project

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