You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Bruce Edge <br...@gmail.com> on 2009/04/21 16:59:05 UTC
packaging question
Apologies, some rookie questions here.
What's the minimum env I need to run cxf and how should it be packaged up
along with the java code for deployment on jetty (or tomcat)?
Any implications to cxf servelet vs spring?
Is there anything smaller, and if so, what do I lose?
Specific RTFM references are appreciated too. It's just a huge FM.
Lastly, are there any examples of Makefiles, maven, ant scripts, etc that
do this?
Thanks, Bruce
Re: packaging question
Posted by Glen Mazza <gl...@gmail.com>.
Generated sources are under the target directory, per Maven's standard
directory layout, because they are to be constantly erased whenever you "mvn
clean". Only files you create yourself should be in the "src" folder.
As for the autogenerated *Impl file, all you need to do is just modify the
service-war pom's wsdl2java call with the setting that you have below so it
will create it for you. Once done, I would copy it from the
target/generated to the src folder so it won't keep getting erased w/mvn
clean. I don't care much for the autogenerated *Impl file, because Eclipse
can add the skeleton methods in for you once you create your service
implementation bean and explicitly extend the SEI (just like it would for
any interface) anyway. That, and the *Impl file would normally keep getting
erased everytime you mvn clean because of its location in the
target/generated folder.
Glen
bedge wrote:
>
> One complication with Glen's
> example<http://www.jroller.com/gmazza/date/20080417>is that it looks
> for the generated sources in
> ./service-war/target/generated/...
> and expects hand written sources in
> ./service-war/src/main/java
>
> There's no mechanism to use the java2wsdl -ipml arg to generate the
> *Impl.java. It requires that it be manually dropped in
> /service-war/src/main/java.
>
> Does this require a second invocation of wsdl2java using a different
> target
> dir when the -ipml arg is used?
>
> -Bruce
>
--
View this message in context: http://www.nabble.com/packaging-question-tp23158012p23223660.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: packaging question
Posted by Bruce Edge <br...@gmail.com>.
>
> Part of the issue is that we don't have very good archetypes for CXF yet.
> Thus, using the m2eclipse plugin to create CXF projects in eclipse that
> work
> well with CXF doesn't work very well. We really only have a single
> "jaxws
> code first" archetype which is very minimalistic.
>
> What we really need is someone to create and submit a couple simple sample
> maven projects that show the various ways to "get started" and then get
> them
> converted to archetypes that would be usable with m2eclipse.
>
> That and the WTP/STP eclipse tooling should then integrate with the
> m2eclipse
> stuff so it all works together seamlessly and consistently, but we kind of
> need the archetypes first.
>
> Any takers?
>
> --
> Daniel Kulp
> <dk...@apache.org>
One complication with Glen's
example<http://www.jroller.com/gmazza/date/20080417>is that it looks
for the generated sources in
./service-war/target/generated/...
and expects hand written sources in
./service-war/src/main/java
There's no mechanism to use the java2wsdl -ipml arg to generate the
*Impl.java. It requires that it be manually dropped in
/service-war/src/main/java.
Does this require a second invocation of wsdl2java using a different target
dir when the -ipml arg is used?
-Bruce
Re: packaging question
Posted by Daniel Kulp <dk...@apache.org>.
On Fri April 24 2009 3:02:14 am Andrew Clegg wrote:
> 2009/4/24 Glen Mazza <gl...@gmail.com>:
> > It would defeat one of the main purposes of Maven if you used a different
> > directory layout with that tool.
>
> +1 for this -- if you use Maven, stick with the Maven, layout
> otherwise other plugins won't know where to look for things and it'll
> be a nightmare of extra configuration...
Part of the issue is that we don't have very good archetypes for CXF yet.
Thus, using the m2eclipse plugin to create CXF projects in eclipse that work
well with CXF doesn't work very well. We really only have a single "jaxws
code first" archetype which is very minimalistic.
What we really need is someone to create and submit a couple simple sample
maven projects that show the various ways to "get started" and then get them
converted to archetypes that would be usable with m2eclipse.
That and the WTP/STP eclipse tooling should then integrate with the m2eclipse
stuff so it all works together seamlessly and consistently, but we kind of
need the archetypes first.
Any takers?
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
Re: packaging question
Posted by Bruce Edge <br...@gmail.com>.
On Fri, Apr 24, 2009 at 12:02 AM, Andrew Clegg <an...@nervechannel.com>wrote:
> 2009/4/24 Glen Mazza <gl...@gmail.com>:
>
> > It would defeat one of the main purposes of Maven if you used a different
> > directory layout with that tool.
>
> +1 for this -- if you use Maven, stick with the Maven, layout
> otherwise other plugins won't know where to look for things and it'll
> be a nightmare of extra configuration...
>
> Andrew.
>
>
That makes sense. I'll stick with maven.
Again, aplogies for the rookie questions. I am RTFM'ing, but there are a lot
of FMs.
In the Glen's maven example, http://www.jroller.com/gmazza/date/20080417,
not all of the code is generated. The DoubleItPortTypeImpl.java file is
added by hand, whereas with the eclipse cxf plugin, the *PortTypeImpl.java
is generated.
Is this just a matter of adding the right options to wsdl2java in the pom?
Thanks
-Bruce
Re: packaging question
Posted by Andrew Clegg <an...@nervechannel.com>.
2009/4/24 Glen Mazza <gl...@gmail.com>:
> It would defeat one of the main purposes of Maven if you used a different
> directory layout with that tool.
+1 for this -- if you use Maven, stick with the Maven, layout
otherwise other plugins won't know where to look for things and it'll
be a nightmare of extra configuration...
Andrew.
--
:: http://biotext.org.uk/ ::
Re: packaging question
Posted by Glen Mazza <gl...@gmail.com>.
bedge wrote:
>
> Does anyone have a set of maven poms that mirror the cxf plugin behavior?
> This would simplify the build process as it would mirror the cxf plugin
> behavior.
>
Hopefully someone else can answer your question, but I don't think you would
want to do that anyway if you're using Maven--as far as I know, my example
follows the Maven standard directory layout:
http://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
It would defeat one of the main purposes of Maven if you used a different
directory layout with that tool.
Glen
--
View this message in context: http://www.nabble.com/packaging-question-tp23158012p23207733.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: packaging question
Posted by Bruce Edge <br...@gmail.com>.
Tn Tue, Apr 21, 2009 at 8:28 AM, Andrew Clegg <an...@nervechannel.com>wrote:
> One of Glen's excellent tutorials covers packaging and deploying using
> both Maven and Ant:
>
> http://www.jroller.com/gmazza/date/20080417
This example creates a different directory structure than the cxf plugin top
down pojo service wizard.
Does anyone have a set of maven poms that mirror the cxf plugin behavior?
This would simplify the build process as it would mirror the cxf plugin
behavior.
Here's the tree generated by the cxf maven howto from the above link
(client stuff removed for simplicity):
./service-war
./service-war/src
./service-war/src/main
./service-war/src/main/java
./service-war/src/main/java/com
./service-war/src/main/java/com/mycompany
./service-war/src/main/java/com/mycompany/webservice
./service-war/src/main/java/com/mycompany/webservice/service
./service-war/src/main/webapp
./service-war/src/main/webapp/WEB-INF
./service-war/src/main/webapp/WEB-INF/lib
./service-war/src/main/webapp/WEB-INF/wsdl
./service-war/src/main/resources
./service-war/src/assembly
./service-war/.settings
and here's the tree generated by the cxf plugin from the same wsdl using the
top down pojo method in the docs:
./.settings
./WebContent
./WebContent/wsdl
./WebContent/WEB-INF
./WebContent/WEB-INF/lib
./WebContent/META-INF
./build
./build/classes
./build/classes/org
./build/classes/org/example
./build/classes/org/example/doubleit
./src
./src/org
./src/org/example
./src/org/example/doubleit
Ideally there would be a method that yielded the same result whether the
build was done from eclipse or the cxf plugin.
-Bruce
>
>
> Andrew.
>
> 2009/4/21 Bruce Edge <br...@gmail.com>:
> > Apologies, some rookie questions here.
> >
> > What's the minimum env I need to run cxf and how should it be packaged up
> > along with the java code for deployment on jetty (or tomcat)?
> > Any implications to cxf servelet vs spring?
> > Is there anything smaller, and if so, what do I lose?
> >
> > Specific RTFM references are appreciated too. It's just a huge FM.
> >
> > Lastly, are there any examples of Makefiles, maven, ant scripts, etc
> that
> > do this?
> >
> > Thanks, Bruce
> >
>
>
>
> --
> :: http://biotext.org.uk/ ::
>
Re: packaging question
Posted by Andrew Clegg <an...@nervechannel.com>.
One of Glen's excellent tutorials covers packaging and deploying using
both Maven and Ant:
http://www.jroller.com/gmazza/date/20080417
Andrew.
2009/4/21 Bruce Edge <br...@gmail.com>:
> Apologies, some rookie questions here.
>
> What's the minimum env I need to run cxf and how should it be packaged up
> along with the java code for deployment on jetty (or tomcat)?
> Any implications to cxf servelet vs spring?
> Is there anything smaller, and if so, what do I lose?
>
> Specific RTFM references are appreciated too. It's just a huge FM.
>
> Lastly, are there any examples of Makefiles, maven, ant scripts, etc that
> do this?
>
> Thanks, Bruce
>
--
:: http://biotext.org.uk/ ::