diff --git a/eclipse-help-feature-adjust-dependencies.patch b/eclipse-help-feature-adjust-dependencies.patch
new file mode 100644
index 0000000..12f8292
--- /dev/null
+++ b/eclipse-help-feature-adjust-dependencies.patch
@@ -0,0 +1,94 @@
+diff -r -Nu eclipse-3.8.0-M1-src/features/org.eclipse.help/feature.xml eclipse-3.8.0-M1-src.patched/features/org.eclipse.help/feature.xml
+--- eclipse.platform.releng/features/org.eclipse.help-feature/feature.xml 2011-03-27 10:30:27.000000000 -0400
++++ eclipse.platform.releng/features/org.eclipse.help-feature/feature.xml 2011-08-23 14:01:19.026328809 -0400
+@@ -34,30 +34,37 @@
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+-
+-
+
+-
+
+-
++
++
+
+
++
++
++
++
+
+
+diff -r -Nu eclipse-3.8.0-M1-src/plugins/org.eclipse.help.base/META-INF/MANIFEST.MF eclipse-3.8.0-M1-src.patched/plugins/org.eclipse.help.base/META
+--- eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java.old 2012-01-18 08:58:41.397436636 +0100
++++ eclipse.platform.ua/org.eclipse.help.base/src/org/eclipse/help/internal/search/SearchIndex.java 2012-01-18 08:59:35.994625494 +0100
+@@ -106,7 +106,7 @@
+
+ public static final String DEPENDENCIES_KEY_ANALYZER = "analyzer"; //$NON-NLS-1$
+
+- private static final String LUCENE_BUNDLE_ID = "org.apache.lucene"; //$NON-NLS-1$
++ private static final String LUCENE_BUNDLE_ID = "org.apache.lucene.core"; //$NON-NLS-1$
+
+ private static final String FIELD_NAME = "name"; //$NON-NLS-1$
+
+--- eclipse.platform.ua/org.eclipse.help.base/META-INF/MANIFEST.MF.orig 2012-04-06 08:28:49.000000000 +0200
++++ eclipse.platform.ua/org.eclipse.help.base/META-INF/MANIFEST.MF 2012-04-06 08:40:46.988519392 +0200
+@@ -39,8 +39,8 @@
+ org.eclipse.help.search,
+ org.eclipse.help.server,
+ org.eclipse.help.standalone
+-Require-Bundle: org.apache.lucene;bundle-version="2.9.0";visibility:=reexport,
+- org.apache.lucene.analysis;bundle-version="2.9.0";visibility:=reexport,
++Require-Bundle: org.apache.lucene.core;bundle-version="[2.9.0,3.0.0)";visibility:=reexport,
++ org.apache.lucene.analysis;bundle-version="[2.9.0,3.0.0)";visibility:=reexport,
+ org.eclipse.ant.core;bundle-version="3.2.200";resolution:=optional,
+ org.eclipse.core.runtime;bundle-version="3.6.0",
+ org.eclipse.help;bundle-version="[3.5.0,4.0.0)";visibility:=reexport,
diff --git a/eclipse-remove-w3c-smil-and-use-geronimo.patch b/eclipse-remove-w3c-smil-and-use-geronimo.patch
new file mode 100644
index 0000000..d8465c8
--- /dev/null
+++ b/eclipse-remove-w3c-smil-and-use-geronimo.patch
@@ -0,0 +1,29 @@
+--- eclipse.platform.ui/features/org.eclipse.e4.rcp/feature.xml.orig 2012-02-24 09:22:22.000000000 +0100
++++ eclipse.platform.ui/features/org.eclipse.e4.rcp/feature.xml 2012-02-24 14:23:21.289474792 +0100
+@@ -124,13 +124,6 @@
+ unpack="false"/>
+
+
+-
+-
+
+
+
+ = 1.8.3
BuildRequires: rsync
@@ -205,58 +224,75 @@ Eclipse Plugin Development Environment. This package is required for
developing Eclipse plugins.
%prep
-export JAVA_HOME=%{java_home}
-%setup -q -n eclipse-build-%{eb_sha1}
-cp %{SOURCE1} .
-ant applyPatches
+%setup %{SOURCE0} -n R4_platform-aggregator
+
%patch0
-pushd build/eclipse-%{eclipse_version}-%{build_id}-src
+%patch1
+
+#TODO: waiting for bug
+%pom_disable_module bundles/org.eclipse.equinox.http.jetty5 rt.equinox.bundles .
+%pom_disable_module bundles/org.eclipse.equinox.http.jetty6 rt.equinox.bundles .
-sed -i -e "s|\[2.9.0,3.0.0)|\[2.9.0,4.0.0)|g" plugins/org.eclipse.help.base/META-INF/MANIFEST.MF
+#export JAVA_HOME=%{java_home}
+#%setup -q -n eclipse-build-%{eb_sha1}
+#cp %{SOURCE1} .
+#ant applyPatches
+#%patch0
+#pushd build/eclipse-%{eclipse_version}-%{build_id}-src
+
+#sed -i -e "s|\[2.9.0,3.0.0)|\[2.9.0,4.0.0)|g" plugins/org.eclipse.help.base/META-INF/MANIFEST.MF
# Use our system-installed javadocs, reference only what we built, and
# don't like to osgi.org docs (FIXME: maybe we should package them?)
-sed -i -e "s|http://download.oracle.com/javase/1.5.0/docs/api|%{_datadir}/javadoc/java|" \
- -e "/osgi\.org/d" \
- -e "s|-breakiterator|;../org.eclipse.equinox.util/@dot\n;../org.eclipse.ecf.filetransfer_3.0.0.v20090302-0803.jar\n;../org.eclipse.ecf_3.0.0.v20090302-0803.jar\n-breakiterator|" \
- plugins/org.eclipse.platform.doc.isv/platformOptions.txt
-sed -i -e "s|http://download.oracle.com/javase/1.5.0/docs/api|%{_datadir}/javadoc/java|" \
- -e "s/win32.win32.x86/gtk.linux.%{eclipse_arch}/" \
- plugins/org.eclipse.jdt.doc.isv/jdtOptions.txt
-sed -i -e "s|http://download.oracle.com/javase/6/docs/api|%{_datadir}/javadoc/java|" \
- -e "/osgi\.org/d" \
- plugins/org.eclipse.jdt.doc.isv/jdtOptions.txt
-sed -i -e "s|http://download.oracle.com/javase/1.4.2/docs/api|%{_datadir}/javadoc/java|" \
- -e "s/motif.linux.x86/gtk.linux.%{eclipse_arch}/" \
- -e "/osgi\.org/d" \
- plugins/org.eclipse.pde.doc.user/pdeOptions.txt \
- plugins/org.eclipse.pde.doc.user/pdeOptions.txt
-sed -i -e "s|http://download.oracle.com/javase/1.5.0/docs/api|%{_datadir}/javadoc/java|" \
- plugins/org.eclipse.pde.doc.user/pdeOptions.txt \
- plugins/org.eclipse.pde.doc.user/pdeOptions.txt
+#sed -i -e "s|http://download.oracle.com/javase/1.5.0/docs/api|%{_datadir}/javadoc/java|" \
+# -e "/osgi\.org/d" \
+# -e "s|-breakiterator|;../org.eclipse.equinox.util/@dot\n;../org.eclipse.ecf.filetransfer_3.0.0.v20090302-0803.jar\n;../org.eclipse.ecf_3.0.0.v20090302-0803.jar\n-breakiterator|" \
+# plugins/org.eclipse.platform.doc.isv/platformOptions.txt
+#sed -i -e "s|http://download.oracle.com/javase/1.5.0/docs/api|%{_datadir}/javadoc/java|" \
+# -e "s/win32.win32.x86/gtk.linux.%{eclipse_arch}/" \
+# plugins/org.eclipse.jdt.doc.isv/jdtOptions.txt
+#sed -i -e "s|http://download.oracle.com/javase/6/docs/api|%{_datadir}/javadoc/java|" \
+# -e "/osgi\.org/d" \
+# plugins/org.eclipse.jdt.doc.isv/jdtOptions.txt
+#sed -i -e "s|http://download.oracle.com/javase/1.4.2/docs/api|%{_datadir}/javadoc/java|" \
+# -e "s/motif.linux.x86/gtk.linux.%{eclipse_arch}/" \
+# -e "/osgi\.org/d" \
+# plugins/org.eclipse.pde.doc.user/pdeOptions.txt \
+# plugins/org.eclipse.pde.doc.user/pdeOptions.txt
+#sed -i -e "s|http://download.oracle.com/javase/1.5.0/docs/api|%{_datadir}/javadoc/java|" \
+# plugins/org.eclipse.pde.doc.user/pdeOptions.txt \
+# plugins/org.eclipse.pde.doc.user/pdeOptions.txt
#fix for glib 2.31 not allowing include of anything else but glib
-sed -i -e "s|#include ||g" plugins/org.eclipse.core.net/natives/unix/gnomeproxy.c
+#sed -i -e "s|#include ||g" plugins/org.eclipse.core.net/natives/unix/gnomeproxy.c
# make sure there are no jars left
-JARS=""
-for j in $(find -name \*.jar); do
- if [ ! -L $j ]; then
- JARS="$JARS `echo $j`"
- fi
-done
-if [ ! -z "$JARS" ]; then
- echo "These jars should be deleted and symlinked to system jars: $JARS"
- #FIXME: enable exit 1
-fi
+find . -name *.jar -exec rm -f {} \;
+find . -name *.class -exec rm -f {} \;
+find . -name *.so -exec rm -f {} \;
-popd
+#popd
%build
-export JAVA_HOME=%{java_home}
-ant provision.cvs
+mvn-rpmbuild -o -f eclipse-parent/pom.xml \
+ clean install \
+ -Dmaven.repo.local=R4_localrepo \
+ -Dmaven.local.mode=true
+
+mvn-rpmbuild -o -f maven-cbi-plugin/pom.xml \
+ clean install \
+ -Dmaven.repo.local=R4_localrepo \
+ -Dmaven.local.mode=true
+
+mvn-rpmbuild -o clean install \
+ -Dmaven.repo.local=R4_localrepo -Dmaven.test.skip=true -Dnative=gtk.linux.%{arch} \
+ -Dmaven.local.mode=true
+
+#export JAVA_HOME=%{java_home}
+#ant provision.cvs
%install
+exit 0;
export JAVA_HOME=%{java_home}
ant -DdestDir=$RPM_BUILD_ROOT -Dprefix=/usr -Dmultilib=true installSDKinDropins
diff --git a/get-eclipse.sh b/get-eclipse.sh
new file mode 100755
index 0000000..484e22d
--- /dev/null
+++ b/get-eclipse.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+rm -rf R4_platform-aggregator
+
+git clone -b Juno_RC4_R4 --recurse-submodules git://git.eclipse.org/gitroot/cbi/platform-aggregator.git R4_platform-aggregator
+
+find . -type d -name ".git" -exec rm -rf {} \;
+
+find . -type f -name "*.class" -exec rm -rf {} \;
+
+find . -name *.jar -exec rm -rf {} \;
+
+find . -type f -name *.so -exec rm -rf {} \;
+
+tar cjf eclipse-source.tar.bz R4_platform-aggregator
diff --git a/lucene-3.6-compile.patch b/lucene-3.6-compile.patch
deleted file mode 100644
index d4fe21c..0000000
--- a/lucene-3.6-compile.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- build/eclipse-4.2.0-I20120608-1400-src/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/WordTokenStream.java.sav 2012-06-27 16:52:22.000000000 +0300
-+++ build/eclipse-4.2.0-I20120608-1400-src/plugins/org.eclipse.help.base/src/org/eclipse/help/internal/search/WordTokenStream.java 2012-07-05 12:45:58.051494535 +0300
-@@ -95,4 +95,8 @@ public final class WordTokenStream exten
- return tokens.get(token++);
-
- }
-+
-+ public boolean incrementToken() {
-+ return false;
-+ }
- }
diff --git a/macros.eclipse b/macros.eclipse
deleted file mode 100644
index 038b033..0000000
--- a/macros.eclipse
+++ /dev/null
@@ -1,7 +0,0 @@
-# RPM macros for eclipse packages.
-#
-
-# There is no guarantee that %%{_libdir} will resolve properly on
-# noarch so we use this macro.
-%_eclipse_bits %(rpm --eval %{__isa_bits} | sed 's/32//')
-%_eclipse_base %{_prefix}/lib%{_eclipse_bits}/eclipse