[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[tycho-user] product.feature: Error creating feature package: A zip file cannot include itself
|
I've found the answer to the problem.
My build.properties file only specifies root=... and not bin.includes.
The fileSet past to the archiver is empty and the archiver interprets
this to mean *, thus including target/
So on a second run of mvn install because target exists you get this
error, whereas running mvn clean made the problem go away.
To fix this I added
bin.includes=
And the empty value seems to do the trick.
To see what was happening I hacked tycho to debug the fileSet and ran with -X
[ERROR] Failed to execute goal
org.eclipse.tycho:tycho-packaging-plugin:0.15.0-SNAPSHOT:package-feature
(default-package-feature) on project ....product.feature: Error
creating feature package: A zip file cannot include itself -> [Help 1]
[DEBUG] -- end configuration --
[DEBUG] fileSet =
[INFO] Building jar:
...\features\....product.feature\target\....feature-2.0.11-SNAPSHOT.jar
[DEBUG] adding directory META-INF/
[DEBUG] adding entry META-INF/MANIFEST.MF
[DEBUG] adding directory .settings/
[DEBUG] adding directory buildConfiguration/
[DEBUG] adding directory feature.temp.folder/
[DEBUG] adding directory feature.temp.folder/plugins/
[DEBUG] adding directory
feature.temp.folder/plugins/....application_2.0.11.snapshot/
[DEBUG] adding directory rootfiles/
[DEBUG] adding directory target/
[DEBUG] adding directory target/maven-archiver/
[DEBUG] adding directory target/maven-shared-archive-resources/
[DEBUG] adding entry .project
[DEBUG] adding entry build.properties
[DEBUG] adding entry build.xml
[DEBUG] adding entry buildConfiguration/build.properties
[DEBUG] adding entry
feature.temp.folder/plugins/....application_2.0.11.snapshot/@dot.bin.log
[DEBUG] adding entry XXX.ico
[DEBUG] adding entry pom.xml
[DEBUG] adding entry README.txt
[DEBUG] adding entry rootfiles/XXX.ini
[DEBUG] adding entry target/.plxarc
Look at all that junk in there :)
In org.eclipse.tycho.packaging.IncludeValidationHelperTest I created this test:
@Test
public void testCheckIncludesNotSpecified() throws Exception {
BuildPropertiesImpl buildProperties =
createBuildProperties("no.bin.includes", "bin.includes is not
specified");
try {
subject.checkBinIncludesExist(createMockProject(),
buildProperties, true);
fail();
} catch (MojoExecutionException e) {
assertStringContains("TODO: Needs to throw an exception
here catch its message", e.getMessage());
}
}
This should probably fail instead of pass.
I couldn't find anything in the eclipse documentation that told me
what the default value of bin.includes would be if it wasn't specified
in build.properties.
This used to work in my PDE/Ant build.
When I work out how to provide patches I will do so.