On Tue, Nov 2, 2010 at 9:38 PM, Saminda Wijeratne <[email protected]> wrote:
> > > On Tue, Nov 2, 2010 at 6:59 PM, Harshana Martin <[email protected]> wrote: > >> Hi All, >> >> I have completed the implementation of Car Export mechanism in Java IO and >> tested. It works fine. Then I packaged it in to a jar with the custom Ant >> Task which I have written before and included it in an existing C-App >> project. Then created the build file and ran it against ant. It >> successfully exported the Car file to the target. So this means I have done >> this task successfully. Though it works fine, I have few more concerns right >> now. >> >> I am using Axiom for XML parsing. Therefore we have to provide Axiom and >> some other jars including logging in order to run the build successfully. >> Therefore I don't think it is a good idea to include these jar libraries in >> each and every C-App project. So is it ok to expect that user have set the >> ECLIPSE.HOME environment variable to the location where Eclipse/Carbon >> Studio exist? I have to point several jars including Axiom, commons.io, >> commons.logging, etc. >> > +1 > user HAS TO point to an eclipse.home where carbon studio is installed. so > this should cause any problems at all. Correct me if I'm wrong but I dont > think you need to separately point to the location of those libraries in > eclipse home. > No. We don't. We can point to the ECLIPSE__HOME and ask ant to resolve dependencies from the jars included in there. So we don't need to point to individual jars. Extremely sorry for the confusion. Thanks and Regards, Harshana > Saminda > >> >> Any thoughts? >> >> Thanks and Regards, >> Harshana >> >> >> On Mon, Nov 1, 2010 at 3:26 PM, Harshana Martin <[email protected]>wrote: >> >>> Hi, >>> >>> On Mon, Nov 1, 2010 at 1:20 PM, Saminda Wijeratne <[email protected]>wrote: >>> >>>> >>>> >>>> On Mon, Nov 1, 2010 at 11:23 AM, Harshana Martin <[email protected]>wrote: >>>> >>>>> Hi Chathuri, >>>>> >>>>> This is exactly what's in my mind. Instead of IProject parameter, I am >>>>> going to overload the method to accept Project Location parameter in >>>>> String >>>>> format. This will solve allow us to use the existing API inside Eclipse >>>>> and >>>>> the overloaded method can be used when we work outside of Eclipse. This >>>>> change will be useful if we are going to support Maven for C-App projects >>>>> as >>>>> well. >>>>> >>>> >>>> +1 >>>> Harshana figure out what API level changes needed and do it now itself. >>>> >>> >>> Sure. >>> >>>> Anyway the car exporting process is not still under direct API level >>>> exposed to other parties. You will have to make checks where the eclipse UI >>>> threads related tasks are not applicable and skip them. >>>> >>> >>> I just tried to reuse the existing method of exporting a Car file. But it >>> is almost impossible to reuse the existing implementation since we are >>> heavily depending on the Eclipse Resources API. Therefore it is not a >>> feasible option to reuse the existing implementation. Therefore I'm moving >>> to Java IO to implement this Car Export method. >>> >>> Thanks and Regards, >>> Harshana >>> >>>> >>>> Saminda >>>> >>>> >>>>> Thanks and Regards, >>>>> Harshana >>>>> >>>>> >>>>> On Mon, Nov 1, 2010 at 11:15 AM, Chathuri Wimalasena < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi Harshana, >>>>>> >>>>>> You can overload the existing CAR exporting method with different >>>>>> input parameters, so that we can get the needed functionality with >>>>>> minimum >>>>>> API changes to the existing API. This will enable us to use existing >>>>>> method >>>>>> when using it inside eclipse (where we have the access to eclipse >>>>>> resources) >>>>>> and use the new method when eclipse resources are not available. >>>>>> >>>>>> Regards, >>>>>> Chathuri >>>>>> >>>>>> On Mon, Nov 1, 2010 at 10:52 AM, Harshana Martin >>>>>> <[email protected]>wrote: >>>>>> >>>>>>> Hi All, >>>>>>> >>>>>>> I have worked this issue [0] and made a progress. I created an custom >>>>>>> ant task and execute it. But there are few things i need to clarify >>>>>>> before I >>>>>>> continue. >>>>>>> >>>>>>> Current Car Export method (* >>>>>>> org.wso2.carbonstudio.eclipse.capp.project.utils.CAppUtils.generateCAR(...) >>>>>>> *) requires 3 input parameters as String savePath, IProject >>>>>>> selectedProject, boolean stratosEnabled. But if we are going to build >>>>>>> the >>>>>>> C-App from command line, it is bit problematic to get the value of >>>>>>> the selectedProject as it is an Eclipse Workspace related information >>>>>>> and >>>>>>> when we are using the command line, we don't have the access to the >>>>>>> workspace. If we try to use Eclipse Resource API, we get an >>>>>>> IllegalStateException saying that workspace is closed. >>>>>>> >>>>>>> IMHO first, i don't think it is a good practice to expect Eclipse >>>>>>> Specific data from a command line user and second, i don't think we >>>>>>> have a >>>>>>> mechanism of retrieving that data unless we read the .project file. Even >>>>>>> though we read and get the project name, it would not be that easy to >>>>>>> provide it as an IProject type parameter since it is an Eclipse >>>>>>> Resource API >>>>>>> related. Even if we provide that as an IProject type parameter, we >>>>>>> cannot >>>>>>> execute Eclipse runtime related code from command line. For example, if >>>>>>> we >>>>>>> try to execute "* >>>>>>> ResourcesPlugin.getWorkspace().getRoot().getProject()*" from >>>>>>> console, this gives the same IllegalStateException for workspace. >>>>>>> Therefore >>>>>>> we need an alternative. Hence, I propose that we use some Eclipse >>>>>>> unrelated >>>>>>> mechanism to Car Export process. This needs to be a minor API change. I >>>>>>> propose, we provide the Location of the project. Then we can retrieve >>>>>>> the >>>>>>> root-artifact.xml file and retrieve information about all the existing >>>>>>> artifacts from it and export them as a car file. WDYT? >>>>>>> >>>>>>> [0]. https://wso2.org/jira/browse/TOOLS-376 >>>>>>> >>>>>>> -- >>>>>>> Harshana Martin >>>>>>> Software Engineer >>>>>>> WSO2 Inc. >>>>>>> Web:http://wso2.com >>>>>>> >>>>>>> Mobile: +94 716062650 >>>>>>> Blog: http://harshana05.blogspot.com >>>>>>> Profile: https://www.google.com/profiles/harshana05 >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Carbon-dev mailing list >>>>>>> [email protected] >>>>>>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>>>>> >>>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Carbon-dev mailing list >>>>>> [email protected] >>>>>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Harshana Martin >>>>> Software Engineer >>>>> WSO2 Inc. >>>>> Web:http://wso2.com >>>>> >>>>> Mobile: +94 716062650 >>>>> Blog: http://harshana05.blogspot.com >>>>> Profile: https://www.google.com/profiles/harshana05 >>>>> >>>>> >>>>> _______________________________________________ >>>>> Carbon-dev mailing list >>>>> [email protected] >>>>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>>> >>>>> >>>> >>>> _______________________________________________ >>>> Carbon-dev mailing list >>>> [email protected] >>>> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >>>> >>>> >>> >>> >>> -- >>> Harshana Martin >>> Software Engineer >>> WSO2 Inc. >>> Web:http://wso2.com >>> >>> Mobile: +94 716062650 >>> Blog: http://harshana05.blogspot.com >>> Profile: https://www.google.com/profiles/harshana05 >>> >>> >> >> >> -- >> Harshana Martin >> Software Engineer >> WSO2 Inc. >> Web:http://wso2.com >> >> Mobile: +94 716062650 >> Blog: http://harshana05.blogspot.com >> Profile: https://www.google.com/profiles/harshana05 >> >> >> _______________________________________________ >> Carbon-dev mailing list >> [email protected] >> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >> >> > > _______________________________________________ > Carbon-dev mailing list > [email protected] > https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev > > -- Harshana Martin Software Engineer WSO2 Inc. Web:http://wso2.com Mobile: +94 716062650 Blog: http://harshana05.blogspot.com Profile: https://www.google.com/profiles/harshana05
_______________________________________________ Carbon-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev
