Accepting request 249921 from home:dmacvicar:branches:Java:packages

- clean spec file

- export NO_BRP_CHECK_BYTECODE_VERSION

- Update to ecj 4.2.1 (expected by tomcat 7.0.55+)
- Sync with Fedora ecj-4.4
- Drop gcj patches

OBS-URL: https://build.opensuse.org/request/show/249921
OBS-URL: https://build.opensuse.org/package/show/Java:packages/ecj?expand=0&rev=19
This commit is contained in:
Tomáš Chvátal 2014-09-17 11:38:53 +00:00 committed by Git OBS Bridge
parent 3d8be3debc
commit 5e5366e444
14 changed files with 332 additions and 174 deletions

28
MANIFEST.MF Normal file
View File

@ -0,0 +1,28 @@
Manifest-Version: 1.0
Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
Bundle-ManifestVersion: 2
Bundle-Name: Eclipse Compiler for Java(TM)
Bundle-SymbolicName: org.eclipse.jdt.core.compiler.batch
Bundle-Version: 3.10.0.qualifier
Bundle-ClassPath: .
Bundle-Vendor: Eclipse.org
Export-Package: org.eclipse.jdt.core,
org.eclipse.jdt.core.compiler,
org.eclipse.jdt.internal.antadapter;x-internal:=true,
org.eclipse.jdt.internal.compiler;x-internal:=true,
org.eclipse.jdt.internal.compiler.apt.dispatch;x-internal:=true,
org.eclipse.jdt.internal.compiler.apt.model;x-internal:=true,
org.eclipse.jdt.internal.compiler.apt.util;x-internal:=true,
org.eclipse.jdt.internal.compiler.ast;x-internal:=true,
org.eclipse.jdt.internal.compiler.batch;x-internal:=true,
org.eclipse.jdt.internal.compiler.classfmt;x-internal:=true,
org.eclipse.jdt.internal.compiler.codegen;x-internal:=true,
org.eclipse.jdt.internal.compiler.env;x-internal:=true,
org.eclipse.jdt.internal.compiler.flow;x-internal:=true,
org.eclipse.jdt.internal.compiler.impl;x-internal:=true,
org.eclipse.jdt.internal.compiler.lookup;x-internal:=true,
org.eclipse.jdt.internal.compiler.parser;x-internal:=true,
org.eclipse.jdt.internal.compiler.parser.diagnose;x-internal:=true,
org.eclipse.jdt.internal.compiler.problem;x-internal:=true,
org.eclipse.jdt.internal.compiler.util;x-internal:=true,
org.eclipse.jdt.internal.compiler.tool;x-internal:=true

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?><project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jdt</groupId>
<artifactId>core</artifactId>
<name>Java Development Tools Core</name>
<version>3.3.0-v_771</version>
<licenses>
<license>
<name>Eclipse Public License - v 1.0</name>
<url>http://www.eclipse.org/org/documents/epl-v10.html</url>
</license>
</licenses>
</project>

26
ecj-4.4.pom Normal file
View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<!--
Originally downloaded here:
http://download.eclipse.org/eclipse/downloads/drops4/R-4.4-201406061215/#JDTCORE
-->
<modelVersion>4.0.0</modelVersion>
<groupId>org.eclipse.jdt.core.compiler</groupId>
<artifactId>ecj</artifactId>
<version>4.4</version>
<packaging>jar</packaging>
<name>Eclipse ECJ</name>
<description>Eclipse JDT Core Batch Compiler</description>
<url>http://www.eclipse.org/jdt/</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<licenses>
<license>
<name>Eclipse Public License v1.0</name>
<url>http://www.eclipse.org/org/documents/epl-v10.php</url>
<distribution>repo</distribution>
</license>
</licenses>
</project>

View File

