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

Bug 361875

Summary: Ignore SCM artifacts (such as .svn folders) when packaging features' root folders
Product: z_Archived Reporter: Anthony Dahanne <anthony.dahanne>
Component: TychoAssignee: Project Inbox <tycho-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: christian.bourgeois, jan.sievers, jon.goering, sebastien.angers
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Anthony Dahanne CLA 2011-10-24 18:41:39 EDT
=== What's the current behaviour ===
When building an eclipse-feature such as :
my.feature/
  root/
  feature.xml
  pom.xml
  build.properties
the root data folder, root/ will get zipped (my.feature_root-1.0.0-root.zip) with all its content, including .svn subfolders if they exist, if the build.properties contains this line : 
root = root/

=== What would be the target behaviour ===
The zip file containing all the root folder content (my.feature_root-1.0.0-root.zip), should NOT contain folders such as .svn

=== Is there a workaround ? ===
Yes, 2 actually :
 * svn checkout the source code then rm -Rf */.svn => but it makes the user issue an additional command to the build : rm -Rf */.svn && mvn clean install
 * use svn export => but popular CI servers such as Hudson/Jenkins do not provide this possibility since it makes them " forget" what is the current version checked out.

=== What is the suggested solution ? ===
Use the AbstractScanner , http://svn.codehaus.org/plexus/plexus-utils/trunk/src/main/java/org/codehaus/plexus/util/AbstractScanner.java to filter out the root content before zipping it, the same thing that was done for the useDefaultExcludes option when packaging plugins or features (see http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-packaging-plugin/src/main/java/org/eclipse/tycho/packaging/AbstractTychoPackagingMojo.java line 87)

Discussion on tycho-user mailing list : http://dev.eclipse.org/mhonarc/lists/tycho-user/msg01101.html
Comment 1 Jan Sievers CLA 2011-10-25 03:10:11 EDT

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