You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Vincenzo Vitale <vi...@gmail.com> on 2007/09/11 16:23:51 UTC

What are the min Maven2 dependencies?

Hello all,

I'm trying to expose a simple Spring service with CXF.

I use Maven2 and the maven Jetty plug in to start the application during
development.

What are the minimal dependencies I must add to my pom file?



Thanks,
Vincenzo.

Re: What are the min Maven2 dependencies?

Posted by Vincenzo Vitale <vi...@gmail.com>.
Solved adding also this dependency (the version probably are not the last
ones):

        <dependency>
            <groupId>javax.xml.soap</groupId>
            <artifactId>saaj-api</artifactId>
            <version>1.3</version>
        </dependency>

Now I can begin playing with this... :-)



Ciao,
Vicio.

On 9/11/07, Vincenzo Vitale <vi...@gmail.com> wrote:
>
> Solved the first problem adding:
>
>         <dependency>
>             <groupId>javax.xml.bind</groupId>
>             <artifactId>jaxb-api</artifactId>
>             <version>2.1 </version>
>         </dependency>
>
> Now I obtain:
>                 java.lang.NoClassDefFoundError:
> javax/xml/soap/SOAPException
>
>
>
> On 9/11/07, Vincenzo Vitale <vi...@gmail.com> wrote:
> >
> > Hi Jacob,
> >
> > thanks for your reply.
> >
> > I already have set these dependencies but I got the exception:
> > "Embedded error: Object is not of type class
> > org.mortbay.jetty.webapp.WebAppConte
> > xt"
> >
> > If I remove the last dependency then I got the exception:
> >
> > java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
> >
> > My pom is:
> >
> > <project xmlns=" http://maven.apache.org/POM/4.0.0"
> >     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
> >     xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0
> > http://maven.apache.org/maven-v4_0_0.xsd">
> >
> >     <parent>
> >         <groupId>com.tomtom.oasis</groupId>
> >         <artifactId>oasis</artifactId>
> >         <version>1.1-SNAPSHOT</version>
> >     </parent>
> >
> >     <modelVersion>4.0.0</modelVersion>
> >     <artifactId>oasis-ws-war</artifactId>
> >     <packaging>war</packaging>
> >     <version>1.1-SNAPSHOT</version>
> >
> >     <name>Oasis Web Services Application</name>
> >     <description>
> >         The module providing a WAR file containing the Oasis Web
> >         Services Application.
> >     </description>
> >
> >     <dependencies>
> >
> >         <dependency>
> >             <groupId>org.slf4j</groupId>
> >             <artifactId>slf4j-jcl</artifactId>
> >             <version>1.4.0</version>
> >             <type>jar</type>
> >         </dependency>
> >         <dependency>
> >             <groupId>aspectj</groupId>
> >             <artifactId>aspectjweaver</artifactId>
> >             <version>${aspectj.version}</version>
> >         </dependency>
> >         <dependency>
> >             <groupId>log4j</groupId>
> >             <artifactId>log4j</artifactId>
> >             <version>${log4j.version}</version>
> >             <scope>provided</scope>
> >         </dependency>
> >         <dependency>
> >             <groupId>junit</groupId>
> >             <artifactId>junit</artifactId>
> >             <version>${junit.version}</version>
> >             <scope>test</scope>
> >         </dependency>
> >         <dependency>
> >             <groupId>org.easymock</groupId>
> >             <artifactId>easymock</artifactId>
> >             <version>${easymock.version}</version>
> >             <scope>test</scope>
> >         </dependency>
> >         <dependency>
> >             <groupId>javax.servlet</groupId>
> >             <artifactId>jstl</artifactId>
> >             <version>${jstl.version }</version>
> >         </dependency>
> >         <dependency>
> >             <groupId>javax.servlet</groupId>
> >             <artifactId>servlet-api</artifactId>
> >             <version>${ servlet.version}</version>
> >             <scope>provided</scope>
> >         </dependency>
> >         <dependency>
> >             <groupId>taglibs</groupId>
> >             <artifactId>standard</artifactId>
> >             <version>${taglibs.version}</version>
> >         </dependency>
> >
> >         <!--
> >             Web Services framework.
> >         -->
> >         <dependency>
> >             <groupId> org.apache.cxf</groupId>
> >             <artifactId>cxf-rt-frontend-jaxws</artifactId>
> >             <version>${cxf.version}</version>
> >         </dependency>
> >         <dependency>
> >             <groupId>org.apache.cxf</groupId>
> >             <artifactId>cxf-rt-transports-http</artifactId>
> >             <version>${cxf.version}</version>
> >         </dependency>
> >         <!-- Jetty is needed if you're are not using the CXFServlet -->
> >         <!-- dependency>
> >             <groupId>org.apache.cxf</groupId>
> >             <artifactId>cxf-rt-transports-http-jetty</artifactId>
> >             <version>${cxf.version}</version>
> >         </dependency -->
> >     </dependencies>
> >
> >     <build>
> >         <resources>
> >             <resource>
> >                 <filtering>false</filtering>
> >                 <directory>src/main/java</directory>
> >                 <includes>
> >                     <include>**</include>
> >                 </includes>
> >                 <excludes>
> >                     <exclude>**/*.java</exclude>
> >                 </excludes>
> >             </resource>
> >             <resource>
> >                 <filtering>false</filtering>
> >                 <directory>src/main/resources</directory>
> >                 <includes>
> >                     <include>**</include>
> >                 </includes>
> >             </resource>
> >         </resources>
> >         <finalName>oasis-ws</finalName>
> >     </build>
> >     <profiles>
> >         <!-- Use 'mvn -P maven-jetty jetty:run' to run jetty-->
> >         <profile>
> >             <id>maven-jetty</id>
> >             <build>
> >                 <plugins>
> >                     <plugin>
> >                         <groupId>org.mortbay.jetty</groupId>
> >                         <artifactId>maven-jetty-plugin</artifactId>
> >                         <version>6.0.1</version>
> >                         <dependencies>
> >                             <dependency>
> >                                 <groupId>mysql</groupId>
> >                                 <artifactId>
> >                                     mysql-connector-java
> >                                 </artifactId>
> >                                 <version>${mysql.version}</version>
> >                             </dependency>
> >                             <dependency>
> >                                 <groupId>commons-logging</groupId>
> >                                 <artifactId>commons-logging</artifactId>
> >                                 <version>
> >                                     ${commons-logging.version}
> >                                 </version>
> >                                 <type>jar</type>
> >                             </dependency>
> >                             <dependency>
> >                                 <groupId>org.slf4j </groupId>
> >                                 <artifactId>slf4j-jcl</artifactId>
> >                                 <version>1.4.0</version>
> >                                 <type>jar</type>
> >                             </dependency>
> >                             <dependency>
> >                                 <groupId>log4j</groupId>
> >                                 <artifactId>log4j</artifactId>
> >                                 <version>${log4j.version}</version>
> >                                 <type>jar</type>
> >                             </dependency>
> >                         </dependencies>
> >                         <configuration>
> >                             <contextPath>/webservices</contextPath>
> >                             <!--
> >                                 We need to specify our file to turn off
> > the useFileMappedBuffer
> >                                 parametere value that cause Windows
> > locking problems.
> >                             -->
> >                             <webDefaultXml>
> >                                 src/main/resources/jetty- webdefault.xml
> >                             </webDefaultXml>
> >                             <!--
> >                                 JNDI sources definition.
> >                             -->
> >                             <jettyEnvXml>
> >                                 src/main/resources/jetty-env.xml
> >                             </jettyEnvXml>
> >                             <classesDirectory>
> >                                 eclipse-classes
> >                             </classesDirectory>
> >                         </configuration>
> >                     </plugin>
> >                 </plugins>
> >             </build>
> >         </profile>
> >     </profiles>
> > </project>
> >
> > On 9/11/07, Jacob Marcus <ja...@gmail.com> wrote:
> > >
> > > Vincezo,
> > >
> > > You will find the information here.
> > >
> > > http://cwiki.apache.org/CXF20DOC/maven-integration-and-plugin.html .
> > >
> > > If you are using Aegis databinding, you will need to add that
> > > dependency.
> > >
> > > jacob
> > >
> > > On 9/11/07, Vincenzo Vitale <vi...@gmail.com> wrote:
> > > >
> > > > Hello all,
> > > >
> > > > I'm trying to expose a simple Spring service with CXF.
> > > >
> > > > I use Maven2 and the maven Jetty plug in to start the application
> > > during
> > > > development.
> > > >
> > > > What are the minimal dependencies I must add to my pom file?
> > > >
> > > >
> > > >
> > > > Thanks,
> > > > Vincenzo.
> > > >
> > >
> >
> >
>

Re: What are the min Maven2 dependencies?

Posted by Vincenzo Vitale <vi...@gmail.com>.
Solved the first problem adding:

        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.1</version>
        </dependency>

Now I obtain:
                java.lang.NoClassDefFoundError: javax/xml/soap/SOAPException



On 9/11/07, Vincenzo Vitale <vi...@gmail.com> wrote:
>
> Hi Jacob,
>
> thanks for your reply.
>
> I already have set these dependencies but I got the exception:
> "Embedded error: Object is not of type class
> org.mortbay.jetty.webapp.WebAppConte
> xt"
>
> If I remove the last dependency then I got the exception:
>
> java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
>
> My pom is:
>
> <project xmlns=" http://maven.apache.org/POM/4.0.0"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>     xsi:schemaLocation=" http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
>
>     <parent>
>         <groupId>com.tomtom.oasis</groupId>
>         <artifactId>oasis</artifactId>
>         <version>1.1-SNAPSHOT</version>
>     </parent>
>
>     <modelVersion>4.0.0</modelVersion>
>     <artifactId>oasis-ws-war</artifactId>
>     <packaging>war</packaging>
>     <version>1.1-SNAPSHOT</version>
>
>     <name>Oasis Web Services Application</name>
>     <description>
>         The module providing a WAR file containing the Oasis Web
>         Services Application.
>     </description>
>
>     <dependencies>
>
>         <dependency>
>             <groupId>org.slf4j</groupId>
>             <artifactId>slf4j-jcl</artifactId>
>             <version>1.4.0</version>
>             <type>jar</type>
>         </dependency>
>         <dependency>
>             <groupId>aspectj</groupId>
>             <artifactId>aspectjweaver</artifactId>
>             <version>${aspectj.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>log4j</groupId>
>             <artifactId>log4j</artifactId>
>             <version>${log4j.version}</version>
>             <scope>provided</scope>
>         </dependency>
>         <dependency>
>             <groupId>junit</groupId>
>             <artifactId>junit</artifactId>
>             <version>${junit.version}</version>
>             <scope>test</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.easymock</groupId>
>             <artifactId>easymock</artifactId>
>             <version>${easymock.version}</version>
>             <scope>test</scope>
>         </dependency>
>         <dependency>
>             <groupId>javax.servlet</groupId>
>             <artifactId>jstl</artifactId>
>             <version>${jstl.version }</version>
>         </dependency>
>         <dependency>
>             <groupId>javax.servlet</groupId>
>             <artifactId>servlet-api</artifactId>
>             <version>${ servlet.version}</version>
>             <scope>provided</scope>
>         </dependency>
>         <dependency>
>             <groupId>taglibs</groupId>
>             <artifactId>standard</artifactId>
>             <version>${taglibs.version}</version>
>         </dependency>
>
>         <!--
>             Web Services framework.
>         -->
>         <dependency>
>             <groupId> org.apache.cxf</groupId>
>             <artifactId>cxf-rt-frontend-jaxws</artifactId>
>             <version>${cxf.version}</version>
>         </dependency>
>         <dependency>
>             <groupId>org.apache.cxf</groupId>
>             <artifactId>cxf-rt-transports-http</artifactId>
>             <version>${cxf.version}</version>
>         </dependency>
>         <!-- Jetty is needed if you're are not using the CXFServlet -->
>         <!-- dependency>
>             <groupId>org.apache.cxf</groupId>
>             <artifactId>cxf-rt-transports-http-jetty</artifactId>
>             <version>${cxf.version}</version>
>         </dependency -->
>     </dependencies>
>
>     <build>
>         <resources>
>             <resource>
>                 <filtering>false</filtering>
>                 <directory>src/main/java</directory>
>                 <includes>
>                     <include>**</include>
>                 </includes>
>                 <excludes>
>                     <exclude>**/*.java</exclude>
>                 </excludes>
>             </resource>
>             <resource>
>                 <filtering>false</filtering>
>                 <directory>src/main/resources</directory>
>                 <includes>
>                     <include>**</include>
>                 </includes>
>             </resource>
>         </resources>
>         <finalName>oasis-ws</finalName>
>     </build>
>     <profiles>
>         <!-- Use 'mvn -P maven-jetty jetty:run' to run jetty-->
>         <profile>
>             <id>maven-jetty</id>
>             <build>
>                 <plugins>
>                     <plugin>
>                         <groupId>org.mortbay.jetty</groupId>
>                         <artifactId>maven-jetty-plugin</artifactId>
>                         <version>6.0.1</version>
>                         <dependencies>
>                             <dependency>
>                                 <groupId>mysql</groupId>
>                                 <artifactId>
>                                     mysql-connector-java
>                                 </artifactId>
>                                 <version>${mysql.version}</version>
>                             </dependency>
>                             <dependency>
>                                 <groupId>commons-logging</groupId>
>                                 <artifactId>commons-logging</artifactId>
>                                 <version>
>                                     ${commons-logging.version}
>                                 </version>
>                                 <type>jar</type>
>                             </dependency>
>                             <dependency>
>                                 <groupId>org.slf4j </groupId>
>                                 <artifactId>slf4j-jcl</artifactId>
>                                 <version>1.4.0</version>
>                                 <type>jar</type>
>                             </dependency>
>                             <dependency>
>                                 <groupId>log4j</groupId>
>                                 <artifactId>log4j</artifactId>
>                                 <version>${log4j.version}</version>
>                                 <type>jar</type>
>                             </dependency>
>                         </dependencies>
>                         <configuration>
>                             <contextPath>/webservices</contextPath>
>                             <!--
>                                 We need to specify our file to turn off
> the useFileMappedBuffer
>                                 parametere value that cause Windows
> locking problems.
>                             -->
>                             <webDefaultXml>
>                                 src/main/resources/jetty- webdefault.xml
>                             </webDefaultXml>
>                             <!--
>                                 JNDI sources definition.
>                             -->
>                             <jettyEnvXml>
>                                 src/main/resources/jetty-env.xml
>                             </jettyEnvXml>
>                             <classesDirectory>
>                                 eclipse-classes
>                             </classesDirectory>
>                         </configuration>
>                     </plugin>
>                 </plugins>
>             </build>
>         </profile>
>     </profiles>
> </project>
>
> On 9/11/07, Jacob Marcus <ja...@gmail.com> wrote:
> >
> > Vincezo,
> >
> > You will find the information here.
> >
> > http://cwiki.apache.org/CXF20DOC/maven-integration-and-plugin.html.
> >
> > If you are using Aegis databinding, you will need to add that
> > dependency.
> >
> > jacob
> >
> > On 9/11/07, Vincenzo Vitale <vi...@gmail.com> wrote:
> > >
> > > Hello all,
> > >
> > > I'm trying to expose a simple Spring service with CXF.
> > >
> > > I use Maven2 and the maven Jetty plug in to start the application
> > during
> > > development.
> > >
> > > What are the minimal dependencies I must add to my pom file?
> > >
> > >
> > >
> > > Thanks,
> > > Vincenzo.
> > >
> >
>
>