@ -1,22 +0,0 @@
### Eclipse Workspace Patch 1.0
#P org.eclipse.jdt.core
Index: compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java,v
retrieving revision 1.203
diff -u -r1.203 CompilerOptions.java
--- compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 14 Apr 2008 19:41:33 -0000 1.203
+++ compiler/org/eclipse/jdt/internal/compiler/impl/CompilerOptions.java 15 Dec 2008 19:50:02 -0000
@@ -1145,9 +1145,9 @@
// by default only lines and source attributes are generated.
this.produceDebugAttributes = ClassFileConstants.ATTR_SOURCE | ClassFileConstants.ATTR_LINES;
- this.complianceLevel = this.originalComplianceLevel = ClassFileConstants.JDK1_4; // by default be compliant with 1.4
- this.sourceLevel = this.originalSourceLevel = ClassFileConstants.JDK1_3; //1.3 source behavior by default
- this.targetJDK = ClassFileConstants.JDK1_2; // default generates for JVM1.2
+ this.complianceLevel = this.originalComplianceLevel = ClassFileConstants.JDK1_5;
+ this.sourceLevel = this.originalSourceLevel = ClassFileConstants.JDK1_5;
+ this.targetJDK = ClassFileConstants.JDK1_5;
this.defaultEncoding = null; // will use the platform default encoding

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:253996e9541763a1042984a103a531142e803260bdff79f730237bc49a716b26
size 6329

View File

@ -1,21 +0,0 @@
diff -up ./build.xml.sav ./build.xml
--- ./build.xml.sav 2009-03-11 13:30:38.000000000 -0400
+++ ./build.xml 2009-03-11 13:30:34.000000000 -0400
@@ -10,7 +10,7 @@
<mkdir dir="${output}" />
<javac srcdir="${basedir}" destdir="${output}"
- debuglevel="lines,source"
+ debug="yes"
source="1.3"
target="1.2"
excludes="org/eclipse/jdt/internal/compiler/tool/*,**/apt/**">
@@ -18,7 +18,7 @@
</javac>
<javac destdir="${output}"
- debuglevel="lines,source"
+ debug="yes"
source="1.6"
target="1.6"
includes="org/eclipse/jdt/internal/compiler/tool/*">

View File

@ -1,7 +1,7 @@
--- a/build.xml 2012-10-09 13:56:47.695928242 -0400
+++ b/build.xml 2012-10-09 13:57:06.822893233 -0400
@@ -46,6 +46,7 @@
<include name="**/*.rsc"/>
--- build.xml 2014-05-01 09:36:51.417339328 +0300
+++ build.xml 2014-05-01 09:38:36.330493400 +0300
@@ -49,6 +49,7 @@
<include name="**/readableNames.props"/>
<include name="META-INF/**"/>
<include name="**/*.properties"/>
+ <include name="**/*.props"/>

216
ecj.1 Normal file
View File

