You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Jean-Sebastien Delfino <js...@apache.org> on 2007/09/24 03:53:04 UTC

Two plugins to configure Tuscany in Eclipse, was: Including the SCA spec XSDs in the Tuscany distribution?

Jean-Sebastien Delfino wrote:
> OK, if there's no objection, I'll go ahead and include the XSDs. This 
> will allow us to do a number of interesting things:
>
> - Validate SCA assembly XML when loading .composite, .componentType, 
> .constrainingType, improving our error reporting story. I'll try to 
> see how we can just leverage Validating StAX XMLStreamReaders for that.
>
> - Document how to register the XSDs in an IDE like Eclipse and get 
> validation there too, again improving the error reporting story. We 
> may even be able to provide a simple plugin.xml file that you can drop 
> in your IDE and does the XSD registration for you.
>
> - Define XSDs for our various implementation and binding extensions, 
> extending the core SCA XSDs. I think it is important to help document 
> them.
>
> More on this in the next 2 days if I find a little bit of time to work 
> on it...
>

Hi all,

I spent a lot of time in Eclipse developing Tuscany samples and demos 
recently. I found myself tweaking my various Eclipse workspaces again 
and again to do the following:

- Define a Tuscany User Library containing all the Tuscany JARs to make 
it easier to add them to my project buildpath.

- Associate .composite files with the XML editor and register the SCA 
and Tuscany XML schemas to get code-assist in the editor and validation 
of my composite files.

- Write programs to launch Tuscany configured with my various 
composites... wishing that I could just right-click on the .composite 
and select a Run As / Tuscany...

I'm sure I'm not alone doing these tweaks, again and again... so I 
committed under java/sca/tools a strawman implementation of two small 
Eclipse plugins that configure Tuscany in Eclipse automatically :) They 
should make Tuscany much easier to use in Eclipse.

Module tools/plugin-runtime packages the Tuscany runtime Jars in a 
Tuscany User Library which can be added to a project buildpath.

Module tools/plugin-core:
- Associates .composite files with the Eclipse WTP XML editor
- Registers the SCA and Tuscany XMLSchemas with it, providing XMLSchema 
based content assist and validation when you edit .composite files.
- Declares a launcher that allows you to do Run As / Tuscany on a 
.composite file.

I also put the beginning of an Eclipse feature and updatesite under 
tools/feature and tools/updatesite.

This is all pretty rough. In particular I'm not sure how to build 
plugin-core, the feature and updatesite with Maven as the Maven module 
structure does not seem to fit well with what the Eclipse plugin 
development environment expects.

One of the next steps - if people are interested - could be to add more 
complete validation of .composite files, for example check that 
reference targets or component implementation classes exist, basically 
cover what cannot be validated with just XML schema.

Another thing that has been bothering me when building Webapps with 
Tuscany recently is the 5 lines I needed to add to each web.xml file to 
register the Tuscany servlet filter. A tool could add these lines 
automatically for example.

Thoughts? Is anybody interested in helping with this?

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


RE: Moved plugins under a PDE friendly structure, was: Two plugins to configure Tuscany in Eclipse

Posted by Philippe Ombredanne <po...@gmail.com>.
Jean Seabastien wrote:
> 
> Here's the updated structure in SVN r579109:
> tools/eclipse/plugins/core
> tools/eclipse/plugins/runtime
> tools/eclipse/features/feature
> tools/eclipse/site/updatesite
> 
> This is nicer and will also allow people to create other 
> folders under 
> tools for other environments than eclipse.

