You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Geeb Otron <sw...@gmail.com> on 2013/11/01 12:36:02 UTC

Using CXF to create a client web-app for a web-service in conjunction with Maven: Un-required dependencies?

I have used CXF to generate a client web-app which uses a web-service as
its data source. (The web service is not a CXF thing - its a WCF windows
service).
Everything is cool - it works fine. :-)

I have used the Eclipse IDE and managed the project with Maven.
I use the cxf-codegen-plugin to generate my underlying code using the WSDL
file published by the service.

My question is this:
*What dependencies of this project can I leave out of the compiled WAR
file, and how?*

Obviously I don't want it to be any larger that it needs to be.
All the CXF components concerned with generation of the underlying code at
development time are surely not required once the code has been generated,
and the web-app is exported to a production environment in a WAR format?

Maven allows a "scope" for each dependency i.e. compile, provided, runtime,
test or system.

What CXF components could be marked with a scope that leaves them IN the
project, but OUT of the WAR file?

Thanks,
-- 
Geeb

If you ain't keen to show me the source, I ain't keen to execute the
program.

Re: Using CXF to create a client web-app for a web-service in conjunction with Maven: Un-required dependencies?

Posted by Geeb Otron <sw...@gmail.com>.
I think I have made progress on this issue, (in case anyone is interested!)

I had a reference to the cxf-codegen-plugin as a *dependency* in my POM
file. This doesn't seem to be required (as clearly it is a plugin and used
only when generating code, not running it).
Having things referenced in the dependency section causes them to be
included in the classpath and appear in the resultant WAR file (assuming
they are marked in the scope "compile" etc).

Altering the POM file and removing plugins from the dependency section
allowed me to reduced the size of the WAR file by a third.

Happy days!


On 1 November 2013 11:36, Geeb Otron <sw...@gmail.com> wrote:

> I have used CXF to generate a client web-app which uses a web-service as
> its data source. (The web service is not a CXF thing - its a WCF windows
> service).
> Everything is cool - it works fine. :-)
>
> I have used the Eclipse IDE and managed the project with Maven.
> I use the cxf-codegen-plugin to generate my underlying code using the WSDL
> file published by the service.
>
> My question is this:
> *What dependencies of this project can I leave out of the compiled WAR
> file, and how?*
>
> Obviously I don't want it to be any larger that it needs to be.
> All the CXF components concerned with generation of the underlying code at
> development time are surely not required once the code has been generated,
> and the web-app is exported to a production environment in a WAR format?
>
> Maven allows a "scope" for each dependency i.e. compile, provided,
> runtime, test or system.
>
> What CXF components could be marked with a scope that leaves them IN the
> project, but OUT of the WAR file?
>
> Thanks,
> --
> Geeb
>
> If you ain't keen to show me the source, I ain't keen to execute the
> program.
>



-- 
-- 
Geeb

If you ain't keen to show me the source, I ain't keen to execute the
program.