What about this:

add the oracle driver as a dependency of the parent pom, and then use a dependencySet to get it into the assembly, rather than the moduleSet. Other subprojects would then depend on the oracle driver as well, but I can think of one solution to that, there might be another simpler one:

The 'uber-pom' that builds all your modules, and the parent pom of your projects don't have to be one and the same for the uber build to work, so you might be able to set the parent pom of the other projects (the ones that don't depend on oracle) to a different, new pom file.

-Josh

On Mar 21, 2008, at 9:48 AM, nicolas de loof wrote:

I also have tried this solution, using :

<moduleSets>
   <moduleSet>
     <includes>
       <include>com.capgemini.map:map-jrules-webapp:war</include>
     </includes>
     <binaries>
       <unpack>false</unpack>
       <outputDirectory>lib</outputDirectory>
       <includes>
         <include>com.oracle:ojdbc14</include>
       </includes>
     </binaries>
   </moduleSet>
 </moduleSets>

As my assembly runs at parent POM level (I need the EAR + some bacths JAR in the assembly) I need to use a moduleSet to get dependencies from my webapp.

Doting this creates the expected /lib with the orcale driver, but also
includes the .war

A hack solution is to use <outputFileNameMapping> with a fixed name, so that the war gets overriden by the driver during packaging... ugly isn't it ?

Nicolas.


2008/3/21, Joshua ChaitinPollak <[EMAIL PROTECTED]>:

Have you tried something like this in your assembly description:

    <dependencySets>
        <dependencySet>
            <outputDirectory>lib</outputDirectory>
            <excludes>
                <exclude>javax.servlet:jstl</exclude>
            </excludes>
        </dependencySet>
    </dependencySets>

This takes all of our projects dependencies except the
java.servlet:jstl and puts them in the lib directory. You can create
an arbitrary number of dependencySets to put some dependencies in one
place, and others in another.

If you aren't using a custom assembly descriptor, you'll need to use
one, and put this in your pom:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.2-beta-1</version>
                <configuration>
                    <descriptors>
                        <descriptor>src/assembly/assembly.xml</
descriptor>
                    </descriptors>
                </configuration>
            </plugin>

-Josh


On Mar 21, 2008, at 9:25 AM, nicolas de loof wrote:

Seems you misunderstood my issue :

the orcale driver is deployed in my corporate repo, my webapp has a
dependency on it (we use com.oracle.Blob  object), but is set as
provided as
the jndi DataSource is created by the J2EE server

To respect my customer packaging, I need to provided both the EAR
and the
jars that must be added to the server classpath (-> $TOMCAT_HOME/
lib ).

I've not found a way to include the jar in my assembly by picking it
from my
local repository.

Nicolas.

2008/3/21, Heinrich Nirschl <[EMAIL PROTECTED]>:

On Fri, Mar 21, 2008 at 11:51 AM, nicolas de loof
<[EMAIL PROTECTED]>
wrote:
Hello,

for packaging purpose I need to include the Oracle driver in a "/
lib"
folder
of my dist tar.gz (created by the assembly plugin)
My web application declares this dependency as provided, so it is
not
included in WEB-INF/lib

I tried to setup a <file> with ${settings.localRepository} as a
path,
but
the variable isn't resolved to my repo.

Any idea ?

Nico.



Install the driver in your repo and don't declare it as provided but
as a normal dependency.

Henry.

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




--
Joshua ChaitinPollak | Software Engineer
Kiva Systems, Inc., 225 Wildwood Ave, Woburn, MA 01970








--
Joshua ChaitinPollak | Software Engineer
Kiva Systems, Inc., 225 Wildwood Ave, Woburn, MA 01970






Reply via email to