Sweet. Dude, you are too fast :-)
I look forward to collaborate.
--
Philippe


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Moved plugins under a PDE friendly structure, was: Two plugins to configure Tuscany in Eclipse

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Philippe Ombredanne wrote:
> Rauymond wrote:
>   
>> It seems that there is a PDE maven plugin @ 
>> http://mojo.codehaus.org/pde-maven-plugin/. Would it help 
>> automate the build for our eclipse plugins?
>>     
> I will check it out.
> Historically maven and eclipse builds have been like oil and water...
> but this may be finally the solution!
> At it drives pde-build which is the right thing to do, eclipse-wise,
> from a correctness point-of-view.
> Also typically to make plugins and features builds easiers, the
> convention is to use --with or without maven-- the plugins under a
> plugins directory and the features under a features directory
> That would require some reorg of SVN the way it is now.
> I would suggest the following reorg:
>
> in tuscany/java/sca/tools/ instead of:
> feature
> plugin-core
> plugin-runtime
> ....
> we should have something like:
> eclipse/plugins/plugin-core
> eclipse/plugins/plugin-runtime
> eclipse/features/feature
> eclipse/site/updatesite
>   

+1 from me

Here's the updated structure in SVN r579109:
tools/eclipse/plugins/core
tools/eclipse/plugins/runtime
tools/eclipse/features/feature
tools/eclipse/site/updatesite

This is nicer and will also allow people to create other folders under 
tools for other environments than eclipse.

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


RE: Two plugins to configure Tuscany in Eclipse, was: Including the SCA spec XSDs in the Tuscany distribution?

Posted by Philippe Ombredanne <po...@gmail.com>.
Rauymond wrote:
> It seems that there is a PDE maven plugin @ 
> http://mojo.codehaus.org/pde-maven-plugin/. Would it help 
> automate the build for our eclipse plugins?
I will check it out.
Historically maven and eclipse builds have been like oil and water...
but this may be finally the solution!
At it drives pde-build which is the right thing to do, eclipse-wise,
from a correctness point-of-view.
Also typically to make plugins and features builds easiers, the
convention is to use --with or without maven-- the plugins under a
plugins directory and the features under a features directory
That would require some reorg of SVN the way it is now.
I would suggest the following reorg:

in tuscany/java/sca/tools/ instead of:
feature
plugin-core
plugin-runtime
....
we should have something like:
eclipse/plugins/plugin-core
eclipse/plugins/plugin-runtime
eclipse/features/feature
eclipse/site/updatesite


-- 
Cheers
Philippe


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Two plugins to configure Tuscany in Eclipse, was: Including the SCA spec XSDs in the Tuscany distribution?

Posted by Raymond Feng <en...@gmail.com>.
It seems that there is a PDE maven plugin @ 
http://mojo.codehaus.org/pde-maven-plugin/. Would it help automate the build 
for our eclipse plugins?

Thanks,
Raymond

----- Original Message ----- 
From: "Jean-Sebastien Delfino" <js...@apache.org>
To: <tu...@ws.apache.org>
Sent: Sunday, September 23, 2007 6:53 PM
Subject: Two plugins to configure Tuscany in Eclipse, was: Including the SCA 
spec XSDs in the Tuscany distribution?


