On Thu, Sep 23, 2010 at 8:56 AM, Simon Laws <simonsl...@googlemail.com> wrote:
> On Thu, Sep 23, 2010 at 8:37 AM, Simon Nash <n...@apache.org> wrote:
>> Simon Laws wrote:
>>>
>>> I was talking offline to the other Simon about how to import existing
>>> projects into Eclipse. Looking at the docs I realized that we talk
>>> about how to use Eclipse when starting from scratch but don't say much
>>> about how to use Eclipse with existing projects. I had a go at putting
>>> some instructions together in 1.x [1]. If anyone has any suggesting
>>> for improvements please feel free.
>>>
>>> Once they settle down we can add/link similar info to the 2.x site.
>>>
>>> [1]
>>> http://tuscany.apache.org/import-existing-tuscany-sca-projects-into-eclipse.html
>>>
>>> Simon
>>>
>> The maven-based instructions on this web page work fine for importing
>> the Tuscany SCA samples into Eclipse.  However I'm finding it difficult
>> to debug the Tuscany runtime with this setup.
>>
>> The problem is that each imported sample project has a list of dependencies
>> pointing to tuscany-xxx jar files in my local maven repository (M2_REPO).
>> Eclipse doesn't know the location of the source code for these jar files,
>> so I can't view the source and set debug breakpoints within Tuscany
>> runtime code.
>>
>> I found a very painful workaround by selecting one particular dependent
>> jar that I wanted to debug and doing an Eclipse source attachment for
>> that specific jar only.  This worked but I shudder at the thought of
>> having to repeat this manual source attachment for dozens of dependent
>> jars in dozens of samples.
>>
>> Is there a simple convenient way to tell Eclipse that all the dependent
>> jars in the M2_REPO/org/apache/tuscany/sca/xxx path have their source in
>> the Tuscany source distribution zip file?
>>
>>  Simon
>>
>>
>
> This may not be that helpful in the context of using the Tuscany
> source distribution but here's what I know about finding source in the
> context of the Tuscany svn based source environment.
>
> - Source jars. Our build produces source jars (with the sources
> profile) and when you build with maven (without -o) they are
> downloaded to your local repo automatically. Eclipse will pick them up
> from there and show the source for you. There is a *big* downside here
> though. The source jars are out of date all of the time. This is made
> even worse as the Hudson build is not completing and so the source
> jars are getting further and further out of sync. The problem is so
> bad that I physically delete the source jars from my local repo
> whenever they get downloaded as it makes it impossible to debug.
>
> - Inclusion of Tuscany in the workspace. If you do mvn eclipse:eclipse
> for all the Tuscany modules and you do this from the top level of the
> Tuscany build then the inter module references will be to projects in
> the workspace rather than to jars in the local repo. This is not the
> case if you run mvn eclipse:eclipse in individual modules.
>
> - Manual assignment of source. As I run in the PDE and am often
> running samples outside the context of the Tuscany directory structure
> I'm nearly always faced with the prospect of telling eclipse where the
> Tuscany source is. It's seemingly random when and how eclipse asks for
> this information, i.e. it has a selection of different dialogs that it
> uses but I can't detect a pattern. Anyhow I find this mechanism pretty
> convenient and, more important, predictable in terms of allowing me to
> debug the Tuscany source at the right level. It's very easy to waste a
> lot of time in Eclipse trying to work out why the lines you are
> stepping through don't apparently match what's going on.
>
> Simon
>
>
>
> --
> Apache Tuscany committer: tuscany.apache.org
> Co-author of a book about Tuscany and SCA: tuscanyinaction.com
>

b.t.w my source Jar comments refer to 2.x

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Reply via email to