Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhstaudacher2013-05-31 09:39:51 -0400
committerhstaudacher2013-05-31 09:39:51 -0400
commit26f94cd6bb6549f083811de6301b1f660800cc3e (patch)
tree79a884e121fbdffc0e1e67be047d570499af00b8
parent1662c9ccc2d927d02c587377ebca5180d429ff59 (diff)
downloadorg.eclipse.libra-kepler.tar.gz
org.eclipse.libra-kepler.tar.xz
org.eclipse.libra-kepler.zip
Fixes Bug 398780 - Remove dependency to servletbridge.extensionbundlev0.3.0kepler
-rw-r--r--plugins/org.eclipse.libra.warproducts.core/src/org/eclipse/libra/warproducts/core/WARProductExportOperation.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/plugins/org.eclipse.libra.warproducts.core/src/org/eclipse/libra/warproducts/core/WARProductExportOperation.java b/plugins/org.eclipse.libra.warproducts.core/src/org/eclipse/libra/warproducts/core/WARProductExportOperation.java
index 26d5557..d168014 100644
--- a/plugins/org.eclipse.libra.warproducts.core/src/org/eclipse/libra/warproducts/core/WARProductExportOperation.java
+++ b/plugins/org.eclipse.libra.warproducts.core/src/org/eclipse/libra/warproducts/core/WARProductExportOperation.java
@@ -417,4 +417,39 @@ public class WARProductExportOperation extends FeatureExportOperation {
plugin.setAttribute( "unpack", unpack ); //$NON-NLS-1$
}
+ protected String getAssemblyScriptName( String featureID,
+ String os,
+ String ws,
+ String arch,
+ String featureLocation )
+ {
+ String configIni = featureLocation + IPath.SEPARATOR + "productRootFiles" + IPath.SEPARATOR +
+ os + "." + ws + "." + arch + IPath.SEPARATOR + "configuration" + IPath.SEPARATOR + "config.ini";
+ addExtensionbundleToConfigIni( configIni );
+ return super.getAssemblyScriptName( featureID, os, ws, arch, featureLocation );
+ }
+
+ private void addExtensionbundleToConfigIni( String configIni ) {
+ try {
+ File file = new File( configIni );
+ if( file.exists() ) {
+ BufferedReader reader = new BufferedReader(new FileReader(file));
+ String line = "";
+ String oldtext = "";
+ while( ( line = reader.readLine() ) != null ) {
+ oldtext += line + "\n";
+ }
+ reader.close();
+ String newtext = oldtext.replaceAll( "org.eclipse.equinox.http.servlet@start",
+ "org.eclipse.equinox.servletbridge.extensionbundle,\\\\\n " +
+ "org.eclipse.equinox.http.servlet@start");
+ FileWriter writer = new FileWriter( configIni );
+ writer.write(newtext);
+ writer.close();
+ }
+ } catch( IOException e ) {
+ throw new IllegalStateException( e );
+ }
+ }
+
}

Back to the top