On 02/01/07, Bryan Loofbourrow <[EMAIL PROTECTED]> wrote:

A second point, one you may already know but it's not clear from your
example. In general, I am pretty sure that the xxxModule configurations
are only necessary when you want to configure something about that
module's inclusion.  The main way you tell the ear pom what you want in
the ear is by including dependencies on the artifacts you want packaged
up, and, yes, those dependencies are pulled from the repository.

-- Bryan

-----Original Message-----
From: Petar Tahchiev [mailto:[EMAIL PROTECTED]
Sent: Monday, January 01, 2007 2:01 PM
To: Maven Users List
Subject: Problem with ear-plugin

Hi guys,

Happy New Year to all of you.

I have the following problem: I have a project in which I produce some
jars and wars which get installed in the local repository. The in one of
my modules I want to package some of those jars and wars into an ear
archive, so I do this in my pom:

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-ear-plugin</artifactId>
                <configuration>
                    <modules>
                        <jarModule>
                            <groupId>org.my.test.jarModules</groupId>
                            <artifactId>jar-module</artifactId>

<includeInApplicationXml>true</includeInApplicationXml>
                        </jarModule>
                        <warModule>
                            <groupId>org.my.test.warModules</groupId>
                            <artifactId>war-module</artifactId>

<includeInApplicationXml>true</includeInApplicationXml>
                        </warModule>
                    </modules>
                </configuration>
            </plugin>
        </plugins>
      </build>

but when running the build I get the following error:

[INFO] Failed to configure plugin parameters for:
org.apache.maven.plugins:maven-ear-plugin:2.2
Cause: Class 'org.apache.maven.plugin.ear.EarModule' cannot be
instantiated

After running mvn with the -e option I get this one:

org.apache.maven.lifecycle.LifecycleExecutionException: Error
configuring:
org.apache.maven.plugins:maven-ear-plugin. Reason: Unable to parse the
created DOM for plugin configuration
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
DefaultLifecycleExecutor.java:563)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
ycle
(DefaultLifecycleExecutor.java:475)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:454)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
Failures
(DefaultLifecycleExecutor.java:306)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java:273)

I read in the archive to try replacing the <jarModule> tag with
<javaModule>, but it didn't work - I still get the same exception. :-(

So, does anyone have an idea, what is going on here?

P.S. Do I need to include only modules that are submodules of the pom
that builds the ear, i.e. is it obligatory for them to be submodules of
my module, or they just have to be in the repository?

Thanks for any help.

--
Regards, Petar!
Karlovo, Bulgaria.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Bryan, thank you very much for the response,

I was looking at this page [1], and maybe that's why I have confused myself.
It may be a bug in the documantation, or just the documentation is about
version 2.4-SNAPSHOT.

I tried just including my desired modules as a dependencies and it worked as
expected.

Again, thanks a lot.


[1]
http://maven.apache.org/plugins/maven-ear-plugin/examples/excluding-a-module.html
--
Regards, Petar!
Karlovo, Bulgaria.

Reply via email to