Home » Eclipse Projects » Oomph » Problems migrating to Neon(Problems migrating to Neon)
|
Re: Problems migrating to Neon [message #1737864 is a reply to message #1737849] |
Wed, 13 July 2016 14:58 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Avneesh,
Comments below.
On 13.07.2016 15:45, Avneesh Singh wrote:
> Hi,
> I have started working towards giving users an option to install neon as well.
>
> I am facing few problems which is described below and few doubts :
>
> 1) Where is Post bootstraps tasks defined (as I could not find it in my setups file)
They're synthesized in
org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.addBootstrapTasks(EList<SetupTask>).
> See the below text printed in the installer dialog .
> "Performing post bootstrap tasks
> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini (-vm D:\books\ETS_Oomph\Latest\ets-dev\java\jdk1.8.0_74\jre\bin)
> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini (-Doomph.update.url=file:/D:/books/ETS_Oomph/Latest/ets-dev/p2/oomph/updates/milestone/latest)
> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini (-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/)"
>
> Where can I change the path?
Which path in particular? The VM must be the one selected that was
selected in the installer. The update URL looks bogus, but it's just
passing along the value of this property in the performer's setup
context. You must have such a -D passed to the installer itself.
>
> 2) I do few changes in the preferences for PMD (by recording the preferences )and put it to the product.setup file. It works for Mars but it is not working for Neon.
Are they restricted to perform only in the IDE? I.e.,
excludedTriggers="BOOTSTRAP"
> Below are the preference task for PMD which is not working(please see attached pmd.png).
>
> 3) I get a probelm when I switch the workspace where it ask me to enter the workspace location again(see the attachment workspace.png). Why?
> I tried a solution provided by you in a different thread.
> <setupTask
> xsi:type="setup:VariableTask"
> excludedTriggers="STARTUP MANUAL"
> name="workspace.location"
> defaultValue="${osgi.instance.area|trimTrailingSlashes}"
> storageURI="scope://Workspace"/>
> But, If I put this in the product.setup file, While installing It doesn't take the workspace.location variable(in the variable page of the installer) automatically and it asks us to provide it manually.
It seems bogus in any case to put this in the product because the
instance area property is the instance area of the installer itself. No
workspace is known at the time you're creating purely an installation.
If you're using a project setup as well, it's not needed because that
variable is declared by the workspace task in the project catalog. So I
don't know how this can ever work. Also the value of
osgi.instance.area is a URI but the workspace.location is generally
assumed to be a OS file system path.
>
> There is one more probelm which I get by using the above solution for the workspace location is while resource creation,, I get the following error(I think the path gets corrupted).
> "Performing Resource Creation file%3A/D:/Backup/Code_Checkers/ws/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml
> Creating http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/file%3A/D:/Backup/Code_Checkers/ws/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml
> java.io.IOException: PUT failed with HTTP response code 404
> at org.eclipse.emf.ecore.resource.impl.URIHandlerImpl$1.close(URIHandlerImpl.java:140)
> at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320)"
I'd have to see how the task specifies its arguments. Likely it's
related to the above, where a URI is used as a file system path.
>
> Please hep me in understanding these things.
>
> Thanks and Regards,
> Avneesh
>
>
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Problems migrating to Neon [message #1737906 is a reply to message #1737849] |
Thu, 14 July 2016 04:19 |
Avneesh Singh Messages: 22 Registered: September 2015 |
Junior Member |
|
|
Thanks Ed for the reply. Please find my comments with Keyword "Avneesh"
On 13.07.2016 15:45, Avneesh Singh wrote:
> Hi,
> I have started working towards giving users an option to install neon as well.
>
> I am facing few problems which is described below and few doubts :
>
> 1) Where is Post bootstraps tasks defined (as I could not find it in my setups file)
They're synthesized in
org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.addBootstrapTasks(EList<SetupTask>).
> See the below text printed in the installer dialog .
> "Performing post bootstrap tasks
> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini (-vm D:\books\ETS_Oomph\Latest\ets-dev\java\jdk1.8.0_74\jre\bin)
> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini (-Doomph.update.url=file:/D:/books/ETS_Oomph/Latest/ets-dev/p2/oomph/updates/milestone/latest)
> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini (-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/)"
>
> Where can I change the path?
Which path in particular? The VM must be the one selected that was
selected in the installer. The update URL looks bogus, but it's just
passing along the value of this property in the performer's setup
context. You must have such a -D passed to the installer itself.
Avneesh: I was thinking What is "oomph.update.url" good for?? I have mirrored all the repositories locally. So, I do not want users to have internet for installing eclipse or any tool.
I see a setup task in product setup file which I want to redirect to my local repository(mars or neon)
<setupTask
xsi:type="setup.p2:P2Task">
<requirement
name="org.eclipse.oomph.setup.feature.group"/>
<repository
url="${oomph.update.url}"/>
</setupTask>
>
> 2) I do few changes in the preferences for PMD (by recording the preferences )and put it to the product.setup file. It works for Mars but it is not working for Neon.
Are they restricted to perform only in the IDE? I.e.,
excludedTriggers="BOOTSTRAP"
Avneesh: No. but,even If I do that It is not working for Neon and works very well with mars.
> Below are the preference task for PMD which is not working(please see attached pmd.png).
>
> 3) I get a probelm when I switch the workspace where it ask me to enter the workspace location again(see the attachment workspace.png). Why?
> I tried a solution provided by you in a different thread.
> <setupTask
> xsi:type="setup:VariableTask"
> excludedTriggers="STARTUP MANUAL"
> name="workspace.location"
> defaultValue="${osgi.instance.area|trimTrailingSlashes}"
> storageURI="scope://Workspace"/>
> But, If I put this in the product.setup file, While installing It doesn't take the workspace.location variable(in the variable page of the installer) automatically and it asks us to provide it manually.
It seems bogus in any case to put this in the product because the
instance area property is the instance area of the installer itself. No
workspace is known at the time you're creating purely an installation.
If you're using a project setup as well, it's not needed because that
variable is declared by the workspace task in the project catalog. So I
don't know how this can ever work. Also the value of
osgi.instance.area is a URI but the workspace.location is generally
assumed to be a OS file system path.
Avneesh: What should be the solution for this as I do not want user to be asked for the "workspace location" variable everytime when they switch the workspace. ?
>
> There is one more probelm which I get by using the above solution for the workspace location is while resource creation,, I get the following error(I think the path gets corrupted).
> "Performing Resource Creation file%3A/D:/Backup/Code_Checkers/ws/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml
> Creating http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/file%3A/D:/Backup/Code_Checkers/ws/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml
> java.io.IOException: PUT failed with HTTP response code 404
> at org.eclipse.emf.ecore.resource.impl.URIHandlerImpl$1.close(URIHandlerImpl.java:140)
> at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320)"
I'd have to see how the task specifies its arguments. Likely it's
related to the above, where a URI is used as a file system path.
Avneesh: If the above problem is solved, then This will be automatically solved
>
> Please hep me in understanding these things.
>
> Thanks and Regards,
> Avneesh
|
|
|
Re: Problems migrating to Neon [message #1737921 is a reply to message #1737906] |
Thu, 14 July 2016 07:30 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Comments below.
On 14.07.2016 06:19, Avneesh Singh wrote:
> Thanks Ed for the reply. Please find my comments with Keyword "Avneesh"
>
>
> On 13.07.2016 15:45, Avneesh Singh wrote:
>> Hi,
>> I have started working towards giving users an option to install neon
>> as well.
>>
>> I am facing few problems which is described below and few doubts :
>>
>> 1) Where is Post bootstraps tasks defined (as I could not find it in
>> my setups file)
> They're synthesized in
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.addBootstrapTasks(EList<SetupTask>).
>> See the below text printed in the installer dialog .
>> "Performing post bootstrap tasks
>> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini
>> (-vm D:\books\ETS_Oomph\Latest\ets-dev\java\jdk1.8.0_74\jre\bin)
>> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini
>> (-Doomph.update.url=file:/D:/books/ETS_Oomph/Latest/ets-dev/p2/oomph/updates/milestone/latest)
>> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini
>> (-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/)"
>>
>> Where can I change the path?
> Which path in particular? The VM must be the one selected that was
> selected in the installer. The update URL looks bogus, but it's just
> passing along the value of this property in the performer's setup
> context. You must have such a -D passed to the installer itself.
>
> Avneesh: I was thinking What is "oomph.update.url" good for??
To get updates of course...
> I have mirrored all the repositories locally. So, I do not want users
> to have internet for installing eclipse or any tool.
That's fine, but then the value is correct and you want it to be this value.
> I see a setup task in product setup file which I want to redirect to
> my local repository(mars or neon)
> <setupTask
> xsi:type="setup.p2:P2Task">
> <requirement
> name="org.eclipse.oomph.setup.feature.group"/>
> <repository
> url="${oomph.update.url}"/>
> </setupTask>
If that's what you want, that's what you're getting, so that's good, right?
>>
>> 2) I do few changes in the preferences for PMD (by recording the
>> preferences )and put it to the product.setup file. It works for Mars
>> but it is not working for Neon.
> Are they restricted to perform only in the IDE? I.e.,
> excludedTriggers="BOOTSTRAP"
>
> Avneesh: No. but,even If I do that It is not working for Neon and
> works very well with mars.
It's not clear to me what about the above particular values isn't working.
>
>> Below are the preference task for PMD which is not working(please see
>> attached pmd.png).
>>
>> 3) I get a probelm when I switch the workspace where it ask me to
>> enter the workspace location again(see the attachment workspace.png).
>> Why?
>> I tried a solution provided by you in a different thread.
>> <setupTask
>> xsi:type="setup:VariableTask"
>> excludedTriggers="STARTUP MANUAL"
>> name="workspace.location"
>> defaultValue="${osgi.instance.area|trimTrailingSlashes}"
>> storageURI="scope://Workspace"/>
>> But, If I put this in the product.setup file, While installing It
>> doesn't take the workspace.location variable(in the variable page of
>> the installer) automatically and it asks us to provide it manually.
> It seems bogus in any case to put this in the product because the
> instance area property is the instance area of the installer itself.
> No workspace is known at the time you're creating purely an
> installation. If you're using a project setup as well, it's not needed
> because that variable is declared by the workspace task in the project
> catalog. So I don't know how this can ever work. Also the value of
> osgi.instance.area is a URI but the workspace.location is generally
> assumed to be a OS file system path.
>
> Avneesh: What should be the solution for this as I do not want user to
> be asked for the "workspace location" variable everytime when they
> switch the workspace. ?
${osgi.instance.area|trimTrailingSlashes|file}" should convert the URI
>>
>> There is one more probelm which I get by using the above solution for
>> the workspace location is while resource creation,, I get the
>> following error(I think the path gets corrupted).
>> "Performing Resource Creation
>> file%3A/D:/Backup/Code_Checkers/ws/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml
>> Creating
>> http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/file%3A/D:/Backup/Code_Checkers/ws/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml
>> java.io.IOException: PUT failed with HTTP response code 404
>> at
>> org.eclipse.emf.ecore.resource.impl.URIHandlerImpl$1.close(URIHandlerImpl.java:140)
>> at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320)"
> I'd have to see how the task specifies its arguments. Likely it's
> related to the above, where a URI is used as a file system path.
> Avneesh: If the above problem is solved, then This will be
> automatically solved
So likely it's just an issue with converting the file:/ URI to a file path.
>>
>> Please hep me in understanding these things.
>>
>> Thanks and Regards,
>> Avneesh
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Problems migrating to Neon [message #1737934 is a reply to message #1737921] |
Thu, 14 July 2016 09:02 |
Avneesh Singh Messages: 22 Registered: September 2015 |
Junior Member |
|
|
Please find my comments below in blue color:
Comments below.
On 14.07.2016 06:19, Avneesh Singh wrote:
> Thanks Ed for the reply. Please find my comments with Keyword "Avneesh"
>
>
> On 13.07.2016 15:45, Avneesh Singh wrote:
>> Hi,
>> I have started working towards giving users an option to install neon
>> as well.
>>
>> I am facing few problems which is described below and few doubts :
>>
>> 1) Where is Post bootstraps tasks defined (as I could not find it in
>> my setups file)
> They're synthesized in
> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.addBootstrapTasks(EList<SetupTask>).
>> See the below text printed in the installer dialog .
>> "Performing post bootstrap tasks
>> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini
>> (-vm D:\books\ETS_Oomph\Latest\ets-dev\java\jdk1.8.0_74\jre\bin)
>> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini
>> (-Doomph.update.url=file:/D:/books/ETS_Oomph/Latest/ets-dev/p2/oomph/updates/milestone/latest)
>> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini
>> (-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/)"
>>
>> Where can I change the path?
> Which path in particular? The VM must be the one selected that was
> selected in the installer. The update URL looks bogus, but it's just
> passing along the value of this property in the performer's setup
> context. You must have such a -D passed to the installer itself.
>
> Avneesh: I was thinking What is "oomph.update.url" good for??
To get updates of course...
> I have mirrored all the repositories locally. So, I do not want users
> to have internet for installing eclipse or any tool.
That's fine, but then the value is correct and you want it to be this value.
Avneesh: I wanted to know if I have to redirect the variable "oomph.update.url". Where Should I do it? I mean which setup file or should I do it in the project.setup file itself as this variable is not defined by me.??
> I see a setup task in product setup file which I want to redirect to
> my local repository(mars or neon)
> <setupTask
> xsi:type="setup.p2:P2Task">
> <requirement
> name="org.eclipse.oomph.setup.feature.group"/>
> <repository
> url="${oomph.update.url}"/>
> </setupTask>
If that's what you want, that's what you're getting, so that's good, right?
>>
>> 2) I do few changes in the preferences for PMD (by recording the
>> preferences )and put it to the product.setup file. It works for Mars
>> but it is not working for Neon.
> Are they restricted to perform only in the IDE? I.e.,
> excludedTriggers="BOOTSTRAP"
>
> Avneesh: No. but,even If I do that It is not working for Neon and
> works very well with mars.
It's not clear to me what about the above particular values isn't working.
Avneesh: I will explain you the case here. I am using PMD plugins and I have to do some automatic preferences settings in eclipse. So, I record the preferences and put it to my product setup file.
It works as expected if I use the same preferences task for mars installation but it does not work for neon.
<setupTask
xsi:type="setup:PreferenceTask"
excludedTriggers="BOOTSTRAP"
key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules"
value=",CheckResultSet,AvoidDecimalLiteralsInBigDecimalConstructor,DoubleCheckedLocking,MissingSerialVersionUID,AvoidUsingHardCodedIP,DontUseFloatTypeForLoopIndices,ForLoopShouldBeWhileLoop,ClassCastExceptionWithToArray,LoggerIsNotStaticFinal,BeanMembersShouldSerialize,AvoidBranchingStatementAsLastInLoop,BooleanInstantiation,MisplacedNullCheck,MoreThanOneLogger,OverrideBothEqualsAndHashcode,UnconditionalIfStatement,AvoidThreadGroup,AvoidUsingOctalValues,AvoidMultipleUnaryOperators,ReturnFromFinallyBlock,SystemPrintln,BigIntegerInstantiation,CheckSkipResult,BrokenNullCheck,DontCallThreadRun,ExtendsObject,CollapsibleIfStatements,GuardLogStatementJavaUtil,JumbledIncrementer,AvoidPrintStackTrace"/>
<setupTask
xsi:type="setup:PreferenceTask"
excludedTriggers="BOOTSTRAP"
key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement"
value="true"/>
</setupTask>
>
>> Below are the preference task for PMD which is not working(please see
>> attached pmd.png).
>>
>> 3) I get a probelm when I switch the workspace where it ask me to
>> enter the workspace location again(see the attachment workspace.png).
>> Why?
>> I tried a solution provided by you in a different thread.
>> <setupTask
>> xsi:type="setup:VariableTask"
>> excludedTriggers="STARTUP MANUAL"
>> name="workspace.location"
>> defaultValue="${osgi.instance.area|trimTrailingSlashes}"
>> storageURI="scope://Workspace"/>
>> But, If I put this in the product.setup file, While installing It
>> doesn't take the workspace.location variable(in the variable page of
>> the installer) automatically and it asks us to provide it manually.
> It seems bogus in any case to put this in the product because the
> instance area property is the instance area of the installer itself.
> No workspace is known at the time you're creating purely an
> installation. If you're using a project setup as well, it's not needed
> because that variable is declared by the workspace task in the project
> catalog. So I don't know how this can ever work. Also the value of
> osgi.instance.area is a URI but the workspace.location is generally
> assumed to be a OS file system path.
>
> Avneesh: What should be the solution for this as I do not want user to
> be asked for the "workspace location" variable everytime when they
> switch the workspace. ?
${osgi.instance.area|trimTrailingSlashes|file}" should convert the URI
Avneesh: It might solve the problem of URI but Where should I put this setup task as You said previously that it should not be used in the product.setup file?
>>
>> There is one more probelm which I get by using the above solution for
>> the workspace location is while resource creation,, I get the
>> following error(I think the path gets corrupted).
>> "Performing Resource Creation
>> file%3A/D:/Backup/Code_Checkers/ws/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml
>> Creating
>> http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/file%3A/D:/Backup/Code_Checkers/ws/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml
>> java.io.IOException: PUT failed with HTTP response code 404
>> at
>> org.eclipse.emf.ecore.resource.impl.URIHandlerImpl$1.close(URIHandlerImpl.java:140)
>> at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320)"
> I'd have to see how the task specifies its arguments. Likely it's
> related to the above, where a URI is used as a file system path.
> Avneesh: If the above problem is solved, then This will be
> automatically solved
So likely it's just an issue with converting the file:/ URI to a file path.
>>
>> Please hep me in understanding these things.
>>
>> Thanks and Regards,
>> Avneesh
|
|
|
Re: Problems migrating to Neon [message #1737942 is a reply to message #1737934] |
Thu, 14 July 2016 09:45 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Comments below.
On 14.07.2016 11:02, Avneesh Singh wrote:
> Please find my comments below in blue color:
I use Thunderbird to read the forum and it's not showing up in blue.
I'll try to find the comments you added...
If you can't quote the reply to add unquoted inline comments, best not
to continue this nested quoting with your next post, because I'll never
find your comments.
>
> Comments below.
>
>
> On 14.07.2016 06:19, Avneesh Singh wrote:
>> Thanks Ed for the reply. Please find my comments with Keyword "Avneesh"
>>
>>
>> On 13.07.2016 15:45, Avneesh Singh wrote:
>>> Hi,
>>> I have started working towards giving users an option to install
>>> neon as well.
>>>
>>> I am facing few problems which is described below and few doubts :
>>>
>>> 1) Where is Post bootstraps tasks defined (as I could not find it in
>>> my setups file)
>> They're synthesized in
>> org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.addBootstrapTasks(EList<SetupTask>).
>>> See the below text printed in the installer dialog .
>>> "Performing post bootstrap tasks
>>> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini
>>> (-vm D:\books\ETS_Oomph\Latest\ets-dev\java\jdk1.8.0_74\jre\bin)
>>> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini
>>> (-Doomph.update.url=file:/D:/books/ETS_Oomph/Latest/ets-dev/p2/oomph/updates/milestone/latest)
>>> Changing C:\Users\uidm3588\ETS-Eclipse-master\eclipse\eclipse.ini
>>> (-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/)"
>>>
>>> Where can I change the path?
>> Which path in particular? The VM must be the one selected that was
>> selected in the installer. The update URL looks bogus, but it's just
>> passing along the value of this property in the performer's setup
>> context. You must have such a -D passed to the installer itself.
>>
>> Avneesh: I was thinking What is "oomph.update.url" good for??
> To get updates of course...
>> I have mirrored all the repositories locally. So, I do not want users
>> to have internet for installing eclipse or any tool.
> That's fine, but then the value is correct and you want it to be this
> value.
> Avneesh: I wanted to know if I have to redirect the variable
> "oomph.update.url". Where Should I do it? I mean which setup file or
> should I do it in the project.setup file itself as this variable is
> not defined by me.??
You can pass this value into the installer. Or you can author your own
EclipseIni task in your product to override this one that's
automatically present.
>> I see a setup task in product setup file which I want to redirect to
>> my local repository(mars or neon)
>> <setupTask
>> xsi:type="setup.p2:P2Task">
>> <requirement
>> name="org.eclipse.oomph.setup.feature.group"/>
>> <repository
>> url="${oomph.update.url}"/>
>> </setupTask>
> If that's what you want, that's what you're getting, so that's good,
> right?
>>>
>>> 2) I do few changes in the preferences for PMD (by recording the
>>> preferences )and put it to the product.setup file. It works for Mars
>>> but it is not working for Neon.
>> Are they restricted to perform only in the IDE? I.e.,
>> excludedTriggers="BOOTSTRAP"
>>
>> Avneesh: No. but,even If I do that It is not working for Neon and
>> works very well with mars.
> It's not clear to me what about the above particular values isn't
> working.
> Avneesh: I will explain you the case here. I am using PMD plugins and
> I have to do some automatic preferences settings in eclipse. So, I
> record the preferences and put it to my product setup file.
> It works as expected if I use the same preferences task for mars
> installation but it does not work for neon.
>
> <setupTask
> xsi:type="setup:PreferenceTask"
> excludedTriggers="BOOTSTRAP"
> key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules"
> value=",CheckResultSet,AvoidDecimalLiteralsInBigDecimalConstructor,DoubleCheckedLocking,MissingSerialVersionUID,AvoidUsingHardCodedIP,DontUseFloatTypeForLoopIndices,ForLoopShouldBeWhileLoop,ClassCastExceptionWithToArray,LoggerIsNotStaticFinal,BeanMembersShouldSerialize,AvoidBranchingStatementAsLastInLoop,BooleanInstantiation,MisplacedNullCheck,MoreThanOneLogger,OverrideBothEqualsAndHashcode,UnconditionalIfStatement,AvoidThreadGroup,AvoidUsingOctalValues,AvoidMultipleUnaryOperators,ReturnFromFinallyBlock,SystemPrintln,BigIntegerInstantiation,CheckSkipResult,BrokenNullCheck,DontCallThreadRun,ExtendsObject,CollapsibleIfStatements,GuardLogStatementJavaUtil,JumbledIncrementer,AvoidPrintStackTrace"/>
> <setupTask
> xsi:type="setup:PreferenceTask"
> excludedTriggers="BOOTSTRAP"
> key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement"
> value="true"/> </setupTask>
>>
>>> Below are the preference task for PMD which is not working(please
>>> see attached pmd.png).
>>>
>>> 3) I get a probelm when I switch the workspace where it ask me to
>>> enter the workspace location again(see the attachment
>>> workspace.png). Why?
>>> I tried a solution provided by you in a different thread.
>>> <setupTask
>>> xsi:type="setup:VariableTask"
>>> excludedTriggers="STARTUP MANUAL"
>>> name="workspace.location"
>>> defaultValue="${osgi.instance.area|trimTrailingSlashes}"
>>> storageURI="scope://Workspace"/>
>>> But, If I put this in the product.setup file, While installing It
>>> doesn't take the workspace.location variable(in the variable page of
>>> the installer) automatically and it asks us to provide it manually.
>> It seems bogus in any case to put this in the product because the
>> instance area property is the instance area of the installer itself.
>> No workspace is known at the time you're creating purely an
>> installation. If you're using a project setup as well, it's not
>> needed because that variable is declared by the workspace task in the
>> project catalog. So I don't know how this can ever work. Also the
>> value of osgi.instance.area is a URI but the workspace.location is
>> generally assumed to be a OS file system path.
>>
>> Avneesh: What should be the solution for this as I do not want user
>> to be asked for the "workspace location" variable everytime when they
>> switch the workspace. ?
> ${osgi.instance.area|trimTrailingSlashes|file}" should convert the URI
> Avneesh: It might solve the problem of URI but Where should I put this
> setup task as You said previously that it should not be used in the
> product.setup file?
None of the tasks that depend on the workspace location should be run at
bootstrap time. But the above you have restricted to apply only at
bootstrap. That seems to be the opposite of what you should be doing.
>>>
>>> There is one more probelm which I get by using the above solution
>>> for the workspace location is while resource creation,, I get the
>>> following error(I think the path gets corrupted).
>>> "Performing Resource Creation
>>> file%3A/D:/Backup/Code_Checkers/ws/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml
>>> Creating
>>> http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/file%3A/D:/Backup/Code_Checkers/ws/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml
>>> java.io.IOException: PUT failed with HTTP response code 404
>>> at
>>> org.eclipse.emf.ecore.resource.impl.URIHandlerImpl$1.close(URIHandlerImpl.java:140)
>>> at sun.nio.cs.StreamEncoder.implClose(StreamEncoder.java:320)"
>> I'd have to see how the task specifies its arguments. Likely it's
>> related to the above, where a URI is used as a file system path.
>> Avneesh: If the above problem is solved, then This will be
>> automatically solved
> So likely it's just an issue with converting the file:/ URI to a file
> path.
>>>
>>> Please hep me in understanding these things.
>>>
>>> Thanks and Regards,
>>> Avneesh
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Problems migrating to Neon [message #1737948 is a reply to message #1737942] |
Thu, 14 July 2016 10:35 |
Avneesh Singh Messages: 22 Registered: September 2015 |
Junior Member |
|
|
Thanks Ed for your reply.
I will try to put it again.
1) I will explain you the case here. I am using PMD plugins and
I have to do some automatic preferences settings in eclipse. So, I
record the preferences and put it to my product setup file.
It works as expected if I use the same preferences task for mars
installation but it does not work for neon? Below are the two tasks
<setupTask
xsi:type="setup:PreferenceTask"
excludedTriggers="BOOTSTRAP"
key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules"
value=",CheckResultSet,AvoidDecimalLiteralsInBigDecimalConstructor,DoubleCheckedLocking,MissingSerialVersionUID,AvoidUsingHardCodedIP,DontUseFloatTypeForLoopIndices,ForLoopShouldBeWhileLoop,ClassCastExceptionWithToArray,LoggerIsNotStaticFinal,BeanMembersShouldSerialize,AvoidBranchingStatementAsLastInLoop,BooleanInstantiation,MisplacedNullCheck,MoreThanOneLogger,OverrideBothEqualsAndHashcode,UnconditionalIfStatement,AvoidThreadGroup,AvoidUsingOctalValues,AvoidMultipleUnaryOperators,ReturnFromFinallyBlock,SystemPrintln,BigIntegerInstantiation,CheckSkipResult,BrokenNullCheck,DontCallThreadRun,ExtendsObject,CollapsibleIfStatements,GuardLogStatementJavaUtil,JumbledIncrementer,AvoidPrintStackTrace"/>
<setupTask
xsi:type="setup:PreferenceTask"
excludedTriggers="BOOTSTRAP"
key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement"
value="true"/> </setupTask>
2) If I put the below task and run the installer, it asks me to manually enter the workspace.location and this user would not like to put as it doesnot have the workspace location rule and the browse button to select the workspace location.
xsi:type="setup:VariableTask"
excludedTriggers="BOOTSTRAP"
name="workspace.location"
defaultValue="${osgi.instance.area|trimTrailingSlashes|file}"
storageURI="scope://Workspace"/>
What am I doing wrong or which setup file should I put the above task.?
Thanks,
Avneesh
|
|
|
Re: Problems migrating to Neon [message #1737950 is a reply to message #1737948] |
Thu, 14 July 2016 10:59 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Aveneesh,
Comments below.
On 14.07.2016 12:35, Avneesh Singh wrote:
> Thanks Ed for your reply.
> I will try to put it again.
> 1) I will explain you the case here. I am using PMD plugins and I have
> to do some automatic preferences settings in eclipse. So, I record the
> preferences and put it to my product setup file.
> It works as expected if I use the same preferences task for mars
> installation but it does not work for neon? Below are the two tasks
>
> <setupTask
> xsi:type="setup:PreferenceTask"
> excludedTriggers="BOOTSTRAP"
> key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules"
>
> value=",CheckResultSet,AvoidDecimalLiteralsInBigDecimalConstructor,DoubleCheckedLocking,MissingSerialVersionUID,AvoidUsingHardCodedIP,DontUseFloatTypeForLoopIndices,ForLoopShouldBeWhileLoop,ClassCastExceptionWithToArray,LoggerIsNotStaticFinal,BeanMembersShouldSerialize,AvoidBranchingStatementAsLastInLoop,BooleanInstantiation,MisplacedNullCheck,MoreThanOneLogger,OverrideBothEqualsAndHashcode,UnconditionalIfStatement,AvoidThreadGroup,AvoidUsingOctalValues,AvoidMultipleUnaryOperators,ReturnFromFinallyBlock,SystemPrintln,BigIntegerInstantiation,CheckSkipResult,BrokenNullCheck,DontCallThreadRun,ExtendsObject,CollapsibleIfStatements,GuardLogStatementJavaUtil,JumbledIncrementer,AvoidPrintStackTrace"/>
>
> <setupTask
> xsi:type="setup:PreferenceTask"
> excludedTriggers="BOOTSTRAP"
> key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement"
>
> value="true"/> </setupTask>
Okay, good, they will only run in the IDE.
>
> 2) If I put the below task and run the installer, it asks me to
> manually enter the workspace.location and this user would not like to
> put as it doesnot have the workspace location rule and the browse
> button to select the workspace location.
> xsi:type="setup:VariableTask"
> excludedTriggers="BOOTSTRAP"
> name="workspace.location"
> defaultValue="${osgi.instance.area|trimTrailingSlashes|file}"
> storageURI="scope://Workspace"/>
Instead of setting the default value, you could just set the value. The
prompt field should be initialized to the default value, so I'm not sure
why that's not the case. I tested adding these two tasks to a
workspace.setup in my IDE and indeed it prompts for the workspace, with
the correct default value:
<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0">
<setup:VariableTask
excludedTriggers="BOOTSTRAP"
name="workspace.location.x"
defaultValue="${osgi.instance.area|trimTrailingSlashes|file}"
storageURI="scope://Workspace"/>
<setup:StringSubstitutionTask
name="foo"
value="${workspace.location.x}"/>
</xmi:XMI>
So you're saying that it prompts for variable's location in the running
IDE but hasn't filled in the default value? I can't reproduce that...
>
> What am I doing wrong or which setup file should I put the above task.?
>
> Thanks,
> Avneesh
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Problems migrating to Neon [message #1737959 is a reply to message #1737950] |
Thu, 14 July 2016 12:27 |
Avneesh Singh Messages: 22 Registered: September 2015 |
Junior Member |
|
|
> >Thanks Ed for your reply.
>> I will try to put it again.
>> 1) I will explain you the case here. I am using PMD plugins and I have
> >to do some automatic preferences settings in eclipse. So, I record the
> >preferences and put it to my product setup file.
> >It works as expected if I use the same preferences task for mars
> >installation but it does not work for neon? Below are the two tasks
>>
>> <setupTask
>> xsi:type="setup:PreferenceTask"
>> excludedTriggers="BOOTSTRAP"
> >key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules"
>>
>>value=",CheckResultSet,AvoidDecimalLiteralsInBigDecimalConstructor,DoubleCheckedLocking,MissingSerialVersionUID,AvoidUsingHardCodedIP,DontUseFloatTypeForLoopIndices,ForLoopShouldBeWhileLoop,ClassCastExceptionWithToArray,LoggerIsNotStaticFinal,BeanMembersShouldSerialize,AvoidBranchingStatementAsLastInLoop,BooleanInstantiation,MisplacedNullCheck,MoreThanOneLogger,OverrideBothEqualsAndHashcode,UnconditionalIfStatement,AvoidThreadGroup,AvoidUsingOctalValues,AvoidMultipleUnaryOperators,ReturnFromFinallyBlock,SystemPrintln,BigIntegerInstantiation,CheckSkipResult,BrokenNullCheck,DontCallThreadRun,ExtendsObject,CollapsibleIfStatements,GuardLogStatementJavaUtil,JumbledIncrementer,AvoidPrintStackTrace"/>
>>
>> <setupTask
>> xsi:type="setup:PreferenceTask"
>> excludedTriggers="BOOTSTRAP"
>> key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement"
>>
>> value="true"/> </setupTask>
>Okay, good, they will only run in the IDE.
It doesn't work for eclipse neon but it works for mars. Why?
>
>> 2) If I put the below task and run the installer, it asks me to
> >manually enter the workspace.location and this user would not like to
> >put as it doesnot have the workspace location rule and the browse
> >button to select the workspace location.
> >xsi:type="setup:VariableTask"
> >excludedTriggers="BOOTSTRAP"
> >name="workspace.location"
> >defaultValue="${osgi.instance.area|trimTrailingSlashes|file}"
> >storageURI="scope://Workspace"/>
>Instead of setting the default value, you could just set the value. The
>prompt field should be initialized to the default value, so I'm not sure
>why that's not the case. I tested adding these two tasks to a
>workspace.setup in my IDE and indeed it prompts for the workspace, with
>the correct default value:
Workspace.setup file is a local file and I want it to put it to some file which will be in internet and common for all(like product.setup and project.setup). How would you do it?
><?xml version="1.0" encoding="UTF-8"?>
><xmi:XMI xmi:version="2.0"
>xmlns:xmi="http://www.omg.org/XMI"
>xmlns:setup="http://www.eclipse.org/oomph/setup/1.0">
><setup:VariableTask
>excludedTriggers="BOOTSTRAP"
>name="workspace.location.x"
>defaultValue="${osgi.instance.area|trimTrailingSlashes|file}"
>storageURI="scope://Workspace"/>
><setup:StringSubstitutionTask
>name="foo"
>value="${workspace.location.x}"/>
></xmi:XMI>
>So you're saying that it prompts for variable's location in the running
>IDE but hasn't filled in the default value? I can't reproduce that...
>>
> >What am I doing wrong or which setup file should I put the above task.?
>>
> >Thanks,
> >Avneesh
|
|
|
Re: Problems migrating to Neon [message #1737962 is a reply to message #1737959] |
Thu, 14 July 2016 12:46 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Comments below.
On 14.07.2016 14:27, Avneesh Singh wrote:
>> >Thanks Ed for your reply.
>>> I will try to put it again.
>>> 1) I will explain you the case here. I am using PMD plugins and I have
>> >to do some automatic preferences settings in eclipse. So, I record
>> the >preferences and put it to my product setup file.
>> >It works as expected if I use the same preferences task for mars
>> >installation but it does not work for neon? Below are the two tasks
>>>
>>> <setupTask
>>> xsi:type="setup:PreferenceTask"
>>> excludedTriggers="BOOTSTRAP"
>> >key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules"
>>
>>>
>>> value=",CheckResultSet,AvoidDecimalLiteralsInBigDecimalConstructor,DoubleCheckedLocking,MissingSerialVersionUID,AvoidUsingHardCodedIP,DontUseFloatTypeForLoopIndices,ForLoopShouldBeWhileLoop,ClassCastExceptionWithToArray,LoggerIsNotStaticFinal,BeanMembersShouldSerialize,AvoidBranchingStatementAsLastInLoop,BooleanInstantiation,MisplacedNullCheck,MoreThanOneLogger,OverrideBothEqualsAndHashcode,UnconditionalIfStatement,AvoidThreadGroup,AvoidUsingOctalValues,AvoidMultipleUnaryOperators,ReturnFromFinallyBlock,SystemPrintln,BigIntegerInstantiation,CheckSkipResult,BrokenNullCheck,DontCallThreadRun,ExtendsObject,CollapsibleIfStatements,GuardLogStatementJavaUtil,JumbledIncrementer,AvoidPrintStackTrace"/>
>>>
>>>
>>> <setupTask
>>> xsi:type="setup:PreferenceTask"
>>> excludedTriggers="BOOTSTRAP"
>>> key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement"
>>>
>>> value="true"/> </setupTask>
>> Okay, good, they will only run in the IDE.
> It doesn't work for eclipse neon but it works for mars. Why?
I don't know. How can you tell it's not working? The preference is
never set? If you checkmark "Show all triggered tasks" on the
Confirmation page, is the task not shown, or is it shown but is
disabled? Generally that's because it's not needed because the
preference is already set that way.
>>
>>> 2) If I put the below task and run the installer, it asks me to
>> >manually enter the workspace.location and this user would not like
>> to >put as it doesnot have the workspace location rule and the browse
>> >button to select the workspace location.
>> >xsi:type="setup:VariableTask"
>> >excludedTriggers="BOOTSTRAP"
>> >name="workspace.location"
>> >defaultValue="${osgi.instance.area|trimTrailingSlashes|file}"
>> >storageURI="scope://Workspace"/>
>> Instead of setting the default value, you could just set the value.
>> The prompt field should be initialized to the default value, so I'm
>> not sure why that's not the case. I tested adding these two tasks to
>> a workspace.setup in my IDE and indeed it prompts for the workspace,
>> with the correct default value:
> Workspace.setup file is a local file and I want it to put it to some
> file which will be in internet and common for all(like product.setup
> and project.setup). How would you do it?
Yes, that's fine. I tested it by putting it in my workspace.setup
purely so I could test it. It works as expected.
>> <?xml version="1.0" encoding="UTF-8"?>
>> <xmi:XMI xmi:version="2.0"
>> xmlns:xmi="http://www.omg.org/XMI"
>> xmlns:setup="http://www.eclipse.org/oomph/setup/1.0">
>> <setup:VariableTask
>> excludedTriggers="BOOTSTRAP"
>> name="workspace.location.x"
>> defaultValue="${osgi.instance.area|trimTrailingSlashes|file}"
>> storageURI="scope://Workspace"/>
>> <setup:StringSubstitutionTask
>> name="foo"
>> value="${workspace.location.x}"/>
>> </xmi:XMI>
>
>> So you're saying that it prompts for variable's location in the
>> running IDE but hasn't filled in the default value? I can't reproduce
>> that...
>>>
>> >What am I doing wrong or which setup file should I put the above task.?
Note that I asked a question. You didn't answer it. Leave it where
you had it. I only wanted to test that it works for me as expected.
>>>
>> >Thanks,
>> >Avneesh
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Problems migrating to Neon [message #1737965 is a reply to message #1737962] |
Thu, 14 July 2016 13:16 |
Avneesh Singh Messages: 22 Registered: September 2015 |
Junior Member |
|
|
Please find the comments below
>Comments below.
>On 14.07.2016 14:27, Avneesh Singh wrote:
>>> >Thanks Ed for your reply.
>>>> I will try to put it again.
>>>> 1) I will explain you the case here. I am using PMD plugins and I have
>> >>to do some automatic preferences settings in eclipse. So, I record
>> >the >preferences and put it to my product setup file.
>> >>It works as expected if I use the same preferences task for mars
>> >>installation but it does not work for neon? Below are the two tasks
>>>>
>>> ><setupTask
>>> >xsi:type="setup:PreferenceTask"
>>> >excludedTriggers="BOOTSTRAP"
>> >>key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules"
>>>
>>>>
>>> >>value=",CheckResultSet,AvoidDecimalLiteralsInBigDecimalConstructor,DoubleCheckedLocking,MissingSerialVersionUID,AvoidUsingHardCodedIP,DontUseFloatTypeForLoopIndices,ForLoopShouldBeWhileLoop,ClassCastExceptionWithToArray,LoggerIsNotStaticFinal,BeanMembersShouldSerialize,AvoidBranchingStatementAsLastInLoop,BooleanInstantiation,MisplacedNullCheck,MoreThanOneLogger,OverrideBothEqualsAndHashcode,UnconditionalIfStatement,AvoidThreadGroup,AvoidUsingOctalValues,AvoidMultipleUnaryOperators,ReturnFromFinallyBlock,SystemPrintln,BigIntegerInstantiation,CheckSkipResult,BrokenNullCheck,DontCallThreadRun,ExtendsObject,CollapsibleIfStatements,GuardLogStatementJavaUtil,JumbledIncrementer,AvoidPrintStackTrace"/>
>>>>
>>>>
>>> ><setupTask
>>> >xsi:type="setup:PreferenceTask"
>>> >excludedTriggers="BOOTSTRAP"
>>> >key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement"
>>>>
>>> >value="true"/> </setupTask>
>> >Okay, good, they will only run in the IDE.
> >It doesn't work for eclipse neon but it works for mars. Why?
>I don't know. How can you tell it's not working? The preference is
>never set? If you checkmark "Show all triggered tasks" on the
>Confirmation page, is the task not shown, or is it shown but is
>disabled? Generally that's because it's not needed because the
>preference is already set that way.
I checked in the confirmation page also. It shows the task but it doesn't apply when I open the preferences page.
Note that I have so many other preference settings also which works for both mars and neon but only PMD related settings are not happening for Eclipse neon. Its strange.
>>>
>>>> 2) If I put the below task and run the installer, it asks me to
>> >>manually enter the workspace.location and this user would not like
>> >to >put as it doesnot have the workspace location rule and the browse
>> >>button to select the workspace location.
>> >>xsi:type="setup:VariableTask"
>> >>excludedTriggers="BOOTSTRAP"
>> >>name="workspace.location"
>> >>defaultValue="${osgi.instance.area|trimTrailingSlashes|file}"
>> >>storageURI="scope://Workspace"/>
>> >Instead of setting the default value, you could just set the value.
>> >The prompt field should be initialized to the default value, so I'm
>> >not sure why that's not the case. I tested adding these two tasks to
>> >a workspace.setup in my IDE and indeed it prompts for the workspace,
>>> with the correct default value:
> >Workspace.setup file is a local file and I want it to put it to some
> >file which will be in internet and common for all(like product.setup
> >and project.setup). How would you do it?
>Yes, that's fine. I tested it by putting it in my workspace.setup
>purely so I could test it. It works as expected.
Which setup file I should put it to make it working? (I cannot put this in any of the local setup files (user,installation,workspace).
>>> <?xml version="1.0" encoding="UTF-8"?>
>> ><xmi:XMI xmi:version="2.0"
>> >xmlns:xmi="http://www.omg.org/XMI"
>> >xmlns:setup="http://www.eclipse.org/oomph/setup/1.0">
>> ><setup:VariableTask
>> >excludedTriggers="BOOTSTRAP"
>> >name="workspace.location.x"
>> >defaultValue="${osgi.instance.area|trimTrailingSlashes|file}"
>> >storageURI="scope://Workspace"/>
>> ><setup:StringSubstitutionTask
>> >name="foo"
>> >value="${workspace.location.x}"/>
>> ></xmi:XMI>
>>
>>>So you're saying that it prompts for variable's location in the
>>> running IDE but hasn't filled in the default value? I can't reproduce
>> >that...
Sorry I missed to answer for this comment. If I do not put the above setup task anywhere and try to switch the workspace after launching of eclipse, it will prompt you with the variable page and ask you to put the workspace.location.
I think this should be reproducible. Try launching your eclipse (mars or neon) after installing and switch it to new workspace location. It should prompt you with the variable page.
>>>
>> >What am I doing wrong or which setup file should I put the above task.?
Note that I asked a question. You didn't answer it. Leave it where
you had it. I only wanted to test that it works for me as expected.
>>>
>> >Thanks,
>> >Avneesh
|
|
| |
Re: Problems migrating to Neon [message #1738056 is a reply to message #1737970] |
Fri, 15 July 2016 12:42 |
Avneesh Singh Messages: 22 Registered: September 2015 |
Junior Member |
|
|
>> I checked in the confirmation page also. It shows the task but it
> >doesn't apply when I open the preferences page.
>> Note that I have so many other preference settings also which works
> >for both mars and neon but only PMD related settings are not happening
> >for Eclipse neon. Its strange.
>Is the task enabled or disabled? Black means the task is needed and
>will perform, grayed out means it isn't needed and won't perform. If
>it's enabled, later on when the task performs, there should be a log
>entry saying it's performed.
The tasks are performed as you can see in the below text from the Eclipse Updater Dialog
"Performing Preference /instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules = ,CheckResultSet,AvoidDecimalLiteralsInBigDecimalConstructor,DoubleCheckedLocking,MissingSerialVersionUID,AvoidUsingHardCodedIP,DontUseFloatTypeForLoopIndices,ForLoopShouldBeWhileLoop,ClassCastExceptionWithToArray,LoggerIsNotStaticFinal,BeanMembersShouldSerialize,AvoidBranchingStatementAsLastInLoop,BooleanInstantiation,MisplacedNullCheck,MoreThanOneLogger,OverrideBothEqualsAndHashcode,UnconditionalIfStatement,AvoidThreadGroup,AvoidUsingOctalValues,AvoidMultipleUnaryOperators,ReturnFromFinallyBlock,SystemPrintln,BigIntegerInstantiation,CheckSkipResult,BrokenNullCheck,DontCallThreadRun,ExtendsObject,CollapsibleIfStatements,GuardLogStatementJavaUtil,JumbledIncrementer,AvoidPrintStackTrace
Performing Preference /instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement = true"
>Is it the same version of PMD installed? Perhaps they've moved
>where/how the preferences are stored.
Yes its the same version of PMD used for both Mars and Neon. Its really strange behavior. It works for Mars and not for Neon.
>. Which setup file I should put it to make it working? (I cannot put
>. this in any of the local setup files (user,installation,workspace).
>Where have you been putting it? You can put it in your product catalog
>if you want. Have you tried changing it to set the "value" attribute
>instead of the "defaultValue" attribute?
I have always been putting it to the project catalog file but some how it was not working and now it gives "osgi.instance.area" variable is undeclared?
> Sorry I missed to answer for this comment. If I do not put the above
> setup task anywhere and try to switch the workspace after launching of
> eclipse, it will prompt you with the variable page and ask you to put
> the workspace.location.
> I think this should be reproducible. Try launching your eclipse (mars
> or neon) after installing and switch it to new workspace location. It
> should prompt you with the variable page.
>Because you have some task that uses this variable so if you don't put
>it anywhere it will definitely always prompt. So put it in your product
>catalog.
It is the same issue with the workspace.location. It is possible that I am missing something in my setup file. If You ask I can upload my setup file for you to check.
Thanks and Regrads,
Avneesh
|
|
|
Re: Problems migrating to Neon [message #1738058 is a reply to message #1738056] |
Fri, 15 July 2016 13:10 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Avneesh,
Comments below.
On 15.07.2016 14:42, Avneesh Singh wrote:
>>> I checked in the confirmation page also. It shows the task but it
>> >doesn't apply when I open the preferences page.
>>> Note that I have so many other preference settings also which works
>> >for both mars and neon but only PMD related settings are not
>> happening >for Eclipse neon. Its strange. Is the task enabled or
>> disabled? Black means the task is needed and will perform, grayed out
>> means it isn't needed and won't perform. If it's enabled, later on
>> when the task performs, there should be a log entry saying it's
>> performed.
> The tasks are performed as you can see in the below text from the
> Eclipse Updater Dialog
> "Performing Preference
> /instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules
> =
> ,CheckResultSet,AvoidDecimalLiteralsInBigDecimalConstructor,DoubleCheckedLocking,MissingSerialVersionUID,AvoidUsingHardCodedIP,DontUseFloatTypeForLoopIndices,ForLoopShouldBeWhileLoop,ClassCastExceptionWithToArray,LoggerIsNotStaticFinal,BeanMembersShouldSerialize,AvoidBranchingStatementAsLastInLoop,BooleanInstantiation,MisplacedNullCheck,MoreThanOneLogger,OverrideBothEqualsAndHashcode,UnconditionalIfStatement,AvoidThreadGroup,AvoidUsingOctalValues,AvoidMultipleUnaryOperators,ReturnFromFinallyBlock,SystemPrintln,BigIntegerInstantiation,CheckSkipResult,BrokenNullCheck,DontCallThreadRun,ExtendsObject,CollapsibleIfStatements,GuardLogStatementJavaUtil,JumbledIncrementer,AvoidPrintStackTrace
> Performing Preference
> /instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement
> = true"
Preferences are stored in
<workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings There
should be a net.sourceforge.pmd.eclipse.plugin file there. If the task
performed, I expect that file to have been updated.
>
>> Is it the same version of PMD installed? Perhaps they've moved
>> where/how the preferences are stored.
> Yes its the same version of PMD used for both Mars and Neon. Its
> really strange behavior. It works for Mars and not for Neon.
>
>
>
>> . Which setup file I should put it to make it working? (I cannot put
>> . this in any of the local setup files (user,installation,workspace).
>> Where have you been putting it? You can put it in your product
>> catalog if you want. Have you tried changing it to set the "value"
>> attribute instead of the "defaultValue" attribute?
> I have always been putting it to the project catalog file but some
> how it was not working and now it gives "osgi.instance.area" variable
> is undeclared?
Sorry, but this is all so vague. A project catalog generally should
have a workspace task in it and that generally has ID "workspace" and
that induces the variable workspace.location. The workspace location is
computed; you should not need a variable for it. But if you open the
IDE for a new workspace, and don't have any project streams in it, there
will be no workspace task and there will be no such variable defined.
I would suggest not using the workspace.location variable except in
tasks within a project setup.
>
>> Sorry I missed to answer for this comment. If I do not put the above
>> setup task anywhere and try to switch the workspace after launching
>> of eclipse, it will prompt you with the variable page and ask you to
>> put the workspace.location.
>> I think this should be reproducible. Try launching your eclipse (mars
>> or neon) after installing and switch it to new workspace location. It
>> should prompt you with the variable page. Because you have some task
>> that uses this variable so if you don't put it anywhere it will
>> definitely always prompt. So put it in your product catalog.
>
> It is the same issue with the workspace.location. It is possible that
> I am missing something in my setup file. If You ask I can upload my
> setup file for you to check.
Yes, it would be very helpful if you provided a concrete test case so I
can see exactly what you're doing.
>
> Thanks and Regrads,
> Avneesh
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Problems migrating to Neon [message #1738066 is a reply to message #1738058] |
Fri, 15 July 2016 13:45 |
Avneesh Singh Messages: 22 Registered: September 2015 |
Junior Member |
|
|
Thanks Ed for your prompt reply.
I have attached my product catalog and project catalog file.
and I have attached PMD "net.sourceforge.pmd.eclipse.plugin.prefs" file also.
I am sorry If I have done some blunder or idiotic thing in the setup files.
Thanks
>Avneesh,
>Comments below.
On 15.07.2016 14:42, Avneesh Singh wrote:
>>> I checked in the confirmation page also. It shows the task but it
>> >doesn't apply when I open the preferences page.
>>> Note that I have so many other preference settings also which works
>> >for both mars and neon but only PMD related settings are not
>> happening >for Eclipse neon. Its strange. Is the task enabled or
>> disabled? Black means the task is needed and will perform, grayed out
>> means it isn't needed and won't perform. If it's enabled, later on
>> when the task performs, there should be a log entry saying it's
>> performed.
> The tasks are performed as you can see in the below text from the
> Eclipse Updater Dialog
> "Performing Preference
> /instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules
> =
> ,CheckResultSet,AvoidDecimalLiteralsInBigDecimalConstructor,DoubleCheckedLocking,MissingSerialVersionUID,AvoidUsingHardCodedIP,DontUseFloatTypeForLoopIndices,ForLoopShouldBeWhileLoop,ClassCastExceptionWithToArray,LoggerIsNotStaticFinal,BeanMembersShouldSerialize,AvoidBranchingStatementAsLastInLoop,BooleanInstantiation,MisplacedNullCheck,MoreThanOneLogger,OverrideBothEqualsAndHashcode,UnconditionalIfStatement,AvoidThreadGroup,AvoidUsingOctalValues,AvoidMultipleUnaryOperators,ReturnFromFinallyBlock,SystemPrintln,BigIntegerInstantiation,CheckSkipResult,BrokenNullCheck,DontCallThreadRun,ExtendsObject,CollapsibleIfStatements,GuardLogStatementJavaUtil,JumbledIncrementer,AvoidPrintStackTrace
> Performing Preference
> /instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement
> = true"
Preferences are stored in
<workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings There
should be a net.sourceforge.pmd.eclipse.plugin file there. If the task
performed, I expect that file to have been updated.
>
>> Is it the same version of PMD installed? Perhaps they've moved
>> where/how the preferences are stored.
> Yes its the same version of PMD used for both Mars and Neon. Its
> really strange behavior. It works for Mars and not for Neon.
>
>
>
>> . Which setup file I should put it to make it working? (I cannot put
>> . this in any of the local setup files (user,installation,workspace).
>> Where have you been putting it? You can put it in your product
>> catalog if you want. Have you tried changing it to set the "value"
>> attribute instead of the "defaultValue" attribute?
> I have always been putting it to the project catalog file but some
> how it was not working and now it gives "osgi.instance.area" variable
> is undeclared?
Sorry, but this is all so vague. A project catalog generally should
have a workspace task in it and that generally has ID "workspace" and
that induces the variable workspace.location. The workspace location is
computed; you should not need a variable for it. But if you open the
IDE for a new workspace, and don't have any project streams in it, there
will be no workspace task and there will be no such variable defined.
I would suggest not using the workspace.location variable except in
tasks within a project setup.
>
>> Sorry I missed to answer for this comment. If I do not put the above
>> setup task anywhere and try to switch the workspace after launching
>> of eclipse, it will prompt you with the variable page and ask you to
>> put the workspace.location.
>> I think this should be reproducible. Try launching your eclipse (mars
>> or neon) after installing and switch it to new workspace location. It
>> should prompt you with the variable page. Because you have some task
>> that uses this variable so if you don't put it anywhere it will
>> definitely always prompt. So put it in your product catalog.
>
> It is the same issue with the workspace.location. It is possible that
> I am missing something in my setup file. If You ask I can upload my
> setup file for you to check.
Yes, it would be very helpful if you provided a concrete test case so I
can see exactly what you're doing.
>
> Thanks and Regrads,
> Avneesh
|
|
|
Re: Problems migrating to Neon [message #1738076 is a reply to message #1738066] |
Fri, 15 July 2016 15:19 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
This variable to define the workspace.location is just bogus in a
project setup. That variable is already implicitly defined by the
WorkspaceTask. Of course I can't test with your redirections, but if
I disable all those, and disable the use of that variable, and get rid
of your workspace.location variable, everything works fine.
Also the preference file has the contents you're expecting so that looks
fine too.
On 15.07.2016 15:45, Avneesh Singh wrote:
> Thanks Ed for your prompt reply.
>
> I have attached my product catalog and project catalog file.
> and I have attached PMD "net.sourceforge.pmd.eclipse.plugin.prefs" file also.
>
> I am sorry If I have done some blunder or idiotic thing in the setup files.
>
> Thanks
>> Avneesh,
>> Comments below.
>
> On 15.07.2016 14:42, Avneesh Singh wrote:
>>>> I checked in the confirmation page also. It shows the task but it
>>>> doesn't apply when I open the preferences page.
>>>> Note that I have so many other preference settings also which works
>>>> for both mars and neon but only PMD related settings are not
>>> happening >for Eclipse neon. Its strange. Is the task enabled or
>>> disabled? Black means the task is needed and will perform, grayed out
>>> means it isn't needed and won't perform. If it's enabled, later on
>>> when the task performs, there should be a log entry saying it's
>>> performed.
>> The tasks are performed as you can see in the below text from the
>> Eclipse Updater Dialog
>> "Performing Preference
>> /instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules
>> =
>> ,CheckResultSet,AvoidDecimalLiteralsInBigDecimalConstructor,DoubleCheckedLocking,MissingSerialVersionUID,AvoidUsingHardCodedIP,DontUseFloatTypeForLoopIndices,ForLoopShouldBeWhileLoop,ClassCastExceptionWithToArray,LoggerIsNotStaticFinal,BeanMembersShouldSerialize,AvoidBranchingStatementAsLastInLoop,BooleanInstantiation,MisplacedNullCheck,MoreThanOneLogger,OverrideBothEqualsAndHashcode,UnconditionalIfStatement,AvoidThreadGroup,AvoidUsingOctalValues,AvoidMultipleUnaryOperators,ReturnFromFinallyBlock,SystemPrintln,BigIntegerInstantiation,CheckSkipResult,BrokenNullCheck,DontCallThreadRun,ExtendsObject,CollapsibleIfStatements,GuardLogStatementJavaUtil,JumbledIncrementer,AvoidPrintStackTrace
>> Performing Preference
>> /instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement
>> = true"
> Preferences are stored in
> <workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings There
> should be a net.sourceforge.pmd.eclipse.plugin file there. If the task
> performed, I expect that file to have been updated.
>>> Is it the same version of PMD installed? Perhaps they've moved
>>> where/how the preferences are stored.
>> Yes its the same version of PMD used for both Mars and Neon. Its
>> really strange behavior. It works for Mars and not for Neon.
>>
>>
>>
>>> . Which setup file I should put it to make it working? (I cannot put
>>> . this in any of the local setup files (user,installation,workspace).
>>> Where have you been putting it? You can put it in your product
>>> catalog if you want. Have you tried changing it to set the "value"
>>> attribute instead of the "defaultValue" attribute?
>> I have always been putting it to the project catalog file but some
>> how it was not working and now it gives "osgi.instance.area" variable
>> is undeclared?
> Sorry, but this is all so vague. A project catalog generally should
> have a workspace task in it and that generally has ID "workspace" and
> that induces the variable workspace.location. The workspace location is
> computed; you should not need a variable for it. But if you open the
> IDE for a new workspace, and don't have any project streams in it, there
> will be no workspace task and there will be no such variable defined.
> I would suggest not using the workspace.location variable except in
> tasks within a project setup.
>>> Sorry I missed to answer for this comment. If I do not put the above
>>> setup task anywhere and try to switch the workspace after launching
>>> of eclipse, it will prompt you with the variable page and ask you to
>>> put the workspace.location.
>>> I think this should be reproducible. Try launching your eclipse (mars
>>> or neon) after installing and switch it to new workspace location. It
>>> should prompt you with the variable page. Because you have some task
>>> that uses this variable so if you don't put it anywhere it will
>>> definitely always prompt. So put it in your product catalog.
>> It is the same issue with the workspace.location. It is possible that
>> I am missing something in my setup file. If You ask I can upload my
>> setup file for you to check.
> Yes, it would be very helpful if you provided a concrete test case so I
> can see exactly what you're doing.
>> Thanks and Regrads,
>> Avneesh
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| |
Re: Problems migrating to Neon [message #1738194 is a reply to message #1738192] |
Mon, 18 July 2016 05:15 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Avneesh,
Comments below.
On 18.07.2016 06:09, Avneesh Singh wrote:
> Comments Below.
>
>> This variable to define the workspace.location is just bogus in a
>> project setup. That variable is already implicitly defined by the
>> WorkspaceTask. Of course I can't test with your redirections, but if
>> I disable all those, and disable the use of that variable, and get
>> rid of your workspace.location variable, everything works fine.
>
> I guess I found the reason why it was not working. I tried removing
> the below task from the product catalog file and now I can easily
> switch to the new workspace without a variable dialog for workspace
> location.
> " <setupTask
> xsi:type="setup:ResourceCreationTask"
> excludedTriggers="STARTUP MANUAL"
> content="<?xml version="1.0" encoding="UTF-8"?>
>
> <checkstyle-configurations file-format-version="5.0.0"
> default-check-configuration="ETS Configuration">
> <check-configuration name="ETS Configuration"
> location="C:\LegacyApp\ETS-Dev\Oomph\beta\config\ets-checkstyle-config.xml"
> type="external" description="ds">
> <additional-data name="protect-config-file" value="false"/>
> </check-configuration>
> </checkstyle-configurations>"
> targetURL="${workspace.location|uri}/.metadata/.plugins/net.sf.eclipsecs.core/checkstyle-config.xml"
> encoding="UTF-8"
> documentation="Initialize Checkstyle configuration."/>
>
> Is there any other way to set the above configuration for checkstyle
> for users?
Using workspace.location works fine if the workspace is configured with
a project setup, i.e., if the workspace.setup references a stream in
some project catalog, because the project catalog generally should have
a WorkspaceTask with ID "workspace" that will induce the value for this
variable. So a task using this variable should only be an a project
catalog. If you want such a task in a product catalog, you should
replace the use of that variable with ${osgi.instance.area|file} (not
define a variable that will conflict with the case that you have a
stream referenced by the workspace.setup) and make sure the task with
that reference is not triggered at bootstrap time (as you've already
done). Then it should work in any installation even with an empty new
workspace.
>
>> Also the preference file has the contents you're expecting so that
>> looks fine too.
> I am sorry that last time I checked the mars workspace intead of neon
> and the values are correct there.
> I checked the neon workspace
> <workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings
> net.sourceforge.pmd.eclipse.plugin.prefs file and I found that
> "net.sourceforge.pmd.eclipse.plugin.globalRuleManagement=false"
> whereas the the installer window shows "Performing Preference
> /instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement
>
> = true".
I tested this. I modified the p2 task in a product version in the
Eclipse.org product catalog to install
net.sourceforge.pmd.eclipse.feature.group from
https://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/. I
used that to create an installation. In that installation I recorded
this task by changing the PMD preferences.
<?xml version="1.0" encoding="UTF-8"?>
<setup:PreferenceTask
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement"
value="true"/>
I checked in the file system that the preference file contains
net.sourceforge.pmd.eclipse.plugin.globalRuleManagement=true
Then I terminated, copied the above task to the product catalog,
modified the preference file itself in the workspace metadata to change
the value to false, and then I started that same workspace again. The
log shows:
Performing Preference
/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement
= true
And the file has true it in again afterward.
So that works for me.
> It works for mars perfectly but not for neon. I checked the PMD
> version also and its the same for both mars and neon.
>
> Thanks,
> Avneesh
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
| | | | | |
Re: Problems migrating to Neon [message #1756287 is a reply to message #1738236] |
Wed, 15 March 2017 05:49 |
Tarun Kumar Kapse Messages: 1 Registered: September 2011 |
Junior Member |
|
|
Hi Eid,
For pmd setup task I am using following sinppet in neon
<setupTask
xsi:type="setup:CompoundTask"
name="User Preferences">
<annotation
source="http://www.eclipse.org/oomph/setup/UserPreferences">
<detail
key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement">
<value>record</value>
</detail>
<detail
key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_renderers">
<value>record</value>
</detail>
<detail
key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules">
<value>record</value>
</detail>
</annotation>
<setupTask
xsi:type="setup:CompoundTask"
name="net.sourceforge.pmd.eclipse.plugin">
<setupTask
xsi:type="setup:PreferenceTask"
key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.globalRuleManagement"
value="true"/>
<setupTask
xsi:type="setup:PreferenceTask"
key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_renderers"
value=",text"/>
<setupTask
xsi:type="setup:PreferenceTask"
key="/instance/net.sourceforge.pmd.eclipse.plugin/net.sourceforge.pmd.eclipse.plugin.active_rules"
value=",CheckResultSet,AvoidDecimalLiteralsInBigDecimalConstructor,DoubleCheckedLocking,MissingSerialVersionUID,AvoidUsingHardCodedIP,DontUseFloatTypeForLoopIndices,ForLoopShouldBeWhileLoop,ClassCastExceptionWithToArray,LoggerIsNotStaticFinal,BeanMembersShouldSerialize,AvoidBranchingStatementAsLastInLoop,BooleanInstantiation,MisplacedNullCheck,MoreThanOneLogger,OverrideBothEqualsAndHashcode,UnconditionalIfStatement,AvoidThreadGroup,AvoidUsingOctalValues,AvoidMultipleUnaryOperators,ReturnFromFinallyBlock,SystemPrintln,BigIntegerInstantiation,CheckSkipResult,BrokenNullCheck,DontCallThreadRun,ExtendsObject,CollapsibleIfStatements,GuardLogStatementJavaUtil,JumbledIncrementer,AvoidPrintStackTrace"/>
</setupTask>
</setupTask>
But still it's not setting net.sourceforge.pmd.eclipse.plugin.globalRuleManagement preferences to "true".
Please let me know if if something is wrong here.
Same snippet is working with mars but not with neon.
Thanks
Tarun
|
|
| |
Goto Forum:
Current Time: Thu Dec 26 10:21:04 GMT 2024
Powered by FUDForum. Page generated in 0.06631 seconds
|