You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by ant elder <an...@gmail.com> on 2009/11/02 13:47:07 UTC

Adding shaded modules to build aggregated jars of tuscany modules

FYI, I've started looking again at using the shade plugin to build
jars containing multiple Tuscany modules. See
https://svn.apache.org/repos/asf/tuscany/java/sca/shades/. That
creates a 'base' jar that contains everything needed to run Tuscany
standalone or in webapps that use Java components and they can
participate in a distributed domain. It requires JDK6.  I've also
started adding support for remote use of the SCAClient API which will
also go in the base jar so clients can use the single jar to access
services in the domain. Its still work in progress but feel free to
come and help.

   ...ant

Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by Raymond Feng <en...@gmail.com>.
What problems do you try to solve here? shortening the classpath for user 
applications? Making the maven dependencies easier to configure?

Some use cases will help us understand aggregated jars will be beneficial.

Thanks,
Raymond
--------------------------------------------------
From: "ant elder" <an...@gmail.com>
Sent: Monday, November 02, 2009 4:47 AM
To: <de...@tuscany.apache.org>
Subject: Adding shaded modules to build aggregated jars of tuscany modules

> FYI, I've started looking again at using the shade plugin to build
> jars containing multiple Tuscany modules. See
> https://svn.apache.org/repos/asf/tuscany/java/sca/shades/. That
> creates a 'base' jar that contains everything needed to run Tuscany
> standalone or in webapps that use Java components and they can
> participate in a distributed domain. It requires JDK6.  I've also
> started adding support for remote use of the SCAClient API which will
> also go in the base jar so clients can use the single jar to access
> services in the domain. Its still work in progress but feel free to
> come and help.
>
>   ...ant 


Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by ant elder <an...@gmail.com>.
On Mon, Nov 16, 2009 at 4:26 PM, Johnny Simons <jo...@yahoo.com> wrote:
> Are there going to be OSGi manifests added to these jars?
>
> J
>

Sounds like a good idea to me. I'll have a go but expect it will take
a few iterations to get correct, if other more OSGi knowledgeable
people can help that would be great.

   ...ant

Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by ant elder <an...@apache.org>.
Great suggestion, i shall go change them to use org.apache.tuscany.sca.shades

  ...ant

On Thu, Jan 7, 2010 at 4:05 PM, scatest4 <sc...@gmail.com> wrote:
> Thats looks good, is there a reason Tuscany uses maven groupid
> org.apache.tuscany.sca for everything? If these shaded jars used a
> separate groupid it would be easier to see what jars are available
> just by looking in the Maven repository
>
> On 1/7/10, ant elder <an...@gmail.com> wrote:
>> On Tue, Nov 17, 2009 at 9:18 AM, ant elder <an...@gmail.com> wrote:
>>> On Mon, Nov 16, 2009 at 4:49 PM, Luciano Resende <lu...@gmail.com>
>>> wrote:
>>>> On Mon, Nov 16, 2009 at 8:26 AM, Johnny Simons <jo...@yahoo.com>
>>>> wrote:
>>>>> Are there going to be OSGi manifests added to these jars?
>>>>>
>>>>
>>>> Now comes the fun, enforcing modularity in the shaded jars :)
>>>>
>>>
>>>
>>> Actually I don't see any issue, the shaded jars would work just like
>>> the individual jars but instead of having all the OSGi headers
>>> scattered over many manifests they'll be in the single manifest.
>>> Looking around other OSGi projects doing this seems quite a common
>>> practice. It may also be useful to see these all in one place so we
>>> can for example easily see what are the complete set of api/spi
>>> exports we have in Tuscany.
>>>
>>>   ...ant
>>>
>>
>> FYI, i've updated the shaded jars to have separate jars with just the
>> Tuscany classes in one jar and the Tuscany classes plus all the
>> dependencies in another jar named with the suffix -nodep. That matches
>> the way a number of other projects do things. I've also started adding
>> shaded jars for more extensions, ideally I'll get all of them done for
>> the M5 release (though i wont hold the release if they're not all done
>> in time). If anyone wants to help that would be good, it would be
>> great to get the OSGi manifest headers done for these too if anyone
>> wants to help with that,
>>
>>    ...ant
>>
>

Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by scatest4 <sc...@gmail.com>.
Thats looks good, is there a reason Tuscany uses maven groupid
org.apache.tuscany.sca for everything? If these shaded jars used a
separate groupid it would be easier to see what jars are available
just by looking in the Maven repository

