Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 338958

Summary: Shared license feature issue with ant build
Product: [Eclipse Project] PDE Reporter: Daniel Drigo Pastore <kpqb38>
Component: BuildAssignee: pde-build-inbox <pde-build-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: aniefer, dean.t.roberts, kim.moir, kpqb38, wmg040
Version: 3.7   
Target Milestone: 3.7 M6   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Shared license feature.xml file
none
feature.xml from one of Sequoyah's feature
none
build log file
none
Flawed temp.feature.folder/feature.xml none

Description Daniel Drigo Pastore CLA 2011-03-04 11:37:42 EST
Created attachment 190409 [details]
Shared license feature.xml file

I'm having issues to build Sequoyah using the new shared license feature.

This bug was being discussed on cross-project-dev (http://dev.eclipse.org/mhonarc/lists/cross-project-issues-dev/msg05527.html).

The main problem is that I'm getting an org.xml.sax.SAXParseException, because my  build is not understanding the feature.xml files correctly. It raises this same exception for every feature I build. Also remember tat I use a container feature to guide the build process. Here is part of the build output:

     [java] publish.bin.parts:
     [java]     [mkdir] Created dir: /opt/public/tools/sequoyah/indigo/temp/eclipse.build/features/org.eclipse.sequoyah.vnc.vncviewer.feature/feature.temp.folder/features/org.eclipse.sequoyah.vnc.vncviewer.feature_1.0.0.N20110302-1139
     [java]      [copy] Copying 3 files to /opt/public/tools/sequoyah/indigo/temp/eclipse.build/features/org.eclipse.sequoyah.vnc.vncviewer.feature/feature.temp.folder/features/org.eclipse.sequoyah.vnc.vncviewer.feature_1.0.0.N20110302-1139
     [java] [eclipse.gatherFeature] Generating metadata for ..
     [java] [eclipse.gatherFeature] org.xml.sax.SAXParseException: Content is not allowed in prolog.
     [java] [eclipse.gatherFeature] 	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
     [java] [eclipse.gatherFeature] 	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
     [java] [eclipse.gatherFeature] 	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
     [java] [eclipse.gatherFeature] 	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
     [java] [eclipse.gatherFeature] 	at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1441)
     [java] [eclipse.gatherFeature] 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:899)
     [java] [eclipse.gatherFeature] 	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
     [java] [eclipse.gatherFeature] 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
     [java] [eclipse.gatherFeature] 	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
     [java] [eclipse.gatherFeature] 	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
     [java] [eclipse.gatherFeature] 	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
     [java] [eclipse.gatherFeature] 	at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
     [java] [eclipse.gatherFeature] 	at org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureManifestParser.parse(FeatureManifestParser.java:98)
     [java] [eclipse.gatherFeature] 	at org.eclipse.equinox.internal.p2.publisher.eclipse.FeatureParser.parse(FeatureParser.java:52)
     [java] [eclipse.gatherFeature] 	at org.eclipse.pde.internal.build.publisher.GatherFeatureAction.getFeatures(GatherFeatureAction.java:44)
     [java] [eclipse.gatherFeature] 	at org.eclipse.equinox.p2.publisher.eclipse.FeaturesAction.perform(FeaturesAction.java:600)
     [java] [eclipse.gatherFeature] 	at org.eclipse.equinox.p2.publisher.Publisher$ArtifactProcess.run(Publisher.java:207)
     [java] [eclipse.gatherFeature] 	at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.executeBatch(SimpleArtifactRepository.java:1062)
     [java] [eclipse.gatherFeature] 	at org.eclipse.equinox.p2.publisher.Publisher.publish(Publisher.java:231)


I have also attached 2 files to ilustrate my situation:
- license_feature.xml
- other_feature.xml

Any help will be appreciated.

Thanks,

Daniel Pastore
Sequoyah Team
Comment 1 Daniel Drigo Pastore CLA 2011-03-04 11:38:39 EST
Created attachment 190410 [details]
feature.xml from one of Sequoyah's feature
Comment 2 DJ Houghton CLA 2011-03-04 11:42:27 EST
Similar to bug 338835?
Comment 3 Daniel Drigo Pastore CLA 2011-03-04 11:50:13 EST
(In reply to comment #2)
> Similar to bug 338835?

I'll try the same fix right now and report when I finish. :)
Comment 4 Kim Moir CLA 2011-03-04 11:52:51 EST
Your license feature doesn't refer to a license property.

For instance, see my license feature

http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.sdk-feature/features/org.eclipse.license/feature.xml?view=markup

which refers to these properties

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

The license property needs to be inherited from the feature.properties of the license feature.  For instance, here is my license feature's feature.properties 

http://dev.eclipse.org/viewcvs/viewvc.cgi/org.eclipse.sdk-feature/features/org.eclipse.license/feature.properties?view=markup

I have implemented my features to inherit the description and copyright from the properties contained in the feature.properties of the non-license features.
Comment 5 Daniel Drigo Pastore CLA 2011-03-04 12:49:53 EST
Hi Kim,

I'm glad to tell you that the build is now working just fine! 8)

Tks a lot for your help!

Daniel Pastore
Sequoyah Team
Comment 6 Kim Moir CLA 2011-03-04 13:53:27 EST
closing
Comment 7 Daniel Drigo Pastore CLA 2011-03-16 15:06:21 EDT
Created attachment 191337 [details]
build log file
Comment 8 Daniel Drigo Pastore CLA 2011-03-16 15:06:56 EDT
Created attachment 191338 [details]
Flawed temp.feature.folder/feature.xml
Comment 9 Daniel Drigo Pastore CLA 2011-03-16 15:08:19 EDT
Added two attachments.
Comment 10 Kim Moir CLA 2011-03-16 15:22:57 EDT
Did you try suggestion

https://bugs.eclipse.org/bugs/show_bug.cgi?id=338835#c4
Comment 11 Daniel Drigo Pastore CLA 2011-03-16 15:34:10 EDT
(In reply to comment #10)
> Did you try suggestion
> 
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=338835#c4

Thanks a lot, Kim!
That fixed it! :)

Thanks,
Daniel Pastore
Sequoyah Team
Comment 12 Andrew Niefer CLA 2011-03-16 15:51:56 EDT

*** This bug has been marked as a duplicate of bug 338835 ***