Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] EAR, RAD, m2e

One of IBM mailing lists or forums seems like more appropriate place to
discuss RAD specific issues.


On 2013-07-22 7:19 PM, Ilko Iliev wrote:

ok, as I can see you are trying to get it working with the recommended
Pom ... Honestly speaking I don't know if / how this exactly works. Our
projects are using the standard maven name conventions and we are using
the option "Publish with resources on server" in order to get this work.
In RAD we have the options under Maven / JavaEE integration both turned
off ("Generate application.xml..." and "Maven archiver generates ...").
We are using flat project structure, if this somehow matters. "Use
workspace resolution" is on.

Some excerpts from the poms, related to the RAD specifics / config:

plugin declarations:

                         <!-- workaround for issue MWAR-296: -->

                                   <!-- Workaround for Maven bug
#MJAR-156 ( -->



in the web projects:

         <!-- avoid the Broken output dir rule warning -->

in the ear projects we still generate the application.xml even if it is
not strictly necessary for some projects anymore, but "never change a
running system":

               <description>XXX application</description>

classpath config:

we are using the approach as described in
to filter the resources landing in WEB-INF/lib and referenced from the
EAR level. So, actually all dependencies, shared across ejb/war are
defined in the dependency section of the ear-pom. All necessary deps for
the web only are listed in the dependency section of the web-pom,
however the ear entries are defined as optional, causing to
be generated correctly and avoiding duplicate them in WEB-INF/lib.

RAD metadata - related only if you are using SCM with other devs:

using the above approach causes the classpath settings to be generated
different in case that developer1 has the project1 in her workspace and
developer2 not. In this situation maintaining .settings in the SCM will
always lead to conflicts. We simply removed all the metadata and maven
generated resources and are relaying on "the import as maven project" to
generated them correct - I think this is in general the recommended
approach, but I just mention it here.

WAS WTE deployment:

is is done via the tool - Add / Remove project, etc. Because we have
"Publish with resources on server" we can see what's actually deployed
on the server. As I mentioned after a release and update of the pom
versions we always have to make "Clean" publish on the server in order
to get consistent deployment.

The inconsistency in the errors you mention is somehow normal ;-) -
sometimes we get weird errors in the poms, especially in the web-poms,
but Update Maven Project helps in any case.

So, good luck!

On Mon, Jul 22, 2013 at 11:23 AM, Sander Verhagen <verhagen@xxxxxxxxxx
<mailto:verhagen@xxxxxxxxxx>> wrote:


    Thanks for your response, Ilko.

    I'm on 8.5.1 and I hadn't checked the infocenter page. You may have
    been particularly referencing "Recommended POM entries for projects
    targeting WebSphere® Application Server". I added some of that to my
    project but am getting similar results as before. (It seemingly
    being slightly inconsistent with its errors and other bombs makes it
    harder to focus and thus pinpoint the issue.) That page doesn't say
    a whole lot about EARs to begin with. Do you have a working example
    of your EAR (dependent on EJB) project?

    What are recommended choices for generateApplicationXml and

    As for the maven-subclipse-connector, no Subversion here :-(

    Best regards, Sander.

    Sander Verhagen
    [ Verhagen@xxxxxxxxxx ]

    On 20-7-2013 1:23, Ilko Iliev wrote:

        Hi Sander,

        could you please provide the versions of the product you are using.
        Apparently, if you are on 8.5.1 RAD have you checked the infocenter
        about the maven integration -
        - this is a new feature as from v8.5.1 in RAD. We are still on
        8.5.0 and
        are using the m2e + m2e-wtp plugins manually installed. The most
        important part to make the deployment to WAS WTE work is either to
        follow the recommendations for maven project configuration as
        in the link above OR to use the maven native name conventions
        for the
        artifacts, however in this case only "Publish to server with
        on server" does work (otherwise you get NoClassDefFoundErrors or
        at publish time). And after version changes we have to make
        "Clean" on
        the server to get everything updated - we've opened PMR for this
        IBM but we haven't got resolution yet.
        As for import maven project - we've tried it only from SVN with the
        provided maven-subclipse-connector. Here we have the issue that
        if you
        try this from the Package Explorer you get some weird error, but
        if you
        try this directly in the SVN explorer view everything works,
        which is ok
        for us at the moment.

        Hope this helps a bit,

        On Sat, Jul 20, 2013 at 1:44 AM, Sander Verhagen
        <verhagen@xxxxxxxxxx <mailto:verhagen@xxxxxxxxxx>
        <mailto:verhagen@xxxxxxxxxx <mailto:verhagen@xxxxxxxxxx>>> wrote:

             Hi all,

             I searched through this list's archives, I browsed the web,
        I played
             with IBM's examples ("RAD_m2e-Nov(update Jun 2012).pdf"),
        but I'm
             still at a loss. The group's help would be much appreciated!

             I have a multi-module Maven project that ultimately builds
        into EAR
             files, containing EJBs, WARs and utility JARs. I'm focusing
        on a
             specific EAR and trying to move from command-line to RAD.

             I could not find a comprehensive tutorial or anything
        pertaining to
             EAR files and running WTP server (Servers tab). So that
        would be a
             help, or your suggestions for my specific issue would be a
             help and much appreciated!

             Following works:
             - Command-line: cd ..._EAR; mvn clean install; "Import EAR
             (i.e. binary) in RAD; drag the project to my WAS/WTP server

             Following doesn't work:
             - "Import Existing Maven Projects" (i.e. source project) in
             drag the project to my WAS/WTP server (Servers tab)

             It finally fails with the following error:
             [7/19/13 14:16:50:115 PDT] 00001808 InstallSchedu I
        ADMA5014E: The
             installation of application MYCOMPANY_SERVICE_CUSTOMER_EAR
             [7/19/13 14:16:50:115 PDT] 00001808 SystemErr     R


             A file does not exist for module element having uri:

             However, it appears that this dependency is nicely
        referenced from
             the org.eclipse.wst.common.____component file:

             <dependent-module archiveName="MYCOMPANY_____EXCEPTIONS.jar"



             There is also a bunch of errors that I that I don't know
        what to do
             with, as follows: E


             openNestedArchive(String) An error occurred while opening a
             archive: IWAE0023E Unable to open module file
             "commons-beanutils-core.jar" in EAR file


             There is also a bunch of warnings that I chose to ignore
        for now, as
             follows: W


             openNestedArchive - module An error occurred while opening
        a nested
             archive: IWAE0006E Archive is not a valid Application
        Client JAR
             File because the deployment descriptor can not be found (case
             sensitive): META-INF/application-client.____xml

             This is the EAR plugin configuration that I'm using:







             As said, your help is much appreciated! Best regards, Sander.


             Sander Verhagen
             [ Verhagen@xxxxxxxxxx ]
             m2e-users mailing list
        m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>
        <mailto:m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>>

        m2e-users mailing list
        m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>

    m2e-users mailing list
    m2e-users@xxxxxxxxxxx <mailto:m2e-users@xxxxxxxxxxx>

m2e-users mailing list

Back to the top