I think the problem is that Javac doesn't know how to deal with the
EAR that Maven puts on the compile classpath so the compile dependency
isn't doing anything. This isn't Maven's fault per se nor is it
something you can really expect Maven to help you with.

You'll probably need to break apart the EAR manually and install each
JAR it contains individually into the Maven repo -- I'd put them under
a groupId weblogic-portal.p13n-app-lib and use the name of the jar as
the name of the artifactId. Then make a p13n-app-lib-parent pom that
specifies all the individual jars as dependencies, and finally specify
the new p13n-app-lib-parent as a dependency in your own project(s).

Not positive, but that should probably work.

Wayne

On 1/4/07, Nunn, Gerald <[EMAIL PROTECTED]> wrote:
Hi all,

I am working with WebLogic Portal 9.2 and Maven for the first time. I'm looking 
at using Maven instead of Ant for the build system as the dependency system is 
intriguing however I am having a problem getting my WLP dependencies setup. WLP 
has the notion of shared J2EE libraries where an EAR or a WAR contain various 
J2EE artifacts that can be referenced at compile and runtime. This system is 
described in more detail here 
http://e-docs.bea.com/workshop/docs92/ws_platform/ideuserguide/conJARLibraryDependencies.html

I have a small utility jar project I am trying to setup in Maven that uses a 
shared j2ee library called p13n-app-lib.ear which contains the jar I need to 
compile against. My hope was to simply create a dependency against the ear and 
have it work. I tried installing the ear using the mvn install:install-file 
command with package set to ear, however when I compile the application the 
dependency doesn't seem to be picked up at all from pom.xml and I get compile 
errors complaining about the missing WLP classes. Does Maven support shared 
j2ee libraries as a dependency for compilation?

I used this command to install the EAR:

mvn install:install-file 
-Dfile=%BEA_HOME%\weblogic92\common\deployable-libraries\p13n-app-lib.ear 
-DgroupId=weblogic-portal -DartifactId=p13n-app-lib -Dversion=9.2.0 
-Dpackaging=ear -DgeneratePom=true

My dependency in pom.xml appears as follows:

        <dependency>
            <groupId>weblogic-portal</groupId>
            <artifactId>p13n-app-lib</artifactId>
            <version>9.2.0</version>
            <type>ear</type>
            <scope>compile</scope>
        </dependency>

Thanks,

Gerald



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

Reply via email to