On 1/7/10, ant elder <an...@gmail.com> wrote:
> On Tue, Nov 17, 2009 at 9:18 AM, ant elder <an...@gmail.com> wrote:
>> On Mon, Nov 16, 2009 at 4:49 PM, Luciano Resende <lu...@gmail.com>
>> wrote:
>>> On Mon, Nov 16, 2009 at 8:26 AM, Johnny Simons <jo...@yahoo.com>
>>> wrote:
>>>> Are there going to be OSGi manifests added to these jars?
>>>>
>>>
>>> Now comes the fun, enforcing modularity in the shaded jars :)
>>>
>>
>>
>> Actually I don't see any issue, the shaded jars would work just like
>> the individual jars but instead of having all the OSGi headers
>> scattered over many manifests they'll be in the single manifest.
>> Looking around other OSGi projects doing this seems quite a common
>> practice. It may also be useful to see these all in one place so we
>> can for example easily see what are the complete set of api/spi
>> exports we have in Tuscany.
>>
>>   ...ant
>>
>
> FYI, i've updated the shaded jars to have separate jars with just the
> Tuscany classes in one jar and the Tuscany classes plus all the
> dependencies in another jar named with the suffix -nodep. That matches
> the way a number of other projects do things. I've also started adding
> shaded jars for more extensions, ideally I'll get all of them done for
> the M5 release (though i wont hold the release if they're not all done
> in time). If anyone wants to help that would be good, it would be
> great to get the OSGi manifest headers done for these too if anyone
> wants to help with that,
>
>    ...ant
>

Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by ant elder <an...@gmail.com>.
On Tue, Nov 17, 2009 at 9:18 AM, ant elder <an...@gmail.com> wrote:
> On Mon, Nov 16, 2009 at 4:49 PM, Luciano Resende <lu...@gmail.com> wrote:
>> On Mon, Nov 16, 2009 at 8:26 AM, Johnny Simons <jo...@yahoo.com> wrote:
>>> Are there going to be OSGi manifests added to these jars?
>>>
>>
>> Now comes the fun, enforcing modularity in the shaded jars :)
>>
>
>
> Actually I don't see any issue, the shaded jars would work just like
> the individual jars but instead of having all the OSGi headers
> scattered over many manifests they'll be in the single manifest.
> Looking around other OSGi projects doing this seems quite a common
> practice. It may also be useful to see these all in one place so we
> can for example easily see what are the complete set of api/spi
> exports we have in Tuscany.
>
>   ...ant
>

FYI, i've updated the shaded jars to have separate jars with just the
Tuscany classes in one jar and the Tuscany classes plus all the
dependencies in another jar named with the suffix -nodep. That matches
the way a number of other projects do things. I've also started adding
shaded jars for more extensions, ideally I'll get all of them done for
the M5 release (though i wont hold the release if they're not all done
in time). If anyone wants to help that would be good, it would be
great to get the OSGi manifest headers done for these too if anyone
wants to help with that,

   ...ant

Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by ant elder <an...@gmail.com>.
On Mon, Nov 16, 2009 at 4:49 PM, Luciano Resende <lu...@gmail.com> wrote:
> On Mon, Nov 16, 2009 at 8:26 AM, Johnny Simons <jo...@yahoo.com> wrote:
>> Are there going to be OSGi manifests added to these jars?
>>
>
> Now comes the fun, enforcing modularity in the shaded jars :)
>


Actually I don't see any issue, the shaded jars would work just like
the individual jars but instead of having all the OSGi headers
scattered over many manifests they'll be in the single manifest.
Looking around other OSGi projects doing this seems quite a common
practice. It may also be useful to see these all in one place so we
can for example easily see what are the complete set of api/spi
exports we have in Tuscany.

   ...ant

Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by Luciano Resende <lu...@gmail.com>.
On Mon, Nov 16, 2009 at 8:26 AM, Johnny Simons <jo...@yahoo.com> wrote:
> Are there going to be OSGi manifests added to these jars?
>

Now comes the fun, enforcing modularity in the shaded jars :)



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

Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by Johnny Simons <jo...@yahoo.com>.
Are there going to be OSGi manifests added to these jars?

J




________________________________
From: ant elder <an...@apache.org>
To: dev@tuscany.apache.org
Sent: Sun, November 15, 2009 7:50:38 AM
Subject: Re: Adding shaded modules to build aggregated jars of tuscany modules

Ok the tuscany-base jar  now includes support for the JMS binding. For
now you also need to include the tuscany-webservices jar as well if
you're using one of the XML based JMS message formats, thats just for
now though i've started changing to JMS binding code to not depend on
Axis2 and will hopefully have that done in a week or so.

   ...ant

