Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338835 - New shared license feature corrupts feature.xml
Summary: New shared license feature corrupts feature.xml
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 338958 342750 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-03-03 12:10 EST by Greg Watson CLA
Modified: 2011-04-14 05:34 EDT (History)
5 users (show)

See Also:


Attachments
Feature before mangling (2.11 KB, text/xml)
2011-03-03 14:29 EST, Greg Watson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Watson CLA 2011-03-03 12:10:18 EST
I'm trying to use the new shared license feature. I've created a new feature that contains the license files and a feature.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>
<feature
      id="org.eclipse.ptp.license"
      version="1.0.0.qualifier"
      image="eclipse_update_120.jpg">

   <description>
      %description
   </description>

   <copyright>
      %copyright
   </copyright>

   <license url="%licenseURL">
      %license
   </license>

</feature>

I have removed the license files from the original feature and modified the feature.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>
<feature
      id="org.eclipse.ptp"
      label="%featureName"
      version="5.0.0.qualifier"
      provider-name="%providerName"
      plugin="org.eclipse.ptp"
      license-feature="org.eclipse.ptp.license"
      license-feature-version="1.0.0.qualifier">

   <description url="http://eclipse.org/ptp">
      %description
   </description>
...

I'm using v20110223 of org.eclipse.releng.basebuilder. The build completes successfully and the license files appear to have been copied into the feature. However the feature.xml appears to be corrupted:

 url="%licenseURL">      %license
  <?xml version="1.0" encoding="UTF-8"?>
<feature
      id="org.eclipse.ptp"
      label="%featureName"
      version="5.0.0.201103031008"
      provider-name="%providerName"
      plugin="org.eclipse.ptp"
      
      >

   <description url="http://eclipse.org/ptp">
      %description
   </description>
...
Comment 1 DJ Houghton CLA 2011-03-03 13:45:24 EST
Adding Dean to the CC.
Comment 2 Andrew Niefer CLA 2011-03-03 13:47:42 EST
I have to assume something is going wrong in the LicenseReplaceTask, Greg can you please attach a copy of your modified feature.xml before the build mangles it.
Comment 3 Greg Watson CLA 2011-03-03 14:29:42 EST
Created attachment 190303 [details]
Feature before mangling
Comment 4 Andrew Niefer CLA 2011-03-03 17:04:30 EST
Greg, you can add back the 
   <license url="%licenseURL">
      %license
   </license>
section to your feature.xml and things should work better.

The code is trying to update this section with content based on the license feature, but it isn't doing a very good job when that section doesn't exist.
Comment 5 Greg Watson CLA 2011-03-03 20:53:51 EST
That's fixed it, thanks.
Comment 6 Andrew Niefer CLA 2011-03-16 15:51:56 EDT
*** Bug 338958 has been marked as a duplicate of this bug. ***
Comment 7 Andrew Niefer CLA 2011-03-24 16:43:52 EDT
fixed
Comment 8 Gunnar Wagenknecht CLA 2011-04-14 05:34:30 EDT
*** Bug 342750 has been marked as a duplicate of this bug. ***