Content in ResourceCreationTask getting mangled on save [message #1829799] |
Fri, 10 July 2020 13:40  |
Eclipse User |
|
|
|
I've started having a problem within the last month anytime I save an Oomph configuration with a resource creation task that the content field is moved from an attribute to it's own tag. That gets formatting applied which creates a broken XML file when the installer actually creates the file.
For example this task:
<setupTask
xsi:type="setup:ResourceCreationTask"
excludedTriggers="STARTUP MANUAL"
content="<?xml version="1.0" encoding="UTF-8"?>
<state reopen="false"/>"
targetURL="${dir.git|uri}/.metadata/.plugins/org.eclipse.ui.intro/introstate"
encoding="UTF-8"/>
Turns into this:
<setupTask
xsi:type="setup:ResourceCreationTask"
excludedTriggers="STARTUP MANUAL"
targetURL="${dir.git|uri}/.metadata/.plugins/org.eclipse.ui.intro/introstate"
encoding="UTF-8">
<content>
<?xml version="1.0" encoding="UTF-8"?>
<state reopen="false"/>
</content>
</setupTask>
I have tried to see if I accidentally set a generic XML format configuration change somewhere but nothing seems to retain the older behavior. I did a quick search on the forum and didn't see anything similar happening to anyone else.
This is on Eclipse 2019-09 with
Eclipse IDE for Enterprise Java Developers 4.13.0.20190917-0000 epp.package.jee Eclipse Packaging Project
EPP Common Package Feature 4.13.0.20190917-0000 org.eclipse.epp.package.common.feature.feature.group Eclipse Packaging Project
Oomph Setup 1.18.0.v20200701-0751 org.eclipse.oomph.setup.feature.group Eclipse Oomph Project
Oomph OS Tools 1.13.0.v20200624-1156 org.eclipse.oomph.ostools.feature.group Eclipse Oomph Project
Oomph Preferences Management 1.13.0.v20200624-1156 org.eclipse.oomph.preferences.feature.group Eclipse Oomph Project
Oomph P2 Management 1.17.0.v20200701-0751 org.eclipse.oomph.p2.feature.group Eclipse Oomph Project
Oomph Setup Core 1.18.0.v20200624-1156 org.eclipse.oomph.setup.core.feature.group Eclipse Oomph Project
Oomph Setup JDT 1.16.0.v20200624-1156 org.eclipse.oomph.setup.jdt.feature.group Eclipse Oomph Project
Oomph Setup Mylyn 1.15.0.v20200624-1156 org.eclipse.oomph.setup.mylyn.feature.group Eclipse Oomph Project
Oomph Setup Projects 1.14.0.v20200624-1156 org.eclipse.oomph.setup.projects.feature.group Eclipse Oomph Project
Oomph Setup Workbench 1.13.0.v20200624-1156 org.eclipse.oomph.setup.workbench.feature.group Eclipse Oomph Project
Oomph Setup Working Sets 1.14.0.v20200624-1156 org.eclipse.oomph.setup.workingsets.feature.group Eclipse Oomph Project
|
|
|
|
|
|
|
|
|
|
Re: Content in ResourceCreationTask getting mangled on save [message #1830223 is a reply to message #1830206] |
Tue, 21 July 2020 03:02  |
Eclipse User |
|
|
|
The self-extracting eclipse-inst-win64.exe itself handles command line arguments so likely you can launch it and specify what you need on the command line without a more complicated procedure.
The arguments may start with --debug; this is stripped off and produces trace information about how the extractor is extracting the components. The first argument can be -vm <location> ; this too is stripped off and that location is then used as the JVM. After that, all the arguments are passed to the product/application and all of the following applies:
https://help.eclipse.org/2020-06/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fmisc%2Fruntime-options.html
So you should, for example, be able to run eclipse-inst-win64.exe -name "PCI Eclipse Standard Tools Installer-eclipse.password" C:\PCI_Dev\source\SVN\ProjectEngineering\StandardTools\eclipse\config-gsms\master.key -vmargs -Dfoo=bar
Of course if you're repackaging this and wanting to redistribute a modified installer, that doesn't help so much...
It's still strange though because I don't see any significant changes in how the value is deserialized in BaseResourceImpl. But now that I say that, if the resource is loaded by an older version of the Setup model, one where the type of ResourceCreationTask.content is still EString and not Text, then the special handling doesn't kick in and the value, including the initial blank line and indentation, will be loaded. That must be what's happening...
Note that in advanced mode on the Configuration page, you can review the details of each and every task. So you can inspect the contents of the creation task to see if that already looks wrong; double click an attribute value to see the value in a dialog.
|
|
|
Powered by
FUDForum. Page generated in 0.05957 seconds