Hello everyone, thanks for reading.
I have a JEE project with several modules:
- project-api
- project-core
- project-ejb
- project-view
- project-ear

On my server (OC4J) I have shared several common libraries for all the
deployed applications, like jakarta-commons, spring, and so on

On my project-ejb's pom.xml file I've configured these dependencies as
"provided" in order to avoid including these jars into my ear when i make a
"mvn install"

I need the OC4J to be aware of these dependencies, so I've configured the
Maven Archiver to include the classpath in the manifest file. The problem is
that when i build the project, it completely ignores the "provided" scoped
dependencies and doesn't adds them to the generated manifest.mf
.
So far I've tried several combinations with the <scope> and <optional>
dependencies attributes, but nothing seems to work.
Here's a portion of my pom:
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-ejb-plugin</artifactId>
    <configuration>
       <generateClient>true</generateClient>
       <ejbVersion>3.0</ejbVersion>
       <archive>
            <manifest>
                <addClasspath>true</addClasspath>
            </manifest>
       </archive>
     </configuration>
  </plugin>
</plugins>
</build>
<dependencies>
<dependency>
  <groupId>org.springframework</groupId>
  <artifactId>spring</artifactId>
  <version>2.5.1</version>
  <scope>provided</scope>
  <optional>false</optional>
</dependency>
<!-- More dependencies here -->

Any hints or directions would be very appreciated...
Thanks in advice.

Reply via email to