On Wed, Nov 11, 2009 at 3:21 PM, scatest4 <sc...@gmail.com> wrote:
> Thanks. ...And what about JMS support?
>
> On 11/10/09, ant elder <an...@apache.org> wrote:
>> Its still TBD and in progress. I've added a shaded jar for webservices
>> support so theres now tuscany-base [1] and tuscany-webservices [2].
>> The base jar includes all the Tuscany runtime, Java components, SCA
>> and RMI bindings, and distributed domain support. The webservices jar
>> includes interface.wsdl and the WS binding. Running standalone you
>> also need add Jetty jars yourself. These should be considered open to
>> change for now, any suggestions on better or different ways to arrange
>> them welcome .
>>
>>    ...ant
>>
>> [1]
>> http://people.apache.org/repo/m2-snapshot-repository/org/apache/tuscany/sca/tuscany-base/2.0-SNAPSHOT/tuscany-base-2.0-SNAPSHOT.jar
>> [2]
>> http://people.apache.org/repo/m2-snapshot-repository/org/apache/tuscany/sca/tuscany-webservices/2.0-SNAPSHOT/tuscany-webservices-2.0-SNAPSHOT.jar
>>



      

Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by ant elder <an...@apache.org>.
Ok the tuscany-base jar  now includes support for the JMS binding. For
now you also need to include the tuscany-webservices jar as well if
you're using one of the XML based JMS message formats, thats just for
now though i've started changing to JMS binding code to not depend on
Axis2 and will hopefully have that done in a week or so.

   ...ant

On Wed, Nov 11, 2009 at 3:21 PM, scatest4 <sc...@gmail.com> wrote:
> Thanks. ...And what about JMS support?
>
> On 11/10/09, ant elder <an...@apache.org> wrote:
>> Its still TBD and in progress. I've added a shaded jar for webservices
>> support so theres now tuscany-base [1] and tuscany-webservices [2].
>> The base jar includes all the Tuscany runtime, Java components, SCA
>> and RMI bindings, and distributed domain support. The webservices jar
>> includes interface.wsdl and the WS binding. Running standalone you
>> also need add Jetty jars yourself. These should be considered open to
>> change for now, any suggestions on better or different ways to arrange
>> them welcome .
>>
>>    ...ant
>>
>> [1]
>> http://people.apache.org/repo/m2-snapshot-repository/org/apache/tuscany/sca/tuscany-base/2.0-SNAPSHOT/tuscany-base-2.0-SNAPSHOT.jar
>> [2]
>> http://people.apache.org/repo/m2-snapshot-repository/org/apache/tuscany/sca/tuscany-webservices/2.0-SNAPSHOT/tuscany-webservices-2.0-SNAPSHOT.jar
>>

Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by scatest4 <sc...@gmail.com>.
Thanks. ...And what about JMS support?

