| Summary: | tycho package plugin incorrectly handles with 'bin.excludes' | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Meng Xin Zhu <kane.zhu> | ||||
| Component: | Tycho | Assignee: | Jan Sievers <jan.sievers> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | gregory.amerson, jan.sievers, kane.mx | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Meng Xin Zhu
Created attachment 209121 [details]
example project
There are two files named a.c and Makefile under src/, I want to exclude them from the final built jar.
(In reply to comment #1) > Created attachment 209121 [details] > example project > > There are two files named a.c and Makefile under src/, I want to exclude them > from the final built jar. I was under the impression that bin.includes are relative to the project root (same as for bin.includes), see integration test [1] However you are right there should be a way to exclude resources which are copied from the source to the output folder. Not sure if in addition to project root, we should also apply bin.excludes filters to the output folder. Do you have references how this is done exactly in PDE headless build? I can't find the details in the docs you linked. [1] http://git.eclipse.org/c/tycho/org.eclipse.tycho.git/tree/tycho-its/projects/MNGECLIPSE1007 (In reply to comment #2) > Not sure if in addition to project root, we should also apply bin.excludes > filters to the output folder. Do you have references how this is done exactly in > PDE headless build? I can't find the details in the docs you linked. PDE build creates the ant script based on the build.properties on the air. It uses the copy task to include and exclude the files listed in build.properties. See http://git.eclipse.org/c/pde/eclipse.pde.build.git/tree/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/FileSet.java (In reply to comment #3) > (In reply to comment #2) > > Not sure if in addition to project root, we should also apply bin.excludes > > filters to the output folder. Do you have references how this is done exactly in > > PDE headless build? I can't find the details in the docs you linked. > PDE build creates the ant script based on the build.properties on the air. It > uses the copy task to include and exclude the files listed in build.properties. > > See > http://git.eclipse.org/c/pde/eclipse.pde.build.git/tree/org.eclipse.pde.build/src/org/eclipse/pde/internal/build/ant/FileSet.java Could not figure out the details because generated ant scripts are not retained but the sample shows that bin.excludes are applied to resources copied from source to output folder too. In the meantime, I found a workaround. You can configure <plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-compiler-plugin</artifactId> <version>${tycho-version}</version> <configuration> <excludeResources> <exludeResource>a.c</exludeResource> <exludeResource>Makefile</exludeResource> </excludeResources> </configuration> </plugin> This should achieve what you want. Thanks for below workaround and quick fix. :) (In reply to comment #4) > In the meantime, I found a workaround. > > You can configure > > <plugin> > <groupId>org.eclipse.tycho</groupId> > <artifactId>tycho-compiler-plugin</artifactId> > <version>${tycho-version}</version> > <configuration> > <excludeResources> > <exludeResource>a.c</exludeResource> > <exludeResource>Makefile</exludeResource> > </excludeResources> > </configuration> > </plugin> > > This should achieve what you want. |