> Jean-Sebastien Delfino wrote:
>> OK, if there's no objection, I'll go ahead and include the XSDs. This 
>> will allow us to do a number of interesting things:
>>
>> - Validate SCA assembly XML when loading .composite, .componentType, 
>> .constrainingType, improving our error reporting story. I'll try to see 
>> how we can just leverage Validating StAX XMLStreamReaders for that.
>>
>> - Document how to register the XSDs in an IDE like Eclipse and get 
>> validation there too, again improving the error reporting story. We may 
>> even be able to provide a simple plugin.xml file that you can drop in 
>> your IDE and does the XSD registration for you.
>>
>> - Define XSDs for our various implementation and binding extensions, 
>> extending the core SCA XSDs. I think it is important to help document 
>> them.
>>
>> More on this in the next 2 days if I find a little bit of time to work on 
>> it...
>>
>
> Hi all,
>
> I spent a lot of time in Eclipse developing Tuscany samples and demos 
> recently. I found myself tweaking my various Eclipse workspaces again and 
> again to do the following:
>
> - Define a Tuscany User Library containing all the Tuscany JARs to make it 
> easier to add them to my project buildpath.
>
> - Associate .composite files with the XML editor and register the SCA and 
> Tuscany XML schemas to get code-assist in the editor and validation of my 
> composite files.
>
> - Write programs to launch Tuscany configured with my various 
> composites... wishing that I could just right-click on the .composite and 
> select a Run As / Tuscany...
>
> I'm sure I'm not alone doing these tweaks, again and again... so I 
> committed under java/sca/tools a strawman implementation of two small 
> Eclipse plugins that configure Tuscany in Eclipse automatically :) They 
> should make Tuscany much easier to use in Eclipse.
>
> Module tools/plugin-runtime packages the Tuscany runtime Jars in a Tuscany 
> User Library which can be added to a project buildpath.
>
> Module tools/plugin-core:
> - Associates .composite files with the Eclipse WTP XML editor
> - Registers the SCA and Tuscany XMLSchemas with it, providing XMLSchema 
> based content assist and validation when you edit .composite files.
> - Declares a launcher that allows you to do Run As / Tuscany on a 
> .composite file.
>
> I also put the beginning of an Eclipse feature and updatesite under 
> tools/feature and tools/updatesite.
>
> This is all pretty rough. In particular I'm not sure how to build 
> plugin-core, the feature and updatesite with Maven as the Maven module 
> structure does not seem to fit well with what the Eclipse plugin 
> development environment expects.
>
> One of the next steps - if people are interested - could be to add more 
> complete validation of .composite files, for example check that reference 
> targets or component implementation classes exist, basically cover what 
> cannot be validated with just XML schema.
>
> Another thing that has been bothering me when building Webapps with 
> Tuscany recently is the 5 lines I needed to add to each web.xml file to 
> register the Tuscany servlet filter. A tool could add these lines 
> automatically for example.
>
> Thoughts? Is anybody interested in helping with this?
>
> -- 
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Two plugins to configure Tuscany in Eclipse, was: Including the SCA spec XSDs in the Tuscany distribution?

Posted by Jean-Sebastien Delfino <js...@apache.org>.
[snip]
Jean-Sebastien Delfino wrote:
> I uploaded an updatesite for the plugins. To try it do the following:
>
> 1. In Eclipse, select Help / Software Updates / Find and Install / 
> Search for new features to install.
>
> 2. Add a new Remote Site, 
> http://people.apache.org/~jsdelfino/tuscany/tools/updatesite.
>
> 3. Select and install the Tuscany feature, it contains the Tuscany and 
> all dependency JARs, about 40Mb.
>
> After restarting your workbench Tuscany should be installed. You can 
> now try this:
>
> 1. Create a new Java project, add the Tuscany User Library to it.
>
> 2. Create a new hello.Hello interface, add the SCA @Remotable 
> annotation to it, and a method to say hello.
>
> 3. Create a new hello.HelloImpl class, implementing the Hello interface.
>
> 4. Create a new src/Hello.composite file, the XML editor will open.
>
> 5. In the editor, write:
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0">
> </composite>

I committed an update of the plugin adding wizards to create new 
.composite and .componentType files containing a skeleton <composite> or 
<componentType> element.

Steps 4 + 5 are now simpler:

Select New / Other / Tuscany / Composite. In the wizard's file name 
field, type Hello.composite. Press Enter

A new Hello.composite file is created, containing:

<composite    xmlns="http://www.osoa.org/xmlns/sca/1.0"
            xmlns:t="http://tuscany.apache.org/xmlns/sca/1.0"
            xmlns:c="http://Hello"
            name="Hello">

</composite>