On 11/10/09, ant elder <an...@apache.org> wrote:
> Its still TBD and in progress. I've added a shaded jar for webservices
> support so theres now tuscany-base [1] and tuscany-webservices [2].
> The base jar includes all the Tuscany runtime, Java components, SCA
> and RMI bindings, and distributed domain support. The webservices jar
> includes interface.wsdl and the WS binding. Running standalone you
> also need add Jetty jars yourself. These should be considered open to
> change for now, any suggestions on better or different ways to arrange
> them welcome .
>
>    ...ant
>
> [1]
> http://people.apache.org/repo/m2-snapshot-repository/org/apache/tuscany/sca/tuscany-base/2.0-SNAPSHOT/tuscany-base-2.0-SNAPSHOT.jar
> [2]
> http://people.apache.org/repo/m2-snapshot-repository/org/apache/tuscany/sca/tuscany-webservices/2.0-SNAPSHOT/tuscany-webservices-2.0-SNAPSHOT.jar
>
> On Sat, Nov 7, 2009 at 12:57 PM, scatest4 <sc...@gmail.com> wrote:
>> I've been trying the tuscany-base jar, it does seem much easier. How
>> can I use it and have support for things like <binding.ws> or
>> <binding.jms>, is that still TBD?
>>
>> On 11/3/09, ant elder <an...@apache.org> wrote:
>>> On Mon, Nov 2, 2009 at 11:15 PM, Luciano Resende <lu...@gmail.com>
>>> wrote:
>>>> On Mon, Nov 2, 2009 at 4:47 AM, ant elder <an...@gmail.com> wrote:
>>>>> FYI, I've started looking again at using the shade plugin to build
>>>>> jars containing multiple Tuscany modules. See
>>>>> https://svn.apache.org/repos/asf/tuscany/java/sca/shades/. That
>>>>> creates a 'base' jar that contains everything needed to run Tuscany
>>>>> standalone or in webapps that use Java components and they can
>>>>> participate in a distributed domain. It requires JDK6.  I've also
>>>>> started adding support for remote use of the SCAClient API which will
>>>>> also go in the base jar so clients can use the single jar to access
>>>>> services in the domain. Its still work in progress but feel free to
>>>>> come and help.
>>>>>
>>>>
>>>> As long as this is something optional, I'm +0. In a side note, it
>>>> would be good to understand the issue that you are trying to solve
>>>> (some usage scenarios), otherwise it seems that we have different
>>>> options that are more flexible and should have the same end user
>>>> experience (e.g features, node/domain launchers, etc).
>>>>
>>>
>>> The point of shaded jars is to make it easier to use the tuscany jars
>>> and dependencies.
>>>
>>> We dont have a very good story for this in Tuscany so far, the problem
>>> with the feature modules is that they only work with Maven (and IMHO
>>> aren't in a very useful set of groupings), the launchers are only
>>> really useful when using the standalone runtime and they need an
>>> installed distribution. Because of those issues we're exposing users
>>> to the internals of Tuscany and forcing them to try to understand how
>>> the many tuscany and dependency jars fit together, and that set of
>>> jars is continually changing so we keep breaking people. There will be
>>> uses where the flexibility of the many modules may be needed but there
>>> are also uses where its not, so shaded jars should make those
>>> significantly easier,
>>>
>>>   ...ant
>>>
>>
>

Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by ant elder <an...@apache.org>.
Its still TBD and in progress. I've added a shaded jar for webservices
support so theres now tuscany-base [1] and tuscany-webservices [2].
The base jar includes all the Tuscany runtime, Java components, SCA
and RMI bindings, and distributed domain support. The webservices jar
includes interface.wsdl and the WS binding. Running standalone you
also need add Jetty jars yourself. These should be considered open to
change for now, any suggestions on better or different ways to arrange
them welcome .

   ...ant

[1] http://people.apache.org/repo/m2-snapshot-repository/org/apache/tuscany/sca/tuscany-base/2.0-SNAPSHOT/tuscany-base-2.0-SNAPSHOT.jar
[2] http://people.apache.org/repo/m2-snapshot-repository/org/apache/tuscany/sca/tuscany-webservices/2.0-SNAPSHOT/tuscany-webservices-2.0-SNAPSHOT.jar

On Sat, Nov 7, 2009 at 12:57 PM, scatest4 <sc...@gmail.com> wrote:
> I've been trying the tuscany-base jar, it does seem much easier. How
> can I use it and have support for things like <binding.ws> or
> <binding.jms>, is that still TBD?
>
> On 11/3/09, ant elder <an...@apache.org> wrote:
>> On Mon, Nov 2, 2009 at 11:15 PM, Luciano Resende <lu...@gmail.com>
>> wrote:
>>> On Mon, Nov 2, 2009 at 4:47 AM, ant elder <an...@gmail.com> wrote:
>>>> FYI, I've started looking again at using the shade plugin to build
>>>> jars containing multiple Tuscany modules. See
>>>> https://svn.apache.org/repos/asf/tuscany/java/sca/shades/. That
>>>> creates a 'base' jar that contains everything needed to run Tuscany
>>>> standalone or in webapps that use Java components and they can
>>>> participate in a distributed domain. It requires JDK6.  I've also
>>>> started adding support for remote use of the SCAClient API which will
>>>> also go in the base jar so clients can use the single jar to access
>>>> services in the domain. Its still work in progress but feel free to
>>>> come and help.
>>>>
>>>
>>> As long as this is something optional, I'm +0. In a side note, it
>>> would be good to understand the issue that you are trying to solve
>>> (some usage scenarios), otherwise it seems that we have different
>>> options that are more flexible and should have the same end user
>>> experience (e.g features, node/domain launchers, etc).
>>>
>>
>> The point of shaded jars is to make it easier to use the tuscany jars
>> and dependencies.
>>
>> We dont have a very good story for this in Tuscany so far, the problem
>> with the feature modules is that they only work with Maven (and IMHO
>> aren't in a very useful set of groupings), the launchers are only
>> really useful when using the standalone runtime and they need an
>> installed distribution. Because of those issues we're exposing users
>> to the internals of Tuscany and forcing them to try to understand how
>> the many tuscany and dependency jars fit together, and that set of
>> jars is continually changing so we keep breaking people. There will be
>> uses where the flexibility of the many modules may be needed but there
>> are also uses where its not, so shaded jars should make those
>> significantly easier,
>>
>>   ...ant
>>
>

Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by scatest4 <sc...@gmail.com>.
I've been trying the tuscany-base jar, it does seem much easier. How
can I use it and have support for things like <binding.ws> or
<binding.jms>, is that still TBD?

On 11/3/09, ant elder <an...@apache.org> wrote:
> On Mon, Nov 2, 2009 at 11:15 PM, Luciano Resende <lu...@gmail.com>
> wrote:
>> On Mon, Nov 2, 2009 at 4:47 AM, ant elder <an...@gmail.com> wrote:
>>> FYI, I've started looking again at using the shade plugin to build
>>> jars containing multiple Tuscany modules. See
>>> https://svn.apache.org/repos/asf/tuscany/java/sca/shades/. That
>>> creates a 'base' jar that contains everything needed to run Tuscany
>>> standalone or in webapps that use Java components and they can
>>> participate in a distributed domain. It requires JDK6.  I've also
>>> started adding support for remote use of the SCAClient API which will
>>> also go in the base jar so clients can use the single jar to access
>>> services in the domain. Its still work in progress but feel free to
>>> come and help.
>>>
>>
>> As long as this is something optional, I'm +0. In a side note, it
>> would be good to understand the issue that you are trying to solve
>> (some usage scenarios), otherwise it seems that we have different
>> options that are more flexible and should have the same end user
>> experience (e.g features, node/domain launchers, etc).
>>
>
> The point of shaded jars is to make it easier to use the tuscany jars
> and dependencies.
>
> We dont have a very good story for this in Tuscany so far, the problem
> with the feature modules is that they only work with Maven (and IMHO
> aren't in a very useful set of groupings), the launchers are only
> really useful when using the standalone runtime and they need an
> installed distribution. Because of those issues we're exposing users
> to the internals of Tuscany and forcing them to try to understand how
> the many tuscany and dependency jars fit together, and that set of
> jars is continually changing so we keep breaking people. There will be
> uses where the flexibility of the many modules may be needed but there
> are also uses where its not, so shaded jars should make those
> significantly easier,
>
>   ...ant
>

Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by ant elder <an...@apache.org>.
On Mon, Nov 2, 2009 at 11:15 PM, Luciano Resende <lu...@gmail.com> wrote:
> On Mon, Nov 2, 2009 at 4:47 AM, ant elder <an...@gmail.com> wrote:
>> FYI, I've started looking again at using the shade plugin to build
>> jars containing multiple Tuscany modules. See
>> https://svn.apache.org/repos/asf/tuscany/java/sca/shades/. That
>> creates a 'base' jar that contains everything needed to run Tuscany
>> standalone or in webapps that use Java components and they can
>> participate in a distributed domain. It requires JDK6.  I've also
>> started adding support for remote use of the SCAClient API which will
>> also go in the base jar so clients can use the single jar to access
>> services in the domain. Its still work in progress but feel free to
>> come and help.
>>
>
> As long as this is something optional, I'm +0. In a side note, it
> would be good to understand the issue that you are trying to solve
> (some usage scenarios), otherwise it seems that we have different
> options that are more flexible and should have the same end user
> experience (e.g features, node/domain launchers, etc).
>

The point of shaded jars is to make it easier to use the tuscany jars
and dependencies.

We dont have a very good story for this in Tuscany so far, the problem
with the feature modules is that they only work with Maven (and IMHO
aren't in a very useful set of groupings), the launchers are only
really useful when using the standalone runtime and they need an
installed distribution. Because of those issues we're exposing users
to the internals of Tuscany and forcing them to try to understand how
the many tuscany and dependency jars fit together, and that set of
jars is continually changing so we keep breaking people. There will be
uses where the flexibility of the many modules may be needed but there
are also uses where its not, so shaded jars should make those
significantly easier,

  ...ant

Re: Adding shaded modules to build aggregated jars of tuscany modules

Posted by Luciano Resende <lu...@gmail.com>.
On Mon, Nov 2, 2009 at 4:47 AM, ant elder <an...@gmail.com> wrote:
> FYI, I've started looking again at using the shade plugin to build
> jars containing multiple Tuscany modules. See
> https://svn.apache.org/repos/asf/tuscany/java/sca/shades/. That
> creates a 'base' jar that contains everything needed to run Tuscany
> standalone or in webapps that use Java components and they can
> participate in a distributed domain. It requires JDK6.  I've also
> started adding support for remote use of the SCAClient API which will
> also go in the base jar so clients can use the single jar to access
> services in the domain. Its still work in progress but feel free to
> come and help.
>

As long as this is something optional, I'm +0. In a side note, it
would be good to understand the issue that you are trying to solve
(some usage scenarios), otherwise it seems that we have different
options that are more flexible and should have the same end user
experience (e.g features, node/domain launchers, etc).

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