Hi,

Need some help as this is the first time I am trying to use Maven for my
build. I am facing an issue when creatin a war file maven is not putting the
right libraries in the lib folder. When issuing a command mvn install it
downloads a bunc of jars and after it's done creating war when I check in
the lib folder I don't see the version of jar files that I want to package
in my war instead all the jars downloaded by maven are getting packaged.

I have a lib folder that holds all my jar files and need maven to package
those jar files only in my final war file. How can I do that.

Right now somehow it just ignores my libraries and packages the ones
downloaded in the repository. As I want to the libraries in my lib folder to
be packaged in the final war file only.



........................
....................
................

<configuration>
                            <tasks>
                                <ant antfile="${basedir}/build-maven.xml"
inheritRefs="true">
                                    <target name="generate-sources" />
                                </ant>
                            </tasks>
                           
<sourceRoot>${project.build.directory}/generated-sources/main/java</sourceRoot>
                        </configuration>
                        .....................................
..................


<repositories>
                <repository>
                  <snapshots>
                    <enabled>true</enabled>
                    <checksumPolicy>warn</checksumPolicy>
                  </snapshots>
                  <id>springframework.org</id>
                  <name>Springframework Maven SNAPSHOT Repository</name>
                  <url>http://static.springframework.org/maven2-snapshots/</url>
                </repository>
                <repository>
                  <snapshots>
                    <enabled>true</enabled>
                    <checksumPolicy>warn</checksumPolicy>
                  </snapshots>
                  <id>java.net</id>
                  <name>Java.net Maven Repository</name>
                  