>
> 6. From now on you can use code assist to write your composite, 
> declare your Hello component and configure it with a Web Service binding:
> <composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
>    name="Hello"
>    targetNamespace="http://hello">
>
>    <component name="Hello">
>        <implementation.java class="hello.HelloImpl"/>
>        <service name="Hello">
>            <binding.ws/>
>        </service>
>    </component>
> </composite>
>
> 7. You're now ready to run your composite. Right click 
> Hello.composite, select Run As / Tuscany. You should see the following 
> in the console view:
> Tuscany starting...
> Composite: Hello.composite
> Sep 24, 2007 10:00:14 AM org.apache.tuscany.sca.node.impl.SCANodeImpl 
> init
> INFO: Domain node will be started stand-alone as node and domain URIs 
> are not provided
> Sep 24, 2007 10:00:17 AM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
> ... more Tomcat info and warning messages
> Sep 24, 2007 10:00:18 AM 
> org.apache.tuscany.sca.http.tomcat.TomcatServer addServletMapping
> INFO: Added Servlet mapping: http://localhost:8085/Hello
> Ready...
> Press enter to shutdown
>
> 8 At this point your Hello service component is up and running. Point 
> your browser to http://localhost:8085/Hello?wsdl. You should get the 
> WSDL generated for the Hello service.
>
> 9 Use whatever Web Service tool you want to talk to the Hello service. 
> If you have Eclipse WTP you can save the WSDL in another project, 
> right-click on it and select Web Services / Test with Web Services 
> Explorer.
>
> A Test project created following these steps is available at 
> http://people.apache.org/~jsdelfino/tuscany/tools/Test.zip
>
> Let me know what you think.
>
-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Two plugins to configure Tuscany in Eclipse, was: Including the SCA spec XSDs in the Tuscany distribution?

Posted by Jean-Sebastien Delfino <js...@apache.org>.
Jean-Sebastien Delfino wrote:
> [snip]
> Luciano Resende wrote:
>> Looks very interesting ? Does this work in trunk, or requires a
>> distribution ?
>
> The plugin-runtime module should contain the JARs from the lib 
> directory of a Tuscany distribution. See the BUILDING file in that 
> module for instructions to build it. Eventually we need a Maven 
> assembly similar to our distribution assembly to build that module 
> automatically.
>
>>  How can I install this on my eclipse IDE ? Can I point
>> to the updatesite already ?
>>
>>   
>
> I'll build an updatesite manually and upload it to my 
> people.apache.org page for you to try.
>

I uploaded an updatesite for the plugins. To try it do the following:

1. In Eclipse, select Help / Software Updates / Find and Install / 
Search for new features to install.

2. Add a new Remote Site, 
http://people.apache.org/~jsdelfino/tuscany/tools/updatesite.

3. Select and install the Tuscany feature, it contains the Tuscany and 
all dependency JARs, about 40Mb.

After restarting your workbench Tuscany should be installed. You can now 
try this:

1. Create a new Java project, add the Tuscany User Library to it.

2. Create a new hello.Hello interface, add the SCA @Remotable annotation 
to it, and a method to say hello.

3. Create a new hello.HelloImpl class, implementing the Hello interface.

4. Create a new src/Hello.composite file, the XML editor will open.

5. In the editor, write:
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0">
</composite>

6. From now on you can use code assist to write your composite, declare 
your Hello component and configure it with a Web Service binding:
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
    name="Hello"
    targetNamespace="http://hello">

    <component name="Hello">
        <implementation.java class="hello.HelloImpl"/>
        <service name="Hello">
            <binding.ws/>
        </service>
    </component>
</composite>

7. You're now ready to run your composite. Right click Hello.composite, 
select Run As / Tuscany. You should see the following in the console view:
Tuscany starting...
Composite: Hello.composite
Sep 24, 2007 10:00:14 AM org.apache.tuscany.sca.node.impl.SCANodeImpl init
INFO: Domain node will be started stand-alone as node and domain URIs 
are not provided
Sep 24, 2007 10:00:17 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.10
... more Tomcat info and warning messages
Sep 24, 2007 10:00:18 AM org.apache.tuscany.sca.http.tomcat.TomcatServer 
addServletMapping
INFO: Added Servlet mapping: http://localhost:8085/Hello
Ready...
Press enter to shutdown

8 At this point your Hello service component is up and running. Point 
your browser to http://localhost:8085/Hello?wsdl. You should get the 
WSDL generated for the Hello service.

9 Use whatever Web Service tool you want to talk to the Hello service. 
If you have Eclipse WTP you can save the WSDL in another project, 
right-click on it and select Web Services / Test with Web Services Explorer.

A Test project created following these steps is available at 
http://people.apache.org/~jsdelfino/tuscany/tools/Test.zip