@ -0,0 +1,216 @@
.TH ECJ "1" "May 2013"
.SH NAME
ecj \- manual page for eclipse JDT Compiler
.SH SYNOPSIS
.B ecj <options> <source files>\fR
.SH DESCRIPTION
The JDT Compiler (jdtc) is a command version of Java compiler for eclipse. ecj
has basic java compiler options like SUN's javac.
.SH OPTIONS
.TP 20
\fB\-help\fR
display a help message
.TP
\fB\-version\fR
compiler version number
.SS Classpath options:
.br
.TP 20
\fB\-cp \-classpath\fR <directories and ZIP archives separated by :>
specify location for application classes and sources. Each directory or file can specify access rules for types between '[' and ']' (e.g. [-X] to forbid access to type X, [~X] to discourage access to type X, [+p/X:-p/*] to forbid access to all types in package p but allow access to p/X)
.TP
\fB\-bootclasspath\fR <directories and ZIP archives separated by :>
specify location for system classes. Each directory or file can specify access rules for types between '[' and ']'
.TP
\fB\-sourcepath\fR <directories and ZIP archives separated by :>
specify location for application sources. Each directory or file can specify access rules for types between '[' and ']'. Each directory can further specify a specific destination directory using a '-d' option between '[' and ']'; this overrides the general '-d' option.
.br
\[char46]class files created from source files contained in a jar file are put in the user.dir folder in case no general '-d' option is specified. ZIP archives cannot override the general '-d' option
.TP
\fB\-extdirs\fR <directories separated by :>
specify location for extension ZIP archives
.TP
\fB\-endoreseddirs\fR <directories separated by :>
specify location for endorsed ZIP archives
.TP
\fB\-d\fR <dir>
destination directory (if omitted no package directory structure is created); this option can be overridden per source directory
.TP
\fB\-d\fR none
generate no .class files
.TP
\fB\-encoding <enc>\fR
specify default encoding for all source files. Each file/directory can override it when suffixed with '['<enc>']' (e.g. X.java[utf8]).
.br
If multiple default encodings are specified, the last one will be used.
.SS Compliance options:
.TP 20
\fB\-1.3\fR
use 1.3 compliance (-source 1.3 -target 1.1)
.TP
\fB\-1.4\fR
use 1.4 compliance (-source 1.3 -target 1.2) (default)
.TP
\fB\-1.5 \-5 \-5.0\fR
use 1.5 compliance (-source 1.5 -target 1.5)
.TP
\fB\-1.6 \-6 \-6.0\fR
use 1.6 compliance (-source 1.6 -target 1.6)
.TP
\fB\-1.7 \-7 \-7.0\fR
use 1.7 compliance (-source 1.7 -target 1.7)
.TP
\fB\-source\fR <version>
set source level: 1.3 to 1.7 (or 5, 5.0, etc)
.TP
\fB\-target\fR <version>
set classfile target: 1.1 to 1.7 (or 5, 5.0, etc)
.br
cldc1.1 can also be used to generate the StackMap attribute
.SS Warning options:
.TP 20
\fB\-deprecation
deprecation outside deprecated code (equivalent to '-warn:+deprecation', default)
.TP
\fB\-nowarn -warn:none\fR
disable all warnings
.TP
\fB-nowarn:[<directories separated by :>]\fR
specify directories from which optional problems should be ignored
.TP
\fB\-?:warn -help:warn\fR
display advanced warning options
.SS Error options:
.TP
\fB\-err:<warnings separated by ,>
convert exactly the listed warnings to be reported as errors
.TP
\fB\-err:+<warnings separated by ,>
enable additional warnings to be reported as errors
.TP
\fB\-err:-<warnings separated by ,>
disable specific warnings to be reported as errors
.SS Setting warning or error options using properties file:
.TP 20
\fB\-properties <file>
set warnings/errors option based on the properties file contents. This option can be used with -nowarn, -err:.. or -warn:.. options, but the last one on the command line sets the options to be used.
.SS Debug options:
.TP 20
\fB\-g[:lines,vars,source]\fR
custom debug info
.TP
\fB\-g:lines,source\fR
both lines table and source debug info (default)
.TP
\fB\-g\fR
all debug info
.TP
\fB\-g:none\fR
no debug info
.TP
\fB\-preserveAllLocals\fR
preserve unused local vars for debug purpose
.SS Annotation processing options:
.PP
These options are meaningful only in a 1.6 environment.
.TP 20
\fB\-Akey[=value]\fN
options that are passed to annotation processors
.TP
\fB\-processorpath\fR <directories and ZIP archives separated by :>
specify locations where to find annotation processors. If this option is not used, the classpath will be searched for processors
.TP
\fB\-processor\fR <class1[,class2,...]>
qualified names of the annotation processors to run. This bypasses the default annotation discovery process
.TP
\fB\-proc:only
run annotation processors, but do not compile
.TP
\fB\-proc:none
perform compilation but do not run annotation processors
.TP
\fB\-s <dir>\fR
destination directory for generated source files
.TP
\fB\-XprintProcessorInfo\fR
print information about which annotations and elements a processor is asked to process
.TP
\fB\-XprintRounds\fR
print information about annotation processing rounds
.TP
\fB\-classNames <className1[,className2,...]>\fR
qualified names of binary classes to process
.SS Advanced options:
.TP 20
\fB\@<file>\fR
read command line arguments from file
.TP
\fB\-maxProblems <n>\fR
max number of problems per compilation unit (100 by default)
.TP
\fB\-log <file>\fR
log to a file. If the file extension is '.xml', then the log will be a xml file.
.TP
\fB\-proceedOnError[:Fatal]\fR
do not stop at first error, dumping class files with problem methods
.br
With ":Fatal", all optional errors are treated as fatal
.TP
\fB\-verbose\fR
enable verbose output
.TP
\fB\-referenceInfo\fR
compute reference info
.TP
\fB\-progress\fR
show progress (only in -log mode)
.TP
\fB\-time\fR
display speed information
.TP
\fB\-noExit\fR
do not call System.exit(n) at end of compilation (n==0 if no error)
.TP
\fB\-repeat <n>\fR
repeat compilation process <n> times for perf analysis
.TP
\fB\-inlineJSR\fR
inline JSR bytecode (implicit if target >= 1.5)
.TP
\fB\-enableJavadoc\fR
consider references in javadoc
.TP
\fB\-Xemacs\fR
used to enable emacs-style output in the console.
.br
It does not affect the xml log output
.TP
\fB\-missingNullDefault\fR
report missing default nullness annotation
.TP
\fB\-? \-help\fR
print help message
.TP
\fB\-v \-version\fR
print compiler version
.TP
\fB\-showversion\fR
print compiler version and continue
.SS Ignored options:
.TP 20
\fB\-J<option>\fR
pass option to virtual machine (ignored)
.TP
\fB\-X<option>\fR
specify non-standard option (ignored except for listed -X options)
.TP
\fB\-X\fR
print non-standard options and exit (ignored)
.TP
\fB\-O\fR
optimize for execution time (ignored)
.PP
.SH AUTHOR
This manual page was written by Takshi Okamoto and Jan Schulz
<debian@katzien.de>, and updated by Jon VanAlten <jon.vanalten@redhat.com>.

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Wed Sep 17 09:47:20 UTC 2014 - dmacvicar@suse.de
- clean spec file
-------------------------------------------------------------------
Mon Sep 15 14:09:09 UTC 2014 - dmacvicar@suse.de
- export NO_BRP_CHECK_BYTECODE_VERSION
-------------------------------------------------------------------
Mon Sep 15 12:33:11 UTC 2014 - dmacvicar@suse.de
- Update to ecj 4.2.1 (expected by tomcat 7.0.55+)
- Sync with Fedora ecj-4.4
- Drop gcj patches
-------------------------------------------------------------------
Wed Sep 3 14:38:14 UTC 2014 - tchvatal@suse.com

View File

@ -16,47 +16,34 @@
#
%global qualifier R-4.4-201406061215
Name: ecj
Version: 4.2.1
Version: 4.4.0
Release: 0
Summary: Eclipse Compiler for Java
License: EPL-1.0
Group: Development/Languages/Java
Url: http://eclipse.org
Source0: %{name}src-%{version}.jar
Group: Development/Languages
Url: http://www.eclipse.org
Source0: http://download.eclipse.org/eclipse/downloads/drops4/%{qualifier}/%{name}src-4.4.jar
Source1: ecj.sh.in
# Use ECJ for GCJ
# cvs -d:pserver:anonymous@sourceware.org:/cvs/rhug \
# export -D 2009-09-28 eclipse-gcj
# tar cjf ecj-gcj.tar.bz2 eclipse-gcj
Source2: %{name}-gcj.tar.bz2
#Patched from http://repo2.maven.org/maven2/org/eclipse/jdt/core/3.3.0-v_771/core-3.3.0-v_771.pom
#Patched from http://central.maven.org/maven2/org/eclipse/jdt/core/compiler/ecj/4.4/ecj-4.4.pom
# No dependencies are needed for ecj, dependencies are for using of jdt.core which makes no sense outside of eclipse
Source3: core-3.3.0-v_771.pom
Source3: ecj-4.4.pom
Source4: ecj.1
Source5: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/plain/org.eclipse.jdt.core/scripts/binary/META-INF/MANIFEST.MF
# Always generate debug info when building RPMs (Andrew Haley)
Patch0: %{name}-rpmdebuginfo.patch
Patch1: %{name}-defaultto1.5.patch
Patch2: %{name}-generatedebuginfo.patch
# Patches Source2 for compatibility with newer ecj
Patch3: eclipse-gcj-compat4.2.1.patch
# build.xml fails to include a necessary .props file in the built ecj.jar
Patch4: %{name}-include-props.patch
Patch5: eclipse-gcj-nodummysymbol.patch
Patch1: %{name}-include-props.patch
BuildRequires: ant
BuildRequires: javapackages-tools
BuildRequires: sed
BuildRequires: gzip
BuildRequires: java-devel >= 1.7.0
BuildRequires: unzip
Requires: java >= 1.6.0
Provides: eclipse-ecj = %{version}-%{release}
Obsoletes: %{name}-native < 4.2.1
Obsoletes: eclipse-ecj < 3.4.2-4
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Conflicts: ecj-bootstrap
%if 0%{?suse_version} < 1320
BuildRequires: java-devel >= 1.6.0
%else
#!BuildIgnore: java-1_6_0-openjdk java-1_6_0-openjdk-devel
#!BuildIgnore: java-1_7_0-openjdk java-1_7_0-openjdk-devel
BuildRequires: java-1_7_0-openjdk-bootstrap-devel
%endif
%description
ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as
@ -65,35 +52,31 @@ the JDT Core batch compiler.
%prep
%setup -q -c
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch4 -p1
%patch1 -b .sav
sed -i -e 's|debuglevel=\"lines,source\"|debug=\"yes\"|g' build.xml
sed -i -e "s/Xlint:none/Xlint:none -encoding cp1252/g" build.xml
%if 0%{?suse_version} < 1200
sed -i -e 's|source=\"1.6\"|source=\"1.5\"|g' build.xml
sed -i -e 's|target=\"1.6\"|target=\"1.5\"|g' build.xml
%endif
cp %{SOURCE3} pom.xml
# Use ECJ for GCJ's bytecode compiler
tar jxf %{SOURCE2}
mv eclipse-gcj/org/eclipse/jdt/internal/compiler/batch/GCCMain.java \
org/eclipse/jdt/internal/compiler/batch/
%patch3 -p1
%patch5 -p1
cat eclipse-gcj/gcc.properties >> \
org/eclipse/jdt/internal/compiler/batch/messages.properties
rm -rf eclipse-gcj
# Remove bits of JDT Core we don't want to build
rm -r org/eclipse/jdt/internal/compiler/tool
rm -r org/eclipse/jdt/internal/compiler/apt
rm -f org/eclipse/jdt/core/BuildJarIndex.java
mkdir -p scripts/binary/META-INF/
cp %{SOURCE5} scripts/binary/META-INF/MANIFEST.MF
# JDTCompilerAdapter isn't used by the batch compiler
rm -f org/eclipse/jdt/core/JDTCompilerAdapter.java
cp %{SOURCE4} ecj.1
%build
ant
gzip ecj.1
%install
mkdir -p %{buildroot}%{_javadir}
cp -a *.jar %{buildroot}%{_javadir}/%{name}.jar
install -m0644 ecj.jar %{buildroot}%{_javadir}/%{name}.jar
pushd %{buildroot}%{_javadir}
ln -s %{name}.jar eclipse-%{name}.jar
ln -s %{name}.jar jdtcore.jar
@ -103,21 +86,25 @@ popd
install -p -D -m0755 %{SOURCE1} %{buildroot}%{_bindir}/ecj
sed --in-place "s:@JAVADIR@:%{_javadir}:" %{buildroot}%{_bindir}/ecj
# Install manpage
mkdir -p %{buildroot}%{_mandir}/man1
install -m 644 -p ecj.1.gz %{buildroot}%{_mandir}/man1/ecj.1.gz
# poms
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -pm 644 pom.xml \
%{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap -a "org.eclipse.tycho:org.eclipse.jdt.core" JPP-%{name}.pom %{name}.jar
%add_maven_depmap -a "org.eclipse.tycho:org.eclipse.jdt.core,org.eclipse.jdt:core,org.eclipse.jdt:org.eclipse.jdt.core" JPP-%{name}.pom %{name}.jar
%files
%defattr(0644,root,root,0755)
%files -f .mfiles
%defattr(-,root,root)
%doc about.html
%{_mavenpomdir}/JPP-%{name}.pom
%{_mavendepmapfragdir}/%{name}
%attr(0755,root,root) %{_bindir}/%{name}
%{_bindir}/%{name}
%{_javadir}/%{name}.jar
%{_javadir}/eclipse-%{name}.jar
%{_javadir}/jdtcore.jar
%{_mandir}/man1/ecj.1.gz
%changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d261b2158f598640f1923805d2e9bf47eb21d8333f4e1b37f59f847ad00d48f4
size 1417043

3
ecjsrc-4.4.jar Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:429a65013ae9740e4f05451f8e2968b389ec04ef2c7178ccfa5ef6714488fd12
size 1756780

View File

@ -1,20 +0,0 @@
diff -u -r org/eclipse/jdt/internal/compiler/batch/GCCMain.java org/eclipse/jdt/internal/compiler/batch/GCCMain.java
--- a/org/eclipse/jdt/internal/compiler/batch/GCCMain.java 2008-08-13 13:46:30.000000000 -0400
+++ b/org/eclipse/jdt/internal/compiler/batch/GCCMain.java 2012-04-26 13:36:21.268642702 -0400
@@ -29,6 +29,7 @@
import org.eclipse.jdt.internal.compiler.env.AccessRule;
import org.eclipse.jdt.internal.compiler.env.AccessRuleSet;
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
+import org.eclipse.jdt.internal.compiler.problem.ProblemSeverities;
import org.eclipse.jdt.internal.compiler.util.Messages;
import org.eclipse.jdt.internal.compiler.util.SuffixConstants;
@@ -463,7 +464,7 @@
}
if (inhibitAllWarnings)
- disableWarnings();
+ disableAll(ProblemSeverities.Warning);
if (treatWarningsAsErrors)
turnWarningsToErrors();

View File

@ -1,37 +0,0 @@
diff -u -r org/eclipse/jdt/internal/compiler/batch/GCCMain.java org/eclipse/jdt/internal/compiler/batch/GCCMain.java
--- a/org/eclipse/jdt/internal/compiler/batch/GCCMain.java 2012-10-29 21:12:37.244254740 -0400
+++ b/org/eclipse/jdt/internal/compiler/batch/GCCMain.java 2012-10-29 21:13:55.661107108 -0400
@@ -101,16 +101,6 @@
}
zipStream = new ZipOutputStream(new BufferedOutputStream(os));
zipStream.setMethod(ZipOutputStream.STORED);
- // Sun/OpenJDK require at least one entry in the zip file.
- ZipEntry entry = new ZipEntry(".dummy");
- byte[] contents = new byte[0];
- CRC32 crc = new CRC32();
- crc.update(contents);
- entry.setSize(contents.length);
- entry.setCrc(crc.getValue());
- zipStream.putNextEntry(entry);
- zipStream.write(contents);
- zipStream.closeEntry();
}
return zipStream;
}
@@ -120,16 +110,6 @@
OutputStream os = new FileOutputStream(zipDependencyDestination);
zipDependencyStream = new ZipOutputStream(new BufferedOutputStream(os));
zipDependencyStream.setMethod(ZipOutputStream.STORED);
- // Sun/OpenJDK require at least one entry in the zip file.
- ZipEntry entry = new ZipEntry(".dummy");
- byte[] contents = new byte[0];
- CRC32 crc = new CRC32();
- crc.update(contents);
- entry.setSize(contents.length);
- entry.setCrc(crc.getValue());
- zipDependencyStream.putNextEntry(entry);
- zipDependencyStream.write(contents);
- zipDependencyStream.closeEntry();
}
return zipDependencyStream;
}