Re: What are the min Maven2 dependencies?

Posted by Vincenzo Vitale <vi...@gmail.com>.
Hi Jacob,

thanks for your reply.

I already have set these dependencies but I got the exception:
"Embedded error: Object is not of type class
org.mortbay.jetty.webapp.WebAppConte
xt"

If I remove the last dependency then I got the exception:

java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

My pom is:

<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">

    <parent>
        <groupId>com.tomtom.oasis</groupId>
        <artifactId>oasis</artifactId>
        <version>1.1-SNAPSHOT</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>oasis-ws-war</artifactId>
    <packaging>war</packaging>
    <version>1.1-SNAPSHOT</version>

    <name>Oasis Web Services Application</name>
    <description>
        The module providing a WAR file containing the Oasis Web
        Services Application.
    </description>

    <dependencies>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jcl</artifactId>
            <version>1.4.0</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>${aspectj.version}</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <version>${easymock.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>${jstl.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>${servlet.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>taglibs</groupId>
            <artifactId>standard</artifactId>
            <version>${taglibs.version}</version>
        </dependency>

        <!--
            Web Services framework.
        -->
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxws</artifactId>
            <version>${cxf.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http</artifactId>
            <version>${cxf.version}</version>
        </dependency>
        <!-- Jetty is needed if you're are not using the CXFServlet -->
        <!-- dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-transports-http-jetty</artifactId>
            <version>${cxf.version}</version>
        </dependency -->
    </dependencies>

    <build>
        <resources>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/java</directory>
                <includes>
                    <include>**</include>
                </includes>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
            <resource>
                <filtering>false</filtering>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**</include>
                </includes>
            </resource>
        </resources>
        <finalName>oasis-ws</finalName>
    </build>
    <profiles>
        <!-- Use 'mvn -P maven-jetty jetty:run' to run jetty-->
        <profile>
            <id>maven-jetty</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>maven-jetty-plugin</artifactId>
                        <version>6.0.1</version>
                        <dependencies>
                            <dependency>
                                <groupId>mysql</groupId>
                                <artifactId>
                                    mysql-connector-java
                                </artifactId>
                                <version>${mysql.version}</version>
                            </dependency>
                            <dependency>
                                <groupId>commons-logging</groupId>
                                <artifactId>commons-logging</artifactId>
                                <version>
                                    ${commons-logging.version}
                                </version>
                                <type>jar</type>
                            </dependency>
                            <dependency>
                                <groupId>org.slf4j</groupId>
                                <artifactId>slf4j-jcl</artifactId>
                                <version>1.4.0</version>
                                <type>jar</type>
                            </dependency>
                            <dependency>
                                <groupId>log4j</groupId>
                                <artifactId>log4j</artifactId>
                                <version>${log4j.version}</version>
                                <type>jar</type>
                            </dependency>
                        </dependencies>
                        <configuration>
                            <contextPath>/webservices</contextPath>
                            <!--
                                We need to specify our file to turn off the
useFileMappedBuffer
                                parametere value that cause Windows locking
problems.
                            -->
                            <webDefaultXml>
                                src/main/resources/jetty-webdefault.xml
                            </webDefaultXml>
                            <!--
                                JNDI sources definition.
                            -->
                            <jettyEnvXml>
                                src/main/resources/jetty-env.xml
                            </jettyEnvXml>
                            <classesDirectory>
                                eclipse-classes
                            </classesDirectory>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>

On 9/11/07, Jacob Marcus <ja...@gmail.com> wrote:
>
> Vincezo,
>
> You will find the information here.
>
> http://cwiki.apache.org/CXF20DOC/maven-integration-and-plugin.html.
>
> If you are using Aegis databinding, you will need to add that dependency.
>
> jacob
>
> On 9/11/07, Vincenzo Vitale <vi...@gmail.com> wrote:
> >
> > Hello all,
> >
> > I'm trying to expose a simple Spring service with CXF.
> >
> > I use Maven2 and the maven Jetty plug in to start the application during
> > development.
> >
> > What are the minimal dependencies I must add to my pom file?
> >
> >
> >
> > Thanks,
> > Vincenzo.
> >
>

Re: What are the min Maven2 dependencies?

Posted by Jacob Marcus <ja...@gmail.com>.
Vincezo,

You will find the information here.

http://cwiki.apache.org/CXF20DOC/maven-integration-and-plugin.html.

If you are using Aegis databinding, you will need to add that dependency.

jacob

On 9/11/07, Vincenzo Vitale <vi...@gmail.com> wrote:
>
> Hello all,
>
> I'm trying to expose a simple Spring service with CXF.
>
> I use Maven2 and the maven Jetty plug in to start the application during
> development.
>
> What are the minimal dependencies I must add to my pom file?
>
>
>
> Thanks,
> Vincenzo.
>