Re: Contribution URLs
On Fri, 2007-08-10 at 08:18 +0100, Simon Laws wrote: This was the piece of code that was causing me problems... contributionURL = new URL(file:/ + currentDirectory.getCanonicalPath() + /src/main/resources/ + nodeName + /); // Contribute the SCA application Contribution contribution = contributionService.contribute( http://calculator;, contributionURL, resolver, false); Composite composite = contribution.getDeployables().get(0); // Add the deployable composite to the domain domain.getDomainComposite().getIncludes().add(composite); domain.getCompositeBuilder().build(composite); On Linux you should write: ContributionURL = new URL(file:// + currentDirectory.getCanonicalPath() + /src/main/resources/ + nodeName +/); See my previous post. Cheers, Jo. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Contribution URLs
On 8/9/07, Luciano Resende [EMAIL PROTECTED] wrote: Hi Simon, Could you please send the exact URL you are passing to the contribution service ? I have added a test case for what I understood your problem is, and that is working fine, but note that in the test case, I'm calling getClass().getResource(/deployables), and that gives me a url like : file://deployables, and that would pass the logic to correct identify a folder. On 8/9/07, Simon Laws [EMAIL PROTECTED] wrote: I've just noticed that if I have a contribution directory as follows /my/contribution/dir/mycomposite.composite And I pass the source URL /my/contribution/dir to the contribution service it complains that it can't find /my/contribution/mycomposite.composite. If I pass the source URL /my/contribution/dir/ it works (note slash on end). Is this a fault? Simon -- Luciano Resende Apache Tuscany Committer http://people.apache.org/~lresende http://lresende.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hi Luciano This was the piece of code that was causing me problems... contributionURL = new URL(file:/ + currentDirectory.getCanonicalPath() + /src/main/resources/ + nodeName + /); // Contribute the SCA application Contribution contribution = contributionService.contribute( http://calculator;, contributionURL, resolver, false); Composite composite = contribution.getDeployables().get(0); // Add the deployable composite to the domain domain.getDomainComposite().getIncludes().add(composite); domain.getCompositeBuilder().build(composite); Where the directory structure is. src/ main/ resources/ nodeA/ META-INF/ sca-contribution.xml wsdl mutiply.wsdl calculator.composite And I want to read the contribution from the nodeA directory. Maybe you can spot something from this. But if nothing comes to mind immediately don't worry. I'll check this test in over the next few days and we can look at it directly. Regards Simon
Re: Contribution URLs
On 8/10/07, Luciano Resende [EMAIL PROTECTED] wrote: I think your current directory, during the execution of the code, will not be mapped to the root of you project, but probably to target/classes or target/test-classes. Could you check that please ? On 8/10/07, Simon Laws [EMAIL PROTECTED] wrote: On 8/9/07, Luciano Resende [EMAIL PROTECTED] wrote: Hi Simon, Could you please send the exact URL you are passing to the contribution service ? I have added a test case for what I understood your problem is, and that is working fine, but note that in the test case, I'm calling getClass().getResource(/deployables), and that gives me a url like : file://deployables, and that would pass the logic to correct identify a folder. On 8/9/07, Simon Laws [EMAIL PROTECTED] wrote: I've just noticed that if I have a contribution directory as follows /my/contribution/dir/mycomposite.composite And I pass the source URL /my/contribution/dir to the contribution service it complains that it can't find /my/contribution/mycomposite.composite. If I pass the source URL /my/contribution/dir/ it works (note slash on end). Is this a fault? Simon -- Luciano Resende Apache Tuscany Committer http://people.apache.org/~lresende http://lresende.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hi Luciano This was the piece of code that was causing me problems... contributionURL = new URL(file:/ + currentDirectory.getCanonicalPath() + /src/main/resources/ + nodeName + /); // Contribute the SCA application Contribution contribution = contributionService.contribute( http://calculator;, contributionURL, resolver, false); Composite composite = contribution.getDeployables().get(0); // Add the deployable composite to the domain domain.getDomainComposite().getIncludes().add(composite); domain.getCompositeBuilder().build(composite); Where the directory structure is. src/ main/ resources/ nodeA/ META-INF/ sca-contribution.xml wsdl mutiply.wsdl calculator.composite And I want to read the contribution from the nodeA directory. Maybe you can spot something from this. But if nothing comes to mind immediately don't worry. I'll check this test in over the next few days and we can look at it directly. Regards Simon -- Luciano Resende Apache Tuscany Committer http://people.apache.org/~lresende http://lresende.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] currently I'm mapping it to root directory of my project, i.e the directory that holds src. I could map it to test/classes as, of course, maven copies the resources there also. Would that make a difference? Simon
Re: Contribution URLs
I think your current directory, during the execution of the code, will not be mapped to the root of you project, but probably to target/classes or target/test-classes. Could you check that please ? On 8/10/07, Simon Laws [EMAIL PROTECTED] wrote: On 8/9/07, Luciano Resende [EMAIL PROTECTED] wrote: Hi Simon, Could you please send the exact URL you are passing to the contribution service ? I have added a test case for what I understood your problem is, and that is working fine, but note that in the test case, I'm calling getClass().getResource(/deployables), and that gives me a url like : file://deployables, and that would pass the logic to correct identify a folder. On 8/9/07, Simon Laws [EMAIL PROTECTED] wrote: I've just noticed that if I have a contribution directory as follows /my/contribution/dir/mycomposite.composite And I pass the source URL /my/contribution/dir to the contribution service it complains that it can't find /my/contribution/mycomposite.composite. If I pass the source URL /my/contribution/dir/ it works (note slash on end). Is this a fault? Simon -- Luciano Resende Apache Tuscany Committer http://people.apache.org/~lresende http://lresende.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Hi Luciano This was the piece of code that was causing me problems... contributionURL = new URL(file:/ + currentDirectory.getCanonicalPath() + /src/main/resources/ + nodeName + /); // Contribute the SCA application Contribution contribution = contributionService.contribute( http://calculator;, contributionURL, resolver, false); Composite composite = contribution.getDeployables().get(0); // Add the deployable composite to the domain domain.getDomainComposite().getIncludes().add(composite); domain.getCompositeBuilder().build(composite); Where the directory structure is. src/ main/ resources/ nodeA/ META-INF/ sca-contribution.xml wsdl mutiply.wsdl calculator.composite And I want to read the contribution from the nodeA directory. Maybe you can spot something from this. But if nothing comes to mind immediately don't worry. I'll check this test in over the next few days and we can look at it directly. Regards Simon -- Luciano Resende Apache Tuscany Committer http://people.apache.org/~lresende http://lresende.blogspot.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]