<url>https://maven-repository.dev.java.net/nonav/repository/</url>
                  <layout>legacy</layout>
                </repository>           
        </repositories>
        
    <dependencies>
        <!-- Spring-WS dependencies -->
        <dependency>
                <groupId>org.springframework.ws</groupId>
            <artifactId>spring-ws</artifactId>
                <version>1.0-m3</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.ws</groupId>
            <artifactId>spring-ws-core</artifactId>
            <version>1.0-m3</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-dao</artifactId>
            <version>2.0.3</version>
        </dependency>        
        <dependency>
            <groupId>org.springframework.ws</groupId>
            <artifactId>spring-oxm</artifactId>
            <version>1.0-m3</version>
        </dependency>
        <!-- Spring dependencies -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>2.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>2.0.3</version>
        </dependency>          
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>2.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-mock</artifactId>
            <version>2.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jms</artifactId>
            <version>2.0.3</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>2.0.3</version>
        </dependency>   
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-remoting</artifactId>
            <version>2.0.3</version>
        </dependency>     
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-hibernate3</artifactId>
            <version>2.0.3</version>
        </dependency>   
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-mock</artifactId>
            <version>2.0.3</version>
            <scope>test</scope>
        </dependency>                  
        <!-- XML handling dependencies -->
        <dependency>
            <groupId>jdom</groupId>
            <artifactId>jdom</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
                <groupId>dom4j</groupId>
                <artifactId>dom4j</artifactId>
                <version>1.6.1</version>
        </dependency>
        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1-beta-9</version>
            <exclusions>
                <!--exclusion>
                    <groupId>dom4j</groupId>
                    <artifactId>dom4j</artifactId>
                </exclusion-->
                <exclusion>
                    <groupId>jdom</groupId>
                    <artifactId>jdom</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xmlParserAPIs</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xom</groupId>
                    <artifactId>xom</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
            <version>2.7.0</version>
            <scope>test</scope>
        </dependency>
        <!-- O/X Mapping dependencies -->
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>1.0.6</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-libs</artifactId>
            <version>1.0.6</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-xjc</artifactId>
            <version>1.0.6</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.msv.datatype.xsd</groupId>
            <artifactId>xsdlib</artifactId>
            <version>20060615</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
                <groupId>ant</groupId>
                <artifactId>ant</artifactId>
            <version>1.6.5</version>
            <scope>compile</scope>              
        </dependency>
        <dependency>
            <groupId>freemarker</groupId>
            <artifactId>freemarker</artifactId>
            <version>2.3.4</version>
            <scope>compile</scope>
        </dependency>           
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1</version>
            <scope>compile</scope>
        </dependency>    
        <dependency>
                <groupId>commons-collections</groupId>
                <artifactId>commons-collections</artifactId>
                <version>2.1.1</version>
                <scope>runtime</scope>
        </dependency>  
        
        <dependency>
                <groupId>com.oracle.sql</groupId>
                <artifactId>ojdbc14</artifactId>
                <version>10.2.0.1.0</version>
                <scope>compile</scope>
        </dependency>    
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.2.1</version>
            <exclusions>
                <exclusion>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xerces</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
         
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate</artifactId>
            <version>3.2.3.ga</version>
            <scope>compile</scope>
        </dependency>    
        <dependency>
                <groupId>javax.transaction</groupId>
                <artifactId>jta</artifactId>
                <version>1.0.1B</version>
                <scope>runtime</scope>
        </dependency>    
        <dependency>
                <groupId>antlr</groupId>
                <artifactId>antlr</artifactId>
                <version>2.7.6</version>
                <scope>runtime</scope>
        </dependency>                    
        <dependency>
                <groupId>asm</groupId>
                <artifactId>asm-attrs</artifactId>
                <version>1.5.3</version>
                <scope>runtime</scope>
        </dependency>        
        <dependency>
                <groupId>asm</groupId>
                <artifactId>asm</artifactId>
                <version>1.5.3</version>
                <scope>runtime</scope>
        </dependency>                    
        <dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib</artifactId>
                <version>2.1.3</version>
                <scope>runtime</scope>
        </dependency> 
        <dependency>
                <groupId>net.sf.ehcache</groupId>
                <artifactId>ehcache</artifactId>
                <version>1.2.3</version>
                <scope>runtime</scope>
        </dependency>                                   
        
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.13</version>
            <scope>runtime</scope>
        </dependency>
        
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>javax.activation</groupId>
            <artifactId>activation</artifactId>
            <version>1.1</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>javax.xml.soap</groupId>
            <artifactId>saaj-api</artifactId>
            <version>1.2</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.messaging.saaj</groupId>
            <artifactId>saaj-impl</artifactId>
            <version>1.2</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.fastinfoset</groupId>
            <artifactId>fastinfoset</artifactId>
            <version>1.2.1</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
                <groupId>com.oracle.ultrasearch</groupId>
                <artifactId>ultrasearch_query</artifactId>
                <version>9.0.4</version>
                <scope>compile</scope>
        </dependency>                                 
        <dependency>
                <groupId>com.oracle</groupId>
                <artifactId>classes12</artifactId>
                <version>10.2.0.1.0</version>
                <scope>compile</scope>
        </dependency>
        <dependency>
                <groupId>com.oracle.i18n</groupId>
                <artifactId>orai18n</artifactId>
                <version>10.2.0</version>
                <scope>compile</scope>
        </dependency>   
        <dependency>
                <groupId>com.oracle.i18n</groupId>
                <artifactId>orai18n-mapping</artifactId>
                <version>10.2.0</version>
                <scope>compile</scope>
        </dependency> 
        <dependency>
                <groupId>com.oracle.i18n</groupId>
                <artifactId>orai18n-translation</artifactId>
                <version>10.2.0</version>
                <scope>compile</scope>
        </dependency>
        <dependency>
                <groupId>com.oracle.security</groupId>
                <artifactId>jazn</artifactId>
                <version>10.0.0.0.0</version>
                <scope>compile</scope>
        </dependency> 
        <dependency>
                <groupId>com.oracle.security</groupId>
                <artifactId>jazncore</artifactId>
                <version>10.0.0.0.0</version>
                <scope>compile</scope>
        </dependency>   
        <dependency>
                <groupId>com.oracle.ldap</groupId>
                <artifactId>ldapjclnt10</artifactId>
                <version>1.0</version>
                <scope>compile</scope>
        </dependency>    
        <!-- Junit Testing -->                                           
        <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.1</version>
                <scope>test</scope>
        </dependency>
        <dependency>
                <groupId>easymock</groupId>
                <artifactId>easymock</artifactId>
                <version>2.2</version>
                <scope>test</scope>
        </dependency>
        <dependency>
                <groupId>easymock</groupId>
                <artifactId>easymockclassextension</artifactId>
                <version>2.2.2</version>
                <scope>test</scope>
        </dependency>        
        <dependency>
                <groupId>javax.xml</groupId>
                <artifactId>jaxrpc-api</artifactId>
                <version>1.1</version>
                <scope>test</scope>
        </dependency>         
        <dependency>
                <groupId>javax.xml</groupId>
                <artifactId>jaxrpc-impl</artifactId>
                <version>1.1</version>
                <scope>test</scope>
        </dependency>           
        <dependency>
                <groupId>axis</groupId>
                <artifactId>axis</artifactId>
                <version>1.4</version>
                <scope>runtime</scope>
        </dependency>             
    </dependencies>
</project>


build-maven.xml

<path id="jdk.extras">
                        <fileset dir="C:\Sun\jwsdp-1.6\jaxb\lib">
                                <include name="*.jar"/>
                </fileset>
            </path>
                
            <property name="jdk.extras" refid="jdk.extras"/>
                <property name="maven.runtime.classpath" 
refid="maven.runtime.classpath"/>
                
                <path id="hibernate.tools">
                        <fileset dir="${basedir}/lib">
                                <include name="hibernate-tools.jar"/>
                                <include name="hibernate3.jar"/>
                                <include name="freemarker.jar"/>
                                <include name="ojdbc14.jar"/>
                                <include name="commons-logging-1.1.jar"/>
                                <include name="commons-collections-2.1.1.jar"/>
                                <include name="dom4j-1.6.1.jar"/>
                        </fileset>
                </path>
                <property name="hibernate.tools" refid="hibernate.tools"/>
        </target>

    <target name="generate-sources" depends="init">
        <mkdir dir="${generate.target.directory}"/>   
        <echo message="Generating schema classes..."/>
                <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask"
                        classpathref="jdk.extras"/>
        <xjc target="${generate.target.directory}"
             package="com.srv.mailing.schema"
             schema="${schema}">
            <produces dir="${generate.target.directory}"
includes="**/*.java"/>
        </xjc>
-- 
View this message in context: 
http://www.nabble.com/how-to-include-my-lib-folder-in-the-war-file-tp16482440s177p16482440.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to