Let me know what you think.

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Two plugins to configure Tuscany in Eclipse, was: Including the SCA spec XSDs in the Tuscany distribution?

Posted by Jean-Sebastien Delfino <js...@apache.org>.
[snip]
Luciano Resende wrote:
> Looks very interesting ? Does this work in trunk, or requires a
> distribution ?

The plugin-runtime module should contain the JARs from the lib directory 
of a Tuscany distribution. See the BUILDING file in that module for 
instructions to build it. Eventually we need a Maven assembly similar to 
our distribution assembly to build that module automatically.

>  How can I install this on my eclipse IDE ? Can I point
> to the updatesite already ?
>
>   

I'll build an updatesite manually and upload it to my people.apache.org 
page for you to try.

-- 
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: Two plugins to configure Tuscany in Eclipse, was: Including the SCA spec XSDs in the Tuscany distribution?

Posted by Luciano Resende <lu...@gmail.com>.
Looks very interesting ? Does this work in trunk, or requires a
distribution ? How can I install this on my eclipse IDE ? Can I point
to the updatesite already ?

On 9/23/07, Jean-Sebastien Delfino <js...@apache.org> wrote:
> Jean-Sebastien Delfino wrote:
> > OK, if there's no objection, I'll go ahead and include the XSDs. This
> > will allow us to do a number of interesting things:
> >
> > - Validate SCA assembly XML when loading .composite, .componentType,
> > .constrainingType, improving our error reporting story. I'll try to
> > see how we can just leverage Validating StAX XMLStreamReaders for that.
> >
> > - Document how to register the XSDs in an IDE like Eclipse and get
> > validation there too, again improving the error reporting story. We
> > may even be able to provide a simple plugin.xml file that you can drop
> > in your IDE and does the XSD registration for you.
> >
> > - Define XSDs for our various implementation and binding extensions,
> > extending the core SCA XSDs. I think it is important to help document
> > them.
> >
> > More on this in the next 2 days if I find a little bit of time to work
> > on it...
> >
>
> Hi all,
>
> I spent a lot of time in Eclipse developing Tuscany samples and demos
> recently. I found myself tweaking my various Eclipse workspaces again
> and again to do the following:
>
> - Define a Tuscany User Library containing all the Tuscany JARs to make
> it easier to add them to my project buildpath.
>
> - Associate .composite files with the XML editor and register the SCA
> and Tuscany XML schemas to get code-assist in the editor and validation
> of my composite files.
>
> - Write programs to launch Tuscany configured with my various
> composites... wishing that I could just right-click on the .composite
> and select a Run As / Tuscany...
>
> I'm sure I'm not alone doing these tweaks, again and again... so I
> committed under java/sca/tools a strawman implementation of two small
> Eclipse plugins that configure Tuscany in Eclipse automatically :) They
> should make Tuscany much easier to use in Eclipse.
>
> Module tools/plugin-runtime packages the Tuscany runtime Jars in a
> Tuscany User Library which can be added to a project buildpath.
>
> Module tools/plugin-core:
> - Associates .composite files with the Eclipse WTP XML editor
> - Registers the SCA and Tuscany XMLSchemas with it, providing XMLSchema
> based content assist and validation when you edit .composite files.
> - Declares a launcher that allows you to do Run As / Tuscany on a
> .composite file.
>
> I also put the beginning of an Eclipse feature and updatesite under
> tools/feature and tools/updatesite.
>
> This is all pretty rough. In particular I'm not sure how to build
> plugin-core, the feature and updatesite with Maven as the Maven module
> structure does not seem to fit well with what the Eclipse plugin
> development environment expects.
>
> One of the next steps - if people are interested - could be to add more
> complete validation of .composite files, for example check that
> reference targets or component implementation classes exist, basically
> cover what cannot be validated with just XML schema.
>
> Another thing that has been bothering me when building Webapps with
> Tuscany recently is the 5 lines I needed to add to each web.xml file to
> register the Tuscany servlet filter. A tool could add these lines
> automatically for example.
>
> Thoughts? Is anybody interested in helping with this?
>
> --
> Jean-Sebastien
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
>


-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org