You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Nguyen Minh Tuan <mi...@gmail.com> on 2011/07/05 09:42:05 UTC

Questions on importing CXF projects in Eclipse

Hi guys,

I would like to test some new annotations for JAX-WS with CXF. For that, i
wanted to modify the source code of CXF implementation but I failed at
importing CXF projects in Eclipse.

What I have done are:
1. Check out CXF source code using subclipse from
http://svn.apache.org/repos/asf/cxf/trunk
2. Follow instructions in http://cxf.apache.org/setting-up-eclipse.html to
install CXF. In particular, I run the following command "mvn install
-Pfastinstall -Psetup.eclipse -Declipse.workspace.dir="C:\Eclipse Indigo
3.7\cxf workspace""

Everything seems ok. I can see new workspace created the specified folder.
And if I import a sample project into the new workspace, I can successfully
run it.

However, from the new workspace, when I tried to import existing CXF
projects as instructed, I browsed to the directory where I checked out CXF
source code, and there is only one project imported. As instructed in above
link, there should be multiple subprojects that I can import into the new
workspace.

Is there anything I did wrong? Or is the instruction just not updated with
the new release? Btw, I used the latest CXF version 2.4.1

Btw, if I want to add new annotations to JAX-WS, how can I do it and which
part of the source code should I modify so that the new annotations will
take effect at runtime?


-- 
Best regards,
Tuan.

Re: Questions on importing CXF projects in Eclipse

Posted by Nguyen Minh Tuan <mi...@gmail.com>.
Thanks Daniel,

Using external svn client solved the importing problem.

I will have a look at FactoryBeanListener and related stuff as you
suggested.

Btw, what I want to achieve is to enable/disable some service operations at
runtime depending on the annotation. Do you have any suggestion on how to
achieve that?

On Thu, Jul 7, 2011 at 1:11 PM, Daniel Kulp <dk...@apache.org> wrote:

> On Tuesday, July 05, 2011 5:42:05 PM Nguyen Minh Tuan wrote:
> > Hi guys,
> >
> > I would like to test some new annotations for JAX-WS with CXF. For that,
> i
> > wanted to modify the source code of CXF implementation but I failed at
> > importing CXF projects in Eclipse.
> >
> > What I have done are:
> > 1. Check out CXF source code using subclipse from
> > http://svn.apache.org/repos/asf/cxf/trunk
>
> I think this is the problematic step.   When using subclibse, I think it's
> assuming a single project and creating some metadata in there that is
> screwing
> things up.   If you can, I'd suggest using a command line svn client (or
> git
> client and clone the CXF git repo from git.apache.org) and start from
> that.
>
> ALTERNATIVELY, you could try deleting the .project, .classpath, .settings
> stuff from the root area where subclibse checked it out.   That MAY work,
> but
> it may also screw up eclipse.  I'm not really sure.  :-)
>
> <snip>
>
> > Btw, if I want to add new annotations to JAX-WS, how can I do it and
> which
> > part of the source code should I modify so that the new annotations will
> > take effect at runtime?
>
> Depending on what you are trying to achieve, you MAY be able to do it
> without
> modifying CXF code at all.   You can create a FactoryBeanListener, register
> that as a bean via spring or via the normal extension mechanism, and then
> look
> for your annotations during the events.   The
> AnnotationsFactoryBeanListener
> that we have in the code handles most of the custom extra annotations we
> have
> added.   That could be a starting point to look as well.    The
> PolicyAnnotationListener handles the @Policies annotations that we added.
>
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://dankulp.com/blog
> Talend - http://www.talend.com
>



-- 
Best regards,
Tuan.

Re: Questions on importing CXF projects in Eclipse

Posted by Daniel Kulp <dk...@apache.org>.
On Tuesday, July 05, 2011 5:42:05 PM Nguyen Minh Tuan wrote:
> Hi guys,
> 
> I would like to test some new annotations for JAX-WS with CXF. For that, i
> wanted to modify the source code of CXF implementation but I failed at
> importing CXF projects in Eclipse.
> 
> What I have done are:
> 1. Check out CXF source code using subclipse from
> http://svn.apache.org/repos/asf/cxf/trunk

I think this is the problematic step.   When using subclibse, I think it's 
assuming a single project and creating some metadata in there that is screwing 
things up.   If you can, I'd suggest using a command line svn client (or git 
client and clone the CXF git repo from git.apache.org) and start from that.

ALTERNATIVELY, you could try deleting the .project, .classpath, .settings 
stuff from the root area where subclibse checked it out.   That MAY work, but 
it may also screw up eclipse.  I'm not really sure.  :-)

<snip>
 
> Btw, if I want to add new annotations to JAX-WS, how can I do it and which
> part of the source code should I modify so that the new annotations will
> take effect at runtime?

Depending on what you are trying to achieve, you MAY be able to do it without 
modifying CXF code at all.   You can create a FactoryBeanListener, register 
that as a bean via spring or via the normal extension mechanism, and then look 
for your annotations during the events.   The AnnotationsFactoryBeanListener 
that we have in the code handles most of the custom extra annotations we have 
added.   That could be a starting point to look as well.    The 
PolicyAnnotationListener handles the @Policies annotations that we added.   


-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog
Talend - http://www.talend.com