Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBorislav Kapukaranov2011-06-03 13:11:31 -0400
committerBorislav Kapukaranov2011-06-03 13:11:31 -0400
commitd2841e4f98d4443687d83e59a5848ace5802e7f6 (patch)
tree53fc73cd0d4d739117ed829beb3b6cd376fccba4
parente8e3d5acd610a9e12609e41a3a59b721616bf18b (diff)
downloadorg.eclipse.virgo.kernel-d2841e4f98d4443687d83e59a5848ace5802e7f6.tar.gz
org.eclipse.virgo.kernel-d2841e4f98d4443687d83e59a5848ace5802e7f6.tar.xz
org.eclipse.virgo.kernel-d2841e4f98d4443687d83e59a5848ace5802e7f6.zip
bug343542 - Initial Provisioning scenario of Virgo: initial
contribution
-rw-r--r--[-rwxr-xr-x]build-kernel/bin/dmk.bat549
-rw-r--r--build-kernel/bin/setupClasspath.bat11
-rw-r--r--build-kernel/build.xml544
-rw-r--r--build-kernel/config/org.eclipse.virgo.kernel.userregion.properties4
-rw-r--r--build-kernel/kernel-ivy.xml2
-rw-r--r--build-kernel/lib-ivy.xml3
-rw-r--r--build-kernel/lib/org.eclipse.virgo.kernel.launch.properties162
-rw-r--r--build-kernel/org.eclipse.virgo.kernel.lib.kernel.product101
-rw-r--r--build-kernel/org.eclipse.virgo.kernel.lib.product96
-rw-r--r--build-kernel/org.eclipse.virgo.kernel.product97
-rw-r--r--build-kernel/org.eclipse.virgo.kernel.repository.ext.product48
-rw-r--r--build-kernel/p2.inf13
-rw-r--r--build-kernel/p2_resources/config.ini6
-rw-r--r--build-kernel/p2build-ivy.xml17
-rw-r--r--build-kernel/p2runtime-ivy.xml60
-rw-r--r--build-kernel/user-ivy.xml18
-rw-r--r--build.versions38
-rw-r--r--org.eclipse.virgo.kernel.build.p2/.classpath21
-rw-r--r--org.eclipse.virgo.kernel.build.p2/.project33
-rw-r--r--org.eclipse.virgo.kernel.build.p2/META-INF/MANIFEST.MF21
-rw-r--r--org.eclipse.virgo.kernel.build.p2/bin/org/eclipse/virgo/kernel/p2/build/VirgoBuildP2RepoPublisher.classbin0 -> 13639 bytes
-rw-r--r--org.eclipse.virgo.kernel.build.p2/build.xml9
-rw-r--r--org.eclipse.virgo.kernel.build.p2/findbugs-exclude.xml8
-rw-r--r--org.eclipse.virgo.kernel.build.p2/ivy.xml39
-rw-r--r--org.eclipse.virgo.kernel.build.p2/src/main/java/org/eclipse/virgo/kernel/p2/build/Main.java66
-rw-r--r--org.eclipse.virgo.kernel.build.p2/src/main/java/org/eclipse/virgo/kernel/p2/build/ProductFileBuilder.java164
-rw-r--r--org.eclipse.virgo.kernel.build.p2/src/main/java/org/eclipse/virgo/kernel/p2/build/VirgoBuildP2RepoPublisher.java251
-rw-r--r--org.eclipse.virgo.kernel.build.p2/src/main/resources/OSGI-INF/kernel.build.p2.xml14
-rw-r--r--org.eclipse.virgo.kernel.build.p2/template.mf23
-rw-r--r--org.eclipse.virgo.kernel.deployer.p2/.classpath20
-rw-r--r--org.eclipse.virgo.kernel.deployer.p2/.project33
-rw-r--r--org.eclipse.virgo.kernel.deployer.p2/build.xml9
-rw-r--r--org.eclipse.virgo.kernel.deployer.p2/findbugs-exclude.xml8
-rw-r--r--org.eclipse.virgo.kernel.deployer.p2/ivy.xml39
-rw-r--r--org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/VirgoPublisher.java22
-rw-r--r--org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/publish/LocalFSVirgoPublisher.java164
-rw-r--r--org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/publish/actions/VirgoBundlesAction.java358
-rw-r--r--org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/publish/actions/ZippedResourcesPublisherAction.java118
-rw-r--r--org.eclipse.virgo.kernel.deployer.p2/src/main/resources/OSGI-INF/org.eclipse.virgo.kernel.deployer.p2.publisher.xml13
-rw-r--r--org.eclipse.virgo.kernel.deployer.p2/template.mf26
-rw-r--r--org.eclipse.virgo.kernel.deployer/.classpath125
-rw-r--r--org.eclipse.virgo.kernel.deployer/.project79
-rw-r--r--org.eclipse.virgo.kernel.deployer/ivy.xml133
-rw-r--r--org.eclipse.virgo.kernel.deployer/template.mf64
-rw-r--r--org.eclipse.virgo.kernel.userregionfactory/.classpath54
-rw-r--r--org.eclipse.virgo.kernel.userregionfactory/.project75
-rw-r--r--org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java12
-rw-r--r--org.eclipse.virgo.kernel.userregionfactory/src/main/resources/OSGI-INF/userregionfactory.xml25
-rw-r--r--org.eclipse.virgo.kernel.userregionfactory/template.mf5
49 files changed, 2582 insertions, 1218 deletions
diff --git a/build-kernel/bin/dmk.bat b/build-kernel/bin/dmk.bat
index eabefdd8..4eeaefb2 100755..100644
--- a/build-kernel/bin/dmk.bat
+++ b/build-kernel/bin/dmk.bat
@@ -1,273 +1,276 @@
-@echo off
-rem Script for starting and stopping the kernel
-
-if "%OS%" == "Windows_NT" setlocal
-
-rem Derive full path for script (includes trailing backslash)
- set SCRIPT_DIR=%~dp0
-
-if exist "%SCRIPT_DIR%setupVars.bat" (
- call "%SCRIPT_DIR%setupVars.bat"
- if not "%ERRORLEVEL%"=="0" (
- if "%OS%" == "Windows_NT" endlocal
- exit /B %ERRORLEVEL%
- )
-) else (
- echo Cannot set up environment. "setupVars.bat" file missing.
- if "%OS%" == "Windows_NT" endlocal
- exit /B 1
-)
-
-rem Select command we are to run
-
- rem First parm is command
- set COMMAND=%~1
- rem Rest are parameters - shift done in subroutines
-
- rem Switch on COMMAND in {"start","stop"}
-
- if "%COMMAND%" == "start" (
- call :doStartCommand %*
- if "%OS%" == "Windows_NT" endlocal
- exit /B 0
- )
-
- if "%COMMAND%" == "stop" (
- call :doStopCommand %*
- if "%OS%" == "Windows_NT" endlocal
- exit /B 0
- )
-
- echo Unknown command: %COMMAND%
- if "%OS%" == "Windows_NT" endlocal
- exit /B 1
-
-rem ------------------ Subroutines
-rem ------------------------------
-:doStartCommand
-
- shift
- rem The shift must be here :()
-
- rem Check further file that needs to exist
- for %%I in ("%KERNEL_HOME%\bin\jmxPermissions.vbs") do if not exist "%%~I" (
- echo File "%%~I" does not exist but is required to continue.
- exit /B 1
- )
-
- rem Set defaults
- set CONFIG_DIR=%KERNEL_HOME%\config
- set CLEAN_FLAG=
- set NO_START_FLAG=
- set DEBUG_FLAG=
- set DEBUG_PORT=8000
- set SUSPEND=n
- if not defined JMX_PORT set JMX_PORT=9875
- if not defined KEYSTORE_PASSWORD set KEYSTORE_PASSWORD=changeit
- set ADDITIONAL_ARGS=
-
- rem Loop through options
-
- :startOptionLoop
- if "%~1"=="" goto endStartOptionLoop
- if "%~1"=="-debug" goto debug
- if "%~1"=="-clean" goto clean
- if "%~1"=="-configDir" goto configDir
- if "%~1"=="-jmxport" goto jmxport
- if "%~1"=="-keystore" goto keystore
- if "%~1"=="-keystorePassword" goto keystorePassword
- if "%~1"=="-noStart" goto noStart
- if "%~1"=="-suspend" goto suspend
- if "%~1"=="-shell" goto shell
-
- set ADDITIONAL_ARGS=%ADDITIONAL_ARGS% "%~1"
-
- :continueStartOptionLoop
- shift
- goto startOptionLoop
-
- :debug
- set DEBUG_FLAG=1
- set PORT_CANDIDATE=%~2
- if not "%PORT_CANDIDATE:~0,1%"=="-" (
- set DEBUG_PORT=%PORT_CANDIDATE%
- shift
- )
- goto continueStartOptionLoop
- :clean
- set CLEAN_FLAG=1
- goto continueStartOptionLoop
- :configDir
- set CONFIG_DIR=%~2
- rem unless absolute, treat as relative to kernel home
- if "%CONFIG_DIR:~1%"=="\" goto absoluteConfigDir
- if "%CONFIG_DIR:~1,2%"==":\" goto absoluteConfigDir
- set CONFIG_DIR=%KERNEL_HOME%\%CONFIG_DIR%
- :absoluteConfigDir
- shift
- goto continueStartOptionLoop
- :jmxport
- set JMX_PORT=%~2
- shift
- goto continueStartOptionLoop
- :keystore
- set KEYSTORE_PATH=%~2
- shift
- goto continueStartOptionLoop
- :keystorePassword
- set KEYSTORE_PASSWORD=%~2
- shift
- goto continueStartOptionLoop
- :noStart
- set NO_START_FLAG=1
- goto continueStartOptionLoop
- :suspend
- set SUSPEND=y
- goto continueStartOptionLoop
- :shell
- set SHELL_FLAG=1
- goto continueStartOptionLoop
-
- :endStartOptionLoop
-
-
- rem Adjust permissions if necessary
- cscript //NoLogo "%KERNEL_HOME%\bin\jmxPermissions.vbs" "%CONFIG_DIR%\"
-
- rem Adjust options now all are known
- if "%KEYSTORE_PATH%"=="" set KEYSTORE_PATH=%CONFIG_DIR%\keystore
- if not "%DEBUG_FLAG%"=="" set DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=%SUSPEND%
-
- rem do Clean work:
- if not "%CLEAN_FLAG%"=="" (
- rmdir /Q /S "%KERNEL_HOME%\serviceability"
- rmdir /Q /S "%KERNEL_HOME%\work"
- set LAUNCH_OPTS=%LAUNCH_OPTS% -Fosgi.clean=true
- )
-
- rem do Shell work:
- if not "%SHELL_FLAG%"=="" (
- echo "Warning: Kernel shell not supported; -shell option ignored."
- rem set LAUNCH_OPTS=%LAUNCH_OPTS% -Forg.eclipse.virgo.kernel.shell.local=true
- )
-
- rem Set JMX options
- set JMX_OPTS=%JMX_OPTS% -Dcom.sun.management.jmxremote.port=%JMX_PORT%
- set JMX_OPTS=%JMX_OPTS% -Dcom.sun.management.jmxremote.authenticate=true
- set JMX_OPTS=%JMX_OPTS% -Dcom.sun.management.jmxremote.login.config=virgo-kernel
- set JMX_OPTS=%JMX_OPTS% -Dcom.sun.management.jmxremote.access.file="%CONFIG_DIR%\org.eclipse.virgo.kernel.jmxremote.access.properties"
- set JMX_OPTS=%JMX_OPTS% -Djavax.net.ssl.keyStore="%KEYSTORE_PATH%"
- set JMX_OPTS=%JMX_OPTS% -Djavax.net.ssl.keyStorePassword=%KEYSTORE_PASSWORD%
- set JMX_OPTS=%JMX_OPTS% -Dcom.sun.management.jmxremote.ssl=true
- set JMX_OPTS=%JMX_OPTS% -Dcom.sun.management.jmxremote.ssl.need.client.auth=false
-
- if not "%NO_START_FLAG%"=="" goto :eof
- rem ensure that the tmp directory exists:
- set TMP_DIR="%KERNEL_HOME%\work\tmp"
- if not exist "%TMP_DIR%" mkdir "%TMP_DIR%"
-
- rem Run the server
-
- rem Marshall parameters
- set KERNEL_JAVA_PARMS=%JAVA_OPTS% %DEBUG_OPTS% %JMX_OPTS%
-
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -XX:+HeapDumpOnOutOfMemoryError
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -XX:ErrorFile="%KERNEL_HOME%\serviceability\error.log"
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -XX:HeapDumpPath="%KERNEL_HOME%\serviceability\heap_dump.hprof"
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Djava.security.auth.login.config="%CONFIG_DIR%\org.eclipse.virgo.kernel.authentication.config"
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Dorg.eclipse.virgo.kernel.authentication.file="%CONFIG_DIR%\org.eclipse.virgo.kernel.users.properties"
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Djava.io.tmpdir="%TMP_DIR%"
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Dorg.eclipse.virgo.kernel.home="%KERNEL_HOME%"
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -classpath "%CLASSPATH%"
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% org.eclipse.virgo.osgi.launcher.Launcher
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -config "%KERNEL_HOME%\lib\org.eclipse.virgo.kernel.launch.properties"
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Forg.eclipse.virgo.kernel.home="%KERNEL_HOME%"
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Forg.eclipse.virgo.kernel.config="%CONFIG_DIR%"
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Fosgi.configuration.area="%KERNEL_HOME%\work\osgi\configuration"
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Fosgi.java.profile="file:%KERNEL_HOME%\lib\java6-server.profile"
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% %LAUNCH_OPTS%
- set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% %ADDITIONAL_ARGS%
-
- rem Now run it
- PUSHD %KERNEL_HOME%
- "%JAVA_HOME%\bin\java" %KERNEL_JAVA_PARMS%
- POPD
-
-goto :eof
-
-rem ------------------------------
-:doStopCommand
-
- shift
- rem The shift must be here :()
-
- rem Set defaults
- set CONFIG_DIR=%KERNEL_HOME%\config
- if not defined TRUSTSTORE_PATH set TRUSTSTORE_PATH=%KERNEL_HOME%\config\keystore
- if not defined TRUSTSTORE_PASSWORD set TRUSTSTORE_PASSWORD=changeit
- if not defined JMX_PORT set JMX_PORT=9875
- set OTHER_ARGS=
-
- rem Loop through options
- :stopOptionLoop
-
- if "%~1"=="" goto endStopOptionLoop
- if "%~1"=="-truststore" goto truststoreStop
- if "%~1"=="-truststorePassword" goto truststorePasswordStop
- if "%~1"=="-configDir" goto configDirStop
- if "%~1"=="-jmxport" goto jmxportStop
-
- set OTHER_ARGS=%OTHER_ARGS% "%~1"
-
- :continueStopOptionLoop
- shift
- goto stopOptionLoop
-
- :truststoreStop
- set TRUSTSTORE_PATH=%~2
- shift
- goto continueStopOptionLoop
-
- :truststorePasswordStop
- set TRUSTSTORE_PASSWORD=%~2
- shift
- goto continueStopOptionLoop
-
- :configDirStop
- set CONFIG_DIR=%~2
- rem unless absolute, treat as relative to kernel home
- if "%CONFIG_DIR:~1%"=="\" goto absoluteConfigDirStop
- if "%CONFIG_DIR:~1,2%"==":\" goto absoluteConfigDirStop
- set CONFIG_DIR=%KERNEL_HOME%\%CONFIG_DIR%
- :absoluteConfigDirStop
- shift
- goto continueStopOptionLoop
-
- :jmxportStop
- set JMX_PORT=%~2
- shift
- goto continueStopOptionLoop
-
- :endStopOptionLoop
-
- rem Call shutdown client
-
- rem Extend JMX options
- set JMX_OPTS=%JMX_OPTS% -Djavax.net.ssl.trustStore="%TRUSTSTORE_PATH%"
- set JMX_OPTS=%JMX_OPTS% -Djavax.net.ssl.trustStorePassword=%TRUSTSTORE_PASSWORD%
- set OTHER_ARGS=%OTHER_ARGS% -jmxport %JMX_PORT%
-
- rem Marshall parameters
- set SHUTDOWN_PARMS= %JAVA_OPTS% %JMX_OPTS%
- set SHUTDOWN_PARMS=%SHUTDOWN_PARMS% -classpath "%CLASSPATH%"
- set SHUTDOWN_PARMS=%SHUTDOWN_PARMS% -Dorg.eclipse.virgo.kernel.home="%KERNEL_HOME%"
- set SHUTDOWN_PARMS=%SHUTDOWN_PARMS% -Dorg.eclipse.virgo.kernel.authentication.file="%CONFIG_DIR%\org.eclipse.virgo.kernel.users.properties"
- set SHUTDOWN_PARMS=%SHUTDOWN_PARMS% org.eclipse.virgo.kernel.shutdown.ShutdownClient
- set SHUTDOWN_PARMS=%SHUTDOWN_PARMS% %OTHER_ARGS%
-
- rem Run Java program
- PUSHD %KERNEL_HOME%
- "%JAVA_HOME%\bin\java" %SHUTDOWN_PARMS%
- POPD
-
-goto :eof
+@echo off
+rem Script for starting and stopping the kernel
+
+if "%OS%" == "Windows_NT" setlocal
+
+rem Derive full path for script (includes trailing backslash)
+ set SCRIPT_DIR=%~dp0
+
+if exist "%SCRIPT_DIR%setupVars.bat" (
+ call "%SCRIPT_DIR%setupVars.bat"
+ if not "%ERRORLEVEL%"=="0" (
+ if "%OS%" == "Windows_NT" endlocal
+ exit /B %ERRORLEVEL%
+ )
+) else (
+ echo Cannot set up environment. "setupVars.bat" file missing.
+ if "%OS%" == "Windows_NT" endlocal
+ exit /B 1
+)
+
+rem Select command we are to run
+
+ rem First parm is command
+ set COMMAND=%~1
+ rem Rest are parameters - shift done in subroutines
+
+ rem Switch on COMMAND in {"start","stop"}
+
+ if "%COMMAND%" == "start" (
+ call :doStartCommand %*
+ if "%OS%" == "Windows_NT" endlocal
+ exit /B 0
+ )
+
+ if "%COMMAND%" == "stop" (
+ call :doStopCommand %*
+ if "%OS%" == "Windows_NT" endlocal
+ exit /B 0
+ )
+
+ echo Unknown command: %COMMAND%
+ if "%OS%" == "Windows_NT" endlocal
+ exit /B 1
+
+rem ------------------ Subroutines
+rem ------------------------------
+:doStartCommand
+
+ shift
+ rem The shift must be here :()
+
+ rem Check further file that needs to exist
+ for %%I in ("%KERNEL_HOME%\bin\jmxPermissions.vbs") do if not exist "%%~I" (
+ echo File "%%~I" does not exist but is required to continue.
+ exit /B 1
+ )
+
+ rem Set defaults
+ set CONFIG_DIR=%KERNEL_HOME%\config
+ set CLEAN_FLAG=
+ set NO_START_FLAG=
+ set DEBUG_FLAG=
+ set DEBUG_PORT=8000
+ set SUSPEND=n
+ if not defined JMX_PORT set JMX_PORT=9875
+ if not defined KEYSTORE_PASSWORD set KEYSTORE_PASSWORD=changeit
+ set ADDITIONAL_ARGS=
+
+ rem Loop through options
+
+ :startOptionLoop
+ if "%~1"=="" goto endStartOptionLoop
+ if "%~1"=="-debug" goto debug
+ if "%~1"=="-clean" goto clean
+ if "%~1"=="-configDir" goto configDir
+ if "%~1"=="-jmxport" goto jmxport
+ if "%~1"=="-keystore" goto keystore
+ if "%~1"=="-keystorePassword" goto keystorePassword
+ if "%~1"=="-noStart" goto noStart
+ if "%~1"=="-suspend" goto suspend
+ if "%~1"=="-shell" goto shell
+
+ set ADDITIONAL_ARGS=%ADDITIONAL_ARGS% "%~1"
+
+ :continueStartOptionLoop
+ shift
+ goto startOptionLoop
+
+ :debug
+ set DEBUG_FLAG=1
+ set PORT_CANDIDATE=%~2
+ if not "%PORT_CANDIDATE:~0,1%"=="-" (
+ set DEBUG_PORT=%PORT_CANDIDATE%
+ shift
+ )
+ goto continueStartOptionLoop
+ :clean
+ set CLEAN_FLAG=1
+ goto continueStartOptionLoop
+ :configDir
+ set CONFIG_DIR=%~2
+ rem unless absolute, treat as relative to kernel home
+ if "%CONFIG_DIR:~1%"=="\" goto absoluteConfigDir
+ if "%CONFIG_DIR:~1,2%"==":\" goto absoluteConfigDir
+ set CONFIG_DIR=%KERNEL_HOME%\%CONFIG_DIR%
+ :absoluteConfigDir
+ shift
+ goto continueStartOptionLoop
+ :jmxport
+ set JMX_PORT=%~2
+ shift
+ goto continueStartOptionLoop
+ :keystore
+ set KEYSTORE_PATH=%~2
+ shift
+ goto continueStartOptionLoop
+ :keystorePassword
+ set KEYSTORE_PASSWORD=%~2
+ shift
+ goto continueStartOptionLoop
+ :noStart
+ set NO_START_FLAG=1
+ goto continueStartOptionLoop
+ :suspend
+ set SUSPEND=y
+ goto continueStartOptionLoop
+ :shell
+ set SHELL_FLAG=1
+ goto continueStartOptionLoop
+
+ :endStartOptionLoop
+
+
+ rem Adjust permissions if necessary
+ cscript //NoLogo "%KERNEL_HOME%\bin\jmxPermissions.vbs" "%CONFIG_DIR%\"
+
+ rem Adjust options now all are known
+ if "%KEYSTORE_PATH%"=="" set KEYSTORE_PATH=%CONFIG_DIR%\keystore
+ if not "%DEBUG_FLAG%"=="" set DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=%SUSPEND%
+
+ rem do Clean work:
+ if not "%CLEAN_FLAG%"=="" (
+ rmdir /Q /S "%KERNEL_HOME%\serviceability"
+ rmdir /Q /S "%KERNEL_HOME%\work"
+ set LAUNCH_OPTS=%LAUNCH_OPTS% -Fosgi.clean=true
+ )
+
+ rem do Shell work:
+ if not "%SHELL_FLAG%"=="" (
+ echo "Warning: Kernel shell not supported; -shell option ignored."
+ rem set LAUNCH_OPTS=%LAUNCH_OPTS% -Forg.eclipse.virgo.kernel.shell.local=true
+ )
+
+ rem Set JMX options
+ set JMX_OPTS=%JMX_OPTS% -Dcom.sun.management.jmxremote.port=%JMX_PORT%
+ set JMX_OPTS=%JMX_OPTS% -Dcom.sun.management.jmxremote.authenticate=true
+ set JMX_OPTS=%JMX_OPTS% -Dcom.sun.management.jmxremote.login.config=virgo-kernel
+ set JMX_OPTS=%JMX_OPTS% -Dcom.sun.management.jmxremote.access.file="%CONFIG_DIR%\org.eclipse.virgo.kernel.jmxremote.access.properties"
+ set JMX_OPTS=%JMX_OPTS% -Djavax.net.ssl.keyStore="%KEYSTORE_PATH%"
+ set JMX_OPTS=%JMX_OPTS% -Djavax.net.ssl.keyStorePassword=%KEYSTORE_PASSWORD%
+ set JMX_OPTS=%JMX_OPTS% -Dcom.sun.management.jmxremote.ssl=true
+ set JMX_OPTS=%JMX_OPTS% -Dcom.sun.management.jmxremote.ssl.need.client.auth=false
+
+ if not "%NO_START_FLAG%"=="" goto :eof
+ rem ensure that the tmp directory exists:
+ set TMP_DIR="%KERNEL_HOME%\work\tmp"
+ if not exist "%TMP_DIR%" mkdir "%TMP_DIR%"
+
+ rem Run the server
+
+ rem Marshall parameters
+ set KERNEL_JAVA_PARMS=%JAVA_OPTS% %DEBUG_OPTS% %JMX_OPTS%
+
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -XX:+HeapDumpOnOutOfMemoryError
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -XX:ErrorFile="%KERNEL_HOME%\serviceability\error.log"
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -XX:HeapDumpPath="%KERNEL_HOME%\serviceability\heap_dump.hprof"
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Djava.security.auth.login.config="%CONFIG_DIR%\org.eclipse.virgo.kernel.authentication.config"
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Dorg.eclipse.virgo.kernel.authentication.file="%CONFIG_DIR%\org.eclipse.virgo.kernel.users.properties"
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Djava.io.tmpdir="%TMP_DIR%"
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Dorg.eclipse.virgo.kernel.home="%KERNEL_HOME%"
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Declipse.ignoreApp=true
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Dorg.eclipse.virgo.kernel.config="%CONFIG_DIR%"
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Dosgi.configuration.area="%KERNEL_HOME%\work\osgi\configuration"
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Dosgi.instance.area="%KERNEL_HOME%\work"
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Dosgi.install.area="%KERNEL_HOME%\lib\kernel"
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Dosgi.frameworkClassPath="%FWCLASSPATH%"
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -Dosgi.java.profile="file:%KERNEL_HOME%\lib\java6-server.profile"
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -classpath "%CLASSPATH%"
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% org.eclipse.equinox.launcher.Main
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% -noExit
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% %LAUNCH_OPTS%
+ set KERNEL_JAVA_PARMS=%KERNEL_JAVA_PARMS% %ADDITIONAL_ARGS%
+
+ rem Now run it
+ PUSHD %KERNEL_HOME%
+ "%JAVA_HOME%\bin\java" %KERNEL_JAVA_PARMS%
+ POPD
+
+goto :eof
+
+rem ------------------------------
+:doStopCommand
+
+ shift
+ rem The shift must be here :()
+
+ rem Set defaults
+ set CONFIG_DIR=%KERNEL_HOME%\config
+ if not defined TRUSTSTORE_PATH set TRUSTSTORE_PATH=%KERNEL_HOME%\config\keystore
+ if not defined TRUSTSTORE_PASSWORD set TRUSTSTORE_PASSWORD=changeit
+ if not defined JMX_PORT set JMX_PORT=9875
+ set OTHER_ARGS=
+
+ rem Loop through options
+ :stopOptionLoop
+
+ if "%~1"=="" goto endStopOptionLoop
+ if "%~1"=="-truststore" goto truststoreStop
+ if "%~1"=="-truststorePassword" goto truststorePasswordStop
+ if "%~1"=="-configDir" goto configDirStop
+ if "%~1"=="-jmxport" goto jmxportStop
+
+ set OTHER_ARGS=%OTHER_ARGS% "%~1"
+
+ :continueStopOptionLoop
+ shift
+ goto stopOptionLoop
+
+ :truststoreStop
+ set TRUSTSTORE_PATH=%~2
+ shift
+ goto continueStopOptionLoop
+
+ :truststorePasswordStop
+ set TRUSTSTORE_PASSWORD=%~2
+ shift
+ goto continueStopOptionLoop
+
+ :configDirStop
+ set CONFIG_DIR=%~2
+ rem unless absolute, treat as relative to kernel home
+ if "%CONFIG_DIR:~1%"=="\" goto absoluteConfigDirStop
+ if "%CONFIG_DIR:~1,2%"==":\" goto absoluteConfigDirStop
+ set CONFIG_DIR=%KERNEL_HOME%\%CONFIG_DIR%
+ :absoluteConfigDirStop
+ shift
+ goto continueStopOptionLoop
+
+ :jmxportStop
+ set JMX_PORT=%~2
+ shift
+ goto continueStopOptionLoop
+
+ :endStopOptionLoop
+
+ rem Call shutdown client
+
+ rem Extend JMX options
+ set JMX_OPTS=%JMX_OPTS% -Djavax.net.ssl.trustStore="%TRUSTSTORE_PATH%"
+ set JMX_OPTS=%JMX_OPTS% -Djavax.net.ssl.trustStorePassword=%TRUSTSTORE_PASSWORD%
+ set OTHER_ARGS=%OTHER_ARGS% -jmxport %JMX_PORT%
+
+ rem Marshall parameters
+ set SHUTDOWN_PARMS= %JAVA_OPTS% %JMX_OPTS%
+ set SHUTDOWN_PARMS=%SHUTDOWN_PARMS% -classpath "%CLASSPATH%"
+ set SHUTDOWN_PARMS=%SHUTDOWN_PARMS% -Dorg.eclipse.virgo.kernel.home="%KERNEL_HOME%"
+ set SHUTDOWN_PARMS=%SHUTDOWN_PARMS% -Dorg.eclipse.virgo.kernel.authentication.file="%CONFIG_DIR%\org.eclipse.virgo.kernel.users.properties"
+ set SHUTDOWN_PARMS=%SHUTDOWN_PARMS% org.eclipse.virgo.kernel.shutdown.ShutdownClient
+ set SHUTDOWN_PARMS=%SHUTDOWN_PARMS% %OTHER_ARGS%
+
+ rem Run Java program
+ PUSHD %KERNEL_HOME%
+ "%JAVA_HOME%\bin\java" %SHUTDOWN_PARMS%
+ POPD
+
+goto :eof
diff --git a/build-kernel/bin/setupClasspath.bat b/build-kernel/bin/setupClasspath.bat
index da833b91..35df5147 100644
--- a/build-kernel/bin/setupClasspath.bat
+++ b/build-kernel/bin/setupClasspath.bat
@@ -11,17 +11,24 @@ if "%KERNEL_HOME%" == "" (
rem Construct the CLASSPATH list from the Kernel lib directory.
for %%G in ("%KERNEL_HOME%\lib\*.jar") do call :AppendToClasspath "%%G"
-
+for %%G in ("%KERNEL_HOME%\lib\kernel\plugins\org.eclipse.osgi_*.jar") do call :AppendToClasspath "%%G"
rem Check if there are JAR files in the lib directory.
if "%CLASSPATH%" == "" (
echo No JAR files found in %KERNEL_HOME%\lib
exit /B 1
)
-rem Remove leading semi-colon if present
+if "%FWCLASSPATH%" == "" (
+ echo No JAR files found in %KERNEL_HOME%\lib
+ exit /B 1
+)
+
+rem Remove leading semi-colon or coma if present
if "%CLASSPATH:~0,1%"==";" set CLASSPATH=%CLASSPATH:~1%
+if "%FWCLASSPATH:~0,1%"=="," set FWCLASSPATH=%FWCLASSPATH:~1%
exit /B 0
:AppendToClasspath
set CLASSPATH=%CLASSPATH%;%~1
+ set FWCLASSPATH=%FWCLASSPATH%,file:///%~1
goto :eof
diff --git a/build-kernel/build.xml b/build-kernel/build.xml
index f1e14ad4..8590509f 100644
--- a/build-kernel/build.xml
+++ b/build-kernel/build.xml
@@ -1,259 +1,285 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="build-kernel" xmlns:ivy="antlib:org.apache.ivy.ant">
-
- <path id="unit.test.bundles">
- <pathelement location="../org.eclipse.virgo.kernel.shutdown"/>
- <pathelement location="../org.eclipse.virgo.kernel.authentication"/>
- <pathelement location="../org.eclipse.virgo.kernel.core"/>
- <pathelement location="../org.eclipse.virgo.kernel.artifact"/>
- <pathelement location="../org.eclipse.virgo.kernel.services"/>
- <pathelement location="../org.eclipse.virgo.kernel.osgi"/>
- <pathelement location="../org.eclipse.virgo.kernel.deployer"/>
- <pathelement location="../org.eclipse.virgo.kernel.userregionfactory"/>
- <pathelement location="../org.eclipse.virgo.kernel.userregion"/>
- <pathelement location="../org.eclipse.virgo.kernel.agent.dm"/>
- <pathelement location="../org.eclipse.virgo.kernel.kerneldmfragment"/>
- <pathelement location="../org.eclipse.virgo.kernel.dmfragment"/>
- <pathelement location="../org.eclipse.virgo.kernel.deployer.dm"/>
- <pathelement location="../org.eclipse.virgo.kernel.model"/>
- <pathelement location="../org.eclipse.virgo.kernel.shell"/>
- <pathelement location="../org.eclipse.virgo.kernel.osgicommand"/>
- <pathelement location="../org.eclipse.virgo.kernel.stubs"/>
- </path>
-
- <path id="bundles">
- <path refid="unit.test.bundles" />
- <pathelement location="../org.eclipse.virgo.kernel"/>
- <pathelement location="../org.eclipse.virgo.kernel.test"/>
- <pathelement location="../org.eclipse.virgo.kernel.deployer.testbundle"/>
- <pathelement location="../org.eclipse.virgo.kernel.deployer.test"/>
- </path>
-
- <property file="${basedir}/../build.properties"/>
- <property file="${basedir}/../build.versions"/>
- <import file="${basedir}/../virgo-build/multi-bundle/default.xml"/>
-
- <!--P2 publishing properties-->
- <property name="publishing.dir" value="${basedir}/target/repository"/>
- <property name="distro.res" value="${basedir}/distro_resources"/>
- <property name="p2.repo.url" value="file:///${publishing.dir}"/>
- <property name="product.file" value="${basedir}/org.eclipse.virgo.kernel.product"/>
- <property name="lib.product.file" value="${basedir}/org.eclipse.virgo.kernel.lib.product"/>
- <property name="lib.kernel.product.file" value="${basedir}/org.eclipse.virgo.kernel.lib.kernel.product"/>
- <property name="repository.ext.product.file" value="${basedir}/org.eclipse.virgo.kernel.repository.ext.product"/>
-
- <target name="precommit" depends="clean, clean-integration, test, findbugs, package, smoke-test"
- description="Performs a CI server-like build, should be run prior to performing a Git push"/>
-
- <target name="package" depends="ivy.init">
- <delete dir="${package.output.dir}" quiet="true"/>
- <mkdir dir="${package.output.dir}"/>
-
- <ivy:resolve resolveId="copy.path" file="${basedir}/lib-ivy.xml" transitive="true"/>
- <ivy:retrieve resolveId="copy.path" pattern="${package.output.dir}/lib/[artifact]-[revision].[ext]" conf="lib" type="jar"/>
-
- <ivy:resolve resolveId="copy.path" file="${basedir}/kernel-ivy.xml" transitive="true"/>
- <ivy:retrieve resolveId="copy.path" pattern="${package.output.dir}/lib/kernel/[artifact]-[revision].[ext]" conf="lib-kernel" type="jar"/>
-
- <ivy:resolve resolveId="copy.path" file="${basedir}/kernel-ivy.xml" transitive="true"/>
- <ivy:retrieve resolveId="copy.path" pattern="${package.output.dir}/repository/ext/[artifact]-[revision].[ext]" conf="repository-ext" type="jar"/>
-
- <mkdir dir="${package.output.dir}/config"/>
- <mkdir dir="${package.output.dir}/work"/>
- <mkdir dir="${package.output.dir}/pickup"/>
-
- <echo file="${package.output.dir}/lib/.version"
- message="virgo.kernel.version=${bundle.version}&#xa;"/>
-
- <copy todir="${package.output.dir}" failonerror="false">
- <fileset dir="${basedir}/resources"/>
- </copy>
-
- <copy todir="${package.output.dir}/bin" failonerror="false">
- <fileset dir="${basedir}/bin"/>
- </copy>
-
- <copy todir="${package.output.dir}/lib" failonerror="false">
- <fileset dir="${basedir}/lib"/>
- <filterset>
- <filter token="ASPECTJ.VERSION" value="${org.aspectj}"/>
- <filter token="OSGI.SERVICES.VERSION" value="${org.eclipse.osgi.services}"/>
- <filter token="EQUINOX.EVENT.VERSION" value="${org.eclipse.equinox.event}"/>
- <filter token="EQUINOX.CONFIGADMIN.VERSION" value="${org.eclipse.equinox.cm}"/>
- <filter token="EQUINOX.DS.VERSION" value="${org.eclipse.equinox.ds}"/>
- <filter token="EQUINOX.UTIL.VERSION" value="${org.eclipse.equinox.util}"/>
- <filter token="EQUINOX.REGION.VERSION" value="${org.eclipse.equinox.region}"/>
- <filter token="KERNEL.VERSION" value="${bundle.version}"/>
- <filter token="MEDIC.VERSION" value="${org.eclipse.virgo.medic}"/>
- <filter token="REPOSITORY.VERSION" value="${org.eclipse.virgo.repository}"/>
- <filter token="SLF4J.VERSION" value="${org.slf4j}"/>
- <filter token="SPRING.DM.VERSION" value="${org.springframework.osgi}"/>
- <filter token="SPRING.VERSION" value="${org.springframework}"/>
- <filter token="UTIL.VERSION" value="${org.eclipse.virgo.util}"/>
- <filter token="OSGI.EXTENSIONS.VERSION" value="${org.eclipse.virgo.osgi}"/>
- </filterset>
- </copy>
-
- <copy todir="${package.output.dir}/config" failonerror="false">
- <fileset dir="${basedir}/config" excludes="keystore"/>
- <filterset>
- <filter token="ASPECTJ.VERSION" value="${org.aspectj}"/>
- <filter token="OSGI.SERVICES.VERSION" value="${org.eclipse.osgi.services}"/>
- <filter token="EQUINOX.EVENT.VERSION" value="${org.eclipse.equinox.event}"/>
- <filter token="EQUINOX.CONFIGADMIN.VERSION" value="${org.eclipse.equinox.cm}"/>
- <filter token="EQUINOX.DS.VERSION" value="${org.eclipse.equinox.ds}"/>
- <filter token="EQUINOX.UTIL.VERSION" value="${org.eclipse.equinox.util}"/>
- <filter token="KERNEL.VERSION" value="${bundle.version}"/>
- <filter token="MEDIC.VERSION" value="${org.eclipse.virgo.medic}"/>
- <filter token="REPOSITORY.VERSION" value="${org.eclipse.virgo.repository}"/>
- <filter token="SLF4J.VERSION" value="${org.slf4j}"/>
- <filter token="SPRING.DM.VERSION" value="${org.springframework.osgi}"/>
- <filter token="SPRING.VERSION" value="${org.springframework}"/>
- <filter token="UTIL.VERSION" value="${org.eclipse.virgo.util}"/>
- </filterset>
- </copy>
-
- <copy todir="${package.output.dir}/repository/ext" failonerror="false">
- <fileset dir="${basedir}/repository/ext"/>
- </copy>
-
- <copy todir="${package.output.dir}/repository/ext" failonerror="false">
- <fileset dir="${package.output.dir}/lib/kernel">
- <include name="org.eclipse.virgo.kernel.agent.dm-*.jar"/>
- </fileset>
- </copy>
-
- <move todir="${package.output.dir}/repository/ext" failonerror="false">
- <fileset dir="${package.output.dir}/lib/kernel">
- <include name="org.eclipse.virgo.kernel.dmfragment-*.jar"/>
- <include name="org.eclipse.virgo.kernel.deployer.dm-*.jar"/>
- </fileset>
- </move>
-
- <mkdir dir="${package.output.dir}/repository/usr"/>
-
- <copy file="${basedir}/config/keystore" todir="${package.output.dir}/config" failonerror="false"/>
-
- <chmod perm="600">
- <fileset dir="${package.output.dir}/config">
- <include name="org.eclipse.virgo.kernel.jmxremote.access.properties"/>
- </fileset>
- </chmod>
-
- <chmod perm="755">
- <fileset dir="${package.output.dir}/bin">
- <include name="*.sh"/>
- </fileset>
- </chmod>
-
- <mkdir dir="${artifacts.dir}"/>
- <zip destfile="${package.output.file}">
- <zipfileset dir="${package.dir}" includes="${package.basename}/bin/*.sh" filemode="755"/>
- <zipfileset dir="${package.dir}" includes="${package.basename}/config/org.eclipse.virgo.kernel.jmxremote.access.properties" filemode="600"/>
- <zipfileset dir="${package.dir}">
- <exclude name="${package.basename}/bin/*.sh"/>
- <exclude name="${package.basename}/config/org.eclipse.virgo.kernel.jmxremote.access.properties"/>
- </zipfileset>
- </zip>
- </target>
-
- <target name="smoke-test" description="Runs a smoke test on the kernel packaged build">
- <path id="smoke.test.bundles">
- <pathelement location="${basedir}/../org.eclipse.virgo.kernel.smoketest" />
- </path>
- <antcall target="test.pre"/>
- <all-bundles target="test-package" buildpathRef="smoke.test.bundles">
- <property name="package.output.file" value="${package.output.file}"/>
- <property name="package.basename" value="${package.basename}"/>
- </all-bundles>
- <antcall target="test.post"/>
- </target>
-
- <target name="package.resources" depends="package"
- description="Creates a special bundle containing Virgo entities that are not bundles">
- <property name="meta.inf" value="${distro.res}/META-INF"/>
- <property name="content" value="${distro.res}/root_content"/>
- <property name="resources.jar" value="${package.output.dir}/lib/org.eclipse.virgo.kernel.resources.jar"/>
- <zip destfile="${resources.jar}">
- <zipfileset dir="${distro.res}"/>
- <zipfileset dir="${package.dir}/${package.basename}"
- includes="bin/*.sh" filemode="755"/>
- <zipfileset dir="${package.dir}/${package.basename}"
- includes="config/org.eclipse.virgo.kernel.jmxremote.access.properties" filemode="600"/>
- <zipfileset dir="${package.dir}/${package.basename}">
- <exclude name="bin/*.sh"/>
- <exclude name="config/org.eclipse.virgo.kernel.jmxremote.access.properties"/>
- <exclude name="**/*.jar"/>
- </zipfileset>
- </zip>
- </target>
-
- <target name="p2.publish" depends="package.resources, p2.extract-publisher"
- description="Publishes bundles, features and product">
- <java jar="${p2.launcher.jar}" fork="true" taskname="p2bundles" failonerror="true" maxmemory="256m">
- <arg line="-application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher"/>
- <arg line="-metadataRepository ${p2.repo.url}"/>
- <arg line="-artifactRepository ${p2.repo.url}"/>
- <arg line="-bundles ${package.output.dir}/lib,${package.output.dir}/repository/ext"/>
- <arg line="-publishArtifacts"/>
- <arg line="-configs all"/>
- </java>
-
- <sshexec host="build.eclipse.org"
- username="${eclipse.buildId}"
- keyfile="${key.file}"
- passphrase="${passphrase}"
- command="mkdir -pv /opt/public/rt/virgo/update-site/${release.type}/${build.stamp}"/>
-
- <scp todir="${eclipse.buildId}@build.eclipse.org:/opt/public/rt/virgo/update-site/${release.type}/${build.stamp}/"
- keyfile="${key.file}"
- passphrase="${passphrase}">
- <fileset dir="${publishing.dir}"/>
- </scp>
-
-
-
- <!-- <java jar="${p2.launcher.jar}" fork="true" taskname="p2product" failonerror="true" maxmemory="256m">
- <arg line="-application org.eclipse.equinox.p2.publisher.ProductPublisher"/>
- <arg line="-metadataRepository ${p2.repo.url}"/>
- <arg line="-artifactRepository ${p2.repo.url}"/>
- <arg line="-productFile ${product.file}"/>
- <arg line="-append"/>
- <arg line="-publishArtifacts"/>
- <arg line="-flavor tooling"/>
- <arg line="-configs all"/>
- </java>
- <java jar="${p2.launcher.jar}" fork="true" taskname="p2product" failonerror="true" maxmemory="256m">
- <arg line="-application org.eclipse.equinox.p2.publisher.ProductPublisher"/>
- <arg line="-metadataRepository ${p2.repo.url}"/>
- <arg line="-artifactRepository ${p2.repo.url}"/>
- <arg line="-productFile ${lib.product.file}"/>
- <arg line="-append"/>
- <arg line="-publishArtifacts"/>
- <arg line="-flavor tooling"/>
- <arg line="-configs all"/>
- </java>
- <java jar="${p2.launcher.jar}" fork="true" taskname="p2product" failonerror="true" maxmemory="256m">
- <arg line="-application org.eclipse.equinox.p2.publisher.ProductPublisher"/>
- <arg line="-metadataRepository ${p2.repo.url}"/>
- <arg line="-artifactRepository ${p2.repo.url}"/>
- <arg line="-productFile ${lib.kernel.product.file}"/>
- <arg line="-append"/>
- <arg line="-publishArtifacts"/>
- <arg line="-flavor tooling"/>
- <arg line="-configs all"/>
- </java>
- <java jar="${p2.launcher.jar}" fork="true" taskname="p2product" failonerror="true" maxmemory="256m">
- <arg line="-application org.eclipse.equinox.p2.publisher.ProductPublisher"/>
- <arg line="-metadataRepository ${p2.repo.url}"/>
- <arg line="-artifactRepository ${p2.repo.url}"/>
- <arg line="-productFile ${repository.ext.product.file}"/>
- <arg line="-append"/>
- <arg line="-publishArtifacts"/>
- <arg line="-flavor tooling"/>
- <arg line="-configs all"/>
- </java> -->
- <delete dir="${p2.publishing.dir}" excludes="p2agent.zip" includeemptydirs="true" quiet="true"/>
- </target>
-
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="build-kernel" xmlns:ivy="antlib:org.apache.ivy.ant">
+
+ <path id="unit.test.bundles">
+ <pathelement location="../org.eclipse.virgo.kernel.shutdown"/>
+ <pathelement location="../org.eclipse.virgo.kernel.authentication"/>
+ <pathelement location="../org.eclipse.virgo.kernel.core"/>
+ <pathelement location="../org.eclipse.virgo.kernel.artifact"/>
+ <pathelement location="../org.eclipse.virgo.kernel.services"/>
+ <pathelement location="../org.eclipse.virgo.kernel.osgi"/>
+ <pathelement location="../org.eclipse.virgo.kernel.deployer"/>
+ <pathelement location="../org.eclipse.virgo.kernel.deployer.p2"/>
+ <pathelement location="../org.eclipse.virgo.kernel.build.p2"/>
+ <pathelement location="../org.eclipse.virgo.kernel.userregionfactory"/>
+ <pathelement location="../org.eclipse.virgo.kernel.userregion"/>
+ <pathelement location="../org.eclipse.virgo.kernel.agent.dm"/>
+ <pathelement location="../org.eclipse.virgo.kernel.kerneldmfragment"/>
+ <pathelement location="../org.eclipse.virgo.kernel.dmfragment"/>
+ <pathelement location="../org.eclipse.virgo.kernel.deployer.dm"/>
+ <pathelement location="../org.eclipse.virgo.kernel.model"/>
+ <pathelement location="../org.eclipse.virgo.kernel.shell"/>
+ <pathelement location="../org.eclipse.virgo.kernel.osgicommand"/>
+ <pathelement location="../org.eclipse.virgo.kernel.stubs"/>
+ </path>
+
+ <path id="bundles">
+ <path refid="unit.test.bundles" />
+ <pathelement location="../org.eclipse.virgo.kernel"/>
+ <pathelement location="../org.eclipse.virgo.kernel.test"/>
+ <pathelement location="../org.eclipse.virgo.kernel.deployer.testbundle"/>
+ <pathelement location="../org.eclipse.virgo.kernel.deployer.test"/>
+ </path>
+
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../build.versions"/>
+ <import file="${basedir}/../virgo-build/multi-bundle/default.xml"/>
+
+ <!--P2 publishing properties-->
+ <property name="publishing.dir" value="${basedir}/target/repository"/>
+ <property name="distro.res" value="${basedir}/distro_resources"/>
+ <property name="p2.repo.url" value="file:///${publishing.dir}"/>
+ <property name="product.file" value="${basedir}/org.eclipse.virgo.kernel.product"/>
+ <property name="lib.product.file" value="${basedir}/org.eclipse.virgo.kernel.lib.product"/>
+ <property name="lib.kernel.product.file" value="${basedir}/org.eclipse.virgo.kernel.lib.kernel.product"/>
+ <property name="repository.ext.product.file" value="${basedir}/org.eclipse.virgo.kernel.repository.ext.product"/>
+
+ <target name="precommit" depends="clean, clean-integration, test, findbugs, package, smoke-test"
+ description="Performs a CI server-like build, should be run prior to performing a Git push"/>
+
+ <target name="package" depends="ivy.init">
+ <delete dir="${basedir}/p2" quiet="true"/>
+ <mkdir dir="${basedir}/p2"/>
+
+ <delete dir="${package.output.dir}" quiet="true"/>
+ <mkdir dir="${package.output.dir}"/>
+
+ <!-- Prepare the p2 build client -->
+ <ivy:resolve resolveId="copy.path" file="${basedir}/p2runtime-ivy.xml" transitive="true"/>
+ <ivy:retrieve resolveId="copy.path" pattern="${basedir}/p2/[artifact]_[revision].[ext]" conf="p2-runtime" type="jar"/>
+
+ <ivy:resolve resolveId="copy.path" file="${basedir}/p2build-ivy.xml" transitive="true"/>
+ <ivy:retrieve resolveId="copy.path" pattern="${basedir}/p2/[artifact]_[revision].[ext]" conf="p2-build" type="jar"/>
+
+ <copy todir="${basedir}/p2/configuration" failonerror="false">
+ <fileset dir="${basedir}/p2_resources" excludes="keystore"/>
+ <filterset>
+ <filter token="SIMPLE.CONFIG.VERSION" value="${org.eclipse.equinox.simpleconfigurator}"/>
+ </filterset>
+ </copy>
+ <java jar="${basedir}/p2/org.eclipse.virgo.kernel.build.p2_${bundle.version}.jar" fork="true" taskname="BundlesInfoBuilder" failonerror="true" maxmemory="256m">
+ <arg value="${basedir}"/>
+ </java>
+
+ <!-- Assemble artifacts -->
+ <ivy:resolve resolveId="copy.path" file="${basedir}/kernel-ivy.xml" transitive="true"/>
+ <ivy:retrieve resolveId="copy.path" pattern="${package.dir}/zip/repository/ext/[artifact]_[revision].[ext]" conf="repository-ext" type="jar"/>
+
+ <ivy:resolve resolveId="copy.path" file="${basedir}/lib-ivy.xml" transitive="true"/>
+ <ivy:retrieve resolveId="copy.path" pattern="${package.dir}/zip/lib/[artifact]_[revision].[ext]" conf="lib" type="jar"/>
+
+ <ivy:resolve resolveId="copy.path" file="${basedir}/user-ivy.xml" transitive="false"/>
+ <ivy:retrieve resolveId="copy.path" pattern="${package.dir}/zip/lib/user/[artifact]_[revision].[ext]" conf="lib-user" type="jar"/>
+
+ <!-- Copy the kernel artifacts to a prepared for publishing location - a p2 repo will be built around them -->
+ <ivy:resolve resolveId="copy.path" file="${basedir}/kernel-ivy.xml" transitive="true"/>
+ <ivy:retrieve resolveId="copy.path" pattern="${target.dir}/p2repo/[artifact]_[revision].[ext]" conf="lib-kernel" type="jar"/>
+
+ <ivy:resolve resolveId="copy.path" file="${basedir}/p2runtime-ivy.xml" transitive="true"/>
+ <ivy:retrieve resolveId="copy.path" pattern="${target.dir}/p2repo/[artifact]_[revision].[ext]" conf="p2-runtime" type="jar"/>
+
+ <mkdir dir="${package.dir}/zip/config"/>
+ <mkdir dir="${package.dir}/zip/pickup"/>
+
+ <echo file="${package.dir}/zip/lib/.version"
+ message="virgo.kernel.version=${bundle.version}&#xa;"/>
+
+ <copy todir="${package.dir}/zip" failonerror="false">
+ <fileset dir="${basedir}/resources"/>
+ </copy>
+
+ <copy todir="${package.dir}/zip/bin" failonerror="false">
+ <fileset dir="${basedir}/bin"/>
+ </copy>
+
+ <copy todir="${package.dir}/zip/lib" failonerror="false">
+ <fileset dir="${basedir}/lib"/>
+ <filterset>
+ <filter token="ASPECTJ.VERSION" value="${org.aspectj}"/>
+ <filter token="OSGI.SERVICES.VERSION" value="${org.eclipse.osgi.services}"/>
+ <filter token="EQUINOX.EVENT.VERSION" value="${org.eclipse.equinox.event}"/>
+ <filter token="EQUINOX.CONFIGADMIN.VERSION" value="${org.eclipse.equinox.cm}"/>
+ <filter token="EQUINOX.DS.VERSION" value="${org.eclipse.equinox.ds}"/>
+ <filter token="EQUINOX.UTIL.VERSION" value="${org.eclipse.equinox.util}"/>
+ <filter token="KERNEL.VERSION" value="${bundle.version}"/>
+ <filter token="MEDIC.VERSION" value="${org.eclipse.virgo.medic}"/>
+ <filter token="REPOSITORY.VERSION" value="${org.eclipse.virgo.repository}"/>
+ <filter token="SLF4J.VERSION" value="${org.slf4j}"/>
+ <filter token="SPRING.DM.VERSION" value="${org.springframework.osgi}"/>
+ <filter token="SPRING.VERSION" value="${org.springframework}"/>
+ <filter token="UTIL.VERSION" value="${org.eclipse.virgo.util}"/>
+ <filter token="OSGI.EXTENSIONS.VERSION" value="${org.eclipse.virgo.osgi}"/>
+ <filter token="CORE.CONTENTTYPE" value="${org.eclipse.core.contenttype}"/>
+ <filter token="CORE.JOBS" value="${org.eclipse.core.jobs}"/>
+ <filter token="CORE.RUNTIME" value="${org.eclipse.core.runtime}"/>
+ <filter token="ECF" value="${org.eclipse.ecf}"/>
+ <filter token="ECF.FILETRANSFER" value="${org.eclipse.ecf.filetransfer}"/>
+ <filter token="ECF.IDENTITY" value="${org.eclipse.ecf.identity}"/>
+ <filter token="ECF.PROVIDER.FILETRANSFER" value="${org.eclipse.ecf.provider.filetransfer}"/>
+ <filter token="ECF.PROVIDER.FILETRANSFER.SSL" value="${org.eclipse.ecf.provider.filetransfer.ssl}"/>
+ <filter token="ECF.SSL" value="${org.eclipse.ecf.ssl}"/>
+ <filter token="EQUINOX.APP" value="${org.eclipse.equinox.app}"/>
+ <filter token="EQUINOX.COMMON" value="${org.eclipse.equinox.common}"/>
+ <filter token="EQUINOX.FRAMEWORKADMIN" value="${org.eclipse.equinox.frameworkadmin}"/>
+ <filter token="EQUINOX.FRAMEWORKADMIN.EQUINOX" value="${org.eclipse.equinox.frameworkadmin.equinox}"/>
+ <filter token="EQUINOX.LAUNCHER" value="${org.eclipse.equinox.launcher}"/>
+ <filter token="EQUINOX.P2.ARTIFACT.REPOSITORY" value="${org.eclipse.equinox.p2.artifact.repository}"/>
+ <filter token="EQUINOX.P2.CONSOLE" value="${org.eclipse.equinox.p2.console}"/>
+ </filterset>
+ </copy>
+
+ <copy todir="${package.dir}/zip/config" failonerror="false">
+ <fileset dir="${basedir}/config" excludes="keystore"/>
+ <filterset>
+ <filter token="ASPECTJ.VERSION" value="${org.aspectj}"/>
+ <filter token="OSGI.SERVICES.VERSION" value="${org.eclipse.osgi.services}"/>
+ <filter token="EQUINOX.EVENT.VERSION" value="${org.eclipse.equinox.event}"/>
+ <filter token="EQUINOX.CONFIGADMIN.VERSION" value="${org.eclipse.equinox.cm}"/>
+ <filter token="EQUINOX.DS.VERSION" value="${org.eclipse.equinox.ds}"/>
+ <filter token="EQUINOX.UTIL.VERSION" value="${org.eclipse.equinox.util}"/>
+ <filter token="KERNEL.VERSION" value="${bundle.version}"/>
+ <filter token="MEDIC.VERSION" value="${org.eclipse.virgo.medic}"/>
+ <filter token="REPOSITORY.VERSION" value="${org.eclipse.virgo.repository}"/>
+ <filter token="SLF4J.VERSION" value="${org.slf4j}"/>
+ <filter token="SPRING.DM.VERSION" value="${org.springframework.osgi}"/>
+ <filter token="SPRING.VERSION" value="${org.springframework}"/>
+ <filter token="UTIL.VERSION" value="${org.eclipse.virgo.util}"/>
+ </filterset>
+ </copy>
+
+ <copy todir="${package.dir}/zip/repository/ext" failonerror="false">
+ <fileset dir="${basedir}/repository/ext"/>
+ </copy>
+
+ <copy todir="${package.dir}/zip/repository/ext" failonerror="false">
+ <fileset dir="${target.dir}/p2repo">
+ <include name="org.eclipse.virgo.kernel.agent.dm_*.jar"/>
+ </fileset>
+ </copy>
+
+ <move todir="${package.dir}/zip/repository/ext" failonerror="false">
+ <fileset dir="${target.dir}/p2repo">
+ <include name="org.eclipse.virgo.kernel.dmfragment_*.jar"/>
+ <include name="org.eclipse.virgo.kernel.deployer.dm_*.jar"/>
+ </fileset>
+ </move>
+
+ <mkdir dir="${package.dir}/zip/repository/usr"/>
+
+ <copy file="${basedir}/config/keystore" todir="${package.output.dir}/config" failonerror="false"/>
+
+ <chmod perm="600">
+ <fileset dir="${package.dir}/zip/config">
+ <include name="org.eclipse.virgo.kernel.jmxremote.access.properties"/>
+ </fileset>
+ </chmod>
+
+ <chmod perm="755">
+ <fileset dir="${package.dir}/zip/bin">
+ <include name="*.sh"/>
+ </fileset>
+ </chmod>
+
+ <!-- zip the published Virgo repositories and configuration data -->
+ <zip destfile="${target.dir}/p2repo/virgo_resources.zip">
+ <zipfileset dir="${package.dir}/zip"/>
+ </zip>
+
+ <delete dir="${package.dir}/zip" quiet="true"/>
+
+ <!-- execute product publisher -->
+ <echo message="Publishing Virgo kernel product in p2 repository" />
+ <java jar="${basedir}/p2/org.eclipse.osgi_3.7.0.v20110224.jar" fork="true" taskname="p2ProductPublishing" failonerror="true" maxmemory="256m">
+ <sysproperty key="operationType" value="p2repoPublish"/>
+ <sysproperty key="launch.config.location" value="${basedir}/lib/org.eclipse.virgo.kernel.launch.properties"/>
+ <sysproperty key="product.location" value="${target.dir}/p2repo"/>
+ </java>
+
+ <!-- execute product install -->
+ <echo message="Installing Virgo product to get the final assembly of Virgo kernel" />
+ <java jar="${basedir}/p2/org.eclipse.osgi_3.7.0.v20110224.jar" fork="true" taskname="p2ProductInstall" failonerror="true" maxmemory="256m">
+ <sysproperty key="operationType" value="installKernel"/>
+ <sysproperty key="source.p2.repo" value="file:${target.dir}/p2repo"/>
+ <sysproperty key="install.location" value="${package.output.dir}"/>
+ <sysproperty key="installIU" value="virgo.product"/>
+ <sysproperty key="profile" value="VIRGO.kernel"/>
+ </java>
+
+ <mkdir dir="${artifacts.dir}"/>
+ <zip destfile="${package.output.file}">
+ <zipfileset dir="${package.dir}" includes="${package.basename}/bin/*.sh" filemode="755"/>
+ <zipfileset dir="${package.dir}" includes="${package.basename}/config/org.eclipse.virgo.kernel.jmxremote.access.properties" filemode="600"/>
+ <zipfileset dir="${package.dir}">
+ <exclude name="${package.basename}/bin/*.sh"/>
+ <exclude name="${package.basename}/config/org.eclipse.virgo.kernel.jmxremote.access.properties"/>
+ </zipfileset>
+ </zip>
+ </target>
+
+ <target name="smoke-test" description="Runs a smoke test on the kernel packaged build">
+ <path id="smoke.test.bundles">
+ <pathelement location="${basedir}/../org.eclipse.virgo.kernel.smoketest" />
+ </path>
+ <antcall target="test.pre"/>
+ <all-bundles target="test-package" buildpathRef="smoke.test.bundles">
+ <property name="package.output.file" value="${package.output.file}"/>
+ <property name="package.basename" value="${package.basename}"/>
+ </all-bundles>
+ <antcall target="test.post"/>
+ </target>
+
+ <target name="package.resources" depends="package"
+ description="Creates a special bundle containing Virgo entities that are not bundles">
+ <property name="meta.inf" value="${distro.res}/META-INF"/>
+ <property name="content" value="${distro.res}/root_content"/>
+ <property name="resources.jar" value="${package.output.dir}/lib/org.eclipse.virgo.kernel.resources.jar"/>
+ <zip destfile="${resources.jar}">
+ <zipfileset dir="${distro.res}"/>
+ <zipfileset dir="${package.dir}/${package.basename}"
+ includes="bin/*.sh" filemode="755"/>
+ <zipfileset dir="${package.dir}/${package.basename}"
+ includes="config/org.eclipse.virgo.kernel.jmxremote.access.properties" filemode="600"/>
+ <zipfileset dir="${package.dir}/${package.basename}">
+ <exclude name="bin/*.sh"/>
+ <exclude name="config/org.eclipse.virgo.kernel.jmxremote.access.properties"/>
+ <exclude name="**/*.jar"/>
+ </zipfileset>
+ </zip>
+ </target>
+
+ <target name="p2.publish" depends="package.resources, p2.extract-publisher"
+ description="Publishes bundles, features and product">
+ <java jar="${p2.launcher.jar}" fork="true" taskname="p2bundles" failonerror="true" maxmemory="256m">
+ <arg line="-application org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher"/>
+ <arg line="-metadataRepository ${p2.repo.url}"/>
+ <arg line="-artifactRepository ${p2.repo.url}"/>
+ <arg line="-bundles ${package.output.dir}/lib,${package.output.dir}/repository/ext"/>
+ <arg line="-publishArtifacts"/>
+ <arg line="-configs all"/>
+ </java>
+
+ <sshexec host="build.eclipse.org"
+ username="${eclipse.buildId}"
+ keyfile="${key.file}"
+ passphrase="${passphrase}"
+ command="mkdir -pv /opt/public/rt/virgo/update-site/${release.type}/${build.stamp}"/>
+
+ <scp todir="${eclipse.buildId}@build.eclipse.org:/opt/public/rt/virgo/update-site/${release.type}/${build.stamp}/"
+ keyfile="${key.file}"
+ passphrase="${passphrase}">
+ <fileset dir="${publishing.dir}"/>
+ </scp>
+
+ </target>
+
+</project>
diff --git a/build-kernel/config/org.eclipse.virgo.kernel.userregion.properties b/build-kernel/config/org.eclipse.virgo.kernel.userregion.properties
index ba99487d..15a068b4 100644
--- a/build-kernel/config/org.eclipse.virgo.kernel.userregion.properties
+++ b/build-kernel/config/org.eclipse.virgo.kernel.userregion.properties
@@ -1,6 +1,6 @@
baseBundles = \
- file:lib/kernel/org.eclipse.virgo.kernel.userregion-@KERNEL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.kernel.osgicommand-@KERNEL.VERSION@.jar@start
+ file:lib/user/org.eclipse.virgo.kernel.userregion_@KERNEL.VERSION@.jar@start,\
+ file:lib/user/org.eclipse.virgo.kernel.osgicommand_@KERNEL.VERSION@.jar@start
bundleImports = org.eclipse.osgi;bundle-version="0"
diff --git a/build-kernel/kernel-ivy.xml b/build-kernel/kernel-ivy.xml
index 558022d7..349a5941 100644
--- a/build-kernel/kernel-ivy.xml
+++ b/build-kernel/kernel-ivy.xml
@@ -13,7 +13,6 @@
<dependencies>
<!-- lib/kernel -->
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel" rev="latest.integration" conf="lib-kernel->runtime"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.osgicommand" rev="latest.integration" conf="lib-kernel->runtime"/>
<dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.userregionfactory" rev="latest.integration" conf="lib-kernel->runtime"/>
<dependency org="org.slf4j" name="com.springsource.slf4j.org.apache.commons.logging" rev="${org.slf4j}" conf="lib-kernel->runtime"/>
<dependency org="org.aspectj" name="com.springsource.org.aspectj.weaver" rev="${org.aspectj}" conf="lib-kernel->runtime"/>
@@ -42,6 +41,7 @@
<exclude org="org.jboss.vfs"/>
<exclude org="org.apache.commons" module="com.springsource.org.apache.commons.logging"/>
<exclude org="org.springframework" module="org.springframework.context.support"/>
+ <exclude org="org.eclipse.virgo.kernel" module="org.eclipse.virgo.kernel.userregion"/>
<override org="org.eclipse.virgo.util" rev="${org.eclipse.virgo.util}"/>
<override org="org.eclipse.virgo.medic" rev="${org.eclipse.virgo.medic}"/>
diff --git a/build-kernel/lib-ivy.xml b/build-kernel/lib-ivy.xml
index 896e0c3e..88d0652f 100644
--- a/build-kernel/lib-ivy.xml
+++ b/build-kernel/lib-ivy.xml
@@ -17,6 +17,9 @@
<dependency org="org.eclipse.virgo.osgi" name="org.eclipse.virgo.osgi.extensions.equinox" rev="${org.eclipse.virgo.osgi}" conf="lib->runtime"/>
<dependency org="org.eclipse.virgo.osgi" name="org.eclipse.virgo.osgi.console" rev="${org.eclipse.virgo.osgi}" conf="lib->runtime"/>
<dependency org="javax.transaction" name="com.springsource.javax.transaction" rev="${javax.transaction}" conf="lib->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.launcher" rev="${org.eclipse.equinox.launcher}" conf="lib->runtime"/>
+
+ <exclude org="org.eclipse.osgi" module="org.eclipse.osgi"/>
</dependencies>
</ivy-module>
diff --git a/build-kernel/lib/org.eclipse.virgo.kernel.launch.properties b/build-kernel/lib/org.eclipse.virgo.kernel.launch.properties
index 6444e00b..8b91bea9 100644
--- a/build-kernel/lib/org.eclipse.virgo.kernel.launch.properties
+++ b/build-kernel/lib/org.eclipse.virgo.kernel.launch.properties
@@ -1,64 +1,98 @@
-launcher.bundles =\
- file:lib/kernel/org.eclipse.equinox.region-@EQUINOX.REGION.VERSION@.jar@start,\
- file:lib/kernel/com.springsource.slf4j.api-@SLF4J.VERSION@.jar@start,\
- file:lib/kernel/com.springsource.slf4j.org.apache.commons.logging-@SLF4J.VERSION@.jar@start,\
- file:lib/kernel/com.springsource.org.aspectj.weaver-@ASPECTJ.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.kernel.deployer-@KERNEL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.medic-@MEDIC.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.osgi.services-@OSGI.SERVICES.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.equinox.cm-@EQUINOX.CONFIGADMIN.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.medic.core-@MEDIC.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.util.osgi-@UTIL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.equinox.event-@EQUINOX.EVENT.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.util.common-@UTIL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.util.io-@UTIL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.util.jmx-@UTIL.VERSION@.jar,\
- file:lib/kernel/org.eclipse.virgo.util.math-@UTIL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.util.parser.manifest-@UTIL.VERSION@.jar@start,\
- file:lib/kernel/com.springsource.org.apache.commons.codec-1.3.0.jar@start,\
- file:lib/kernel/com.springsource.org.apache.commons.httpclient-3.1.0.jar@start,\
- file:lib/kernel/org.eclipse.virgo.repository-@REPOSITORY.VERSION@.jar@start,\
- file:lib/kernel/org.springframework.aop-@SPRING.VERSION@.jar,\
- file:lib/kernel/org.springframework.asm-@SPRING.VERSION@.jar,\
- file:lib/kernel/org.springframework.expression-@SPRING.VERSION@.jar,\
- file:lib/kernel/org.springframework.beans-@SPRING.VERSION@.jar,\
- file:lib/kernel/org.springframework.core-@SPRING.VERSION@.jar,\
- file:lib/kernel/org.springframework.context-@SPRING.VERSION@.jar,\
- file:lib/kernel/org.eclipse.virgo.kernel.core-@KERNEL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.kernel.agent.dm-@KERNEL.VERSION@.jar@start,\
- file:lib/kernel/org.springframework.osgi.core-@SPRING.DM.VERSION@.jar,\
- file:lib/kernel/org.springframework.osgi.extender-@SPRING.DM.VERSION@.jar@start,\
- file:lib/kernel/org.springframework.osgi.io-@SPRING.DM.VERSION@.jar,\
- file:lib/kernel/com.springsource.org.aopalliance-1.0.0.jar,\
- file:lib/kernel/org.eclipse.equinox.ds-@EQUINOX.DS.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.equinox.util-@EQUINOX.UTIL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.kernel.artifact-@KERNEL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.kernel.services-@KERNEL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.kernel.model-@KERNEL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.kernel.kerneldmfragment-@KERNEL.VERSION@.jar,\
- file:lib/kernel/org.eclipse.virgo.kernel.shell-@KERNEL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.kernel.osgi-@KERNEL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.kernel.core-@KERNEL.VERSION@.jar@start,\
- file:lib/kernel/org.eclipse.virgo.kernel.userregionfactory-@KERNEL.VERSION@.jar@start
-
-#Equinox Configuration
-osgi.parentClassloader=fwk
-osgi.context.bootdelegation=false
-osgi.compatibility.bootdelegation=false
-osgi.clean=true
-org.osgi.framework.bsnversion=multiple
-
-# osgi console support
-# osgi.console=2401
-
-osgi.java.profile=file:lib/java6-server.profile
-osgi.java.profile.bootdelegation=override
-osgi.hook.configurators.include=\
- org.eclipse.virgo.osgi.extensions.equinox.hooks.ExtensionsHookConfigurator,\
- org.eclipse.virgo.osgi.console.telnet.hook.TelnetHookConfigurator
-
-org.eclipse.virgo.medic.log.config.path=config/serviceability.xml
-org.eclipse.virgo.suppress.heap.dumps=false
-
-eclipse.bundle.setTCCL=false
-eclipse.enableStateSaver=false
+launcher.bundles =\
+ org.eclipse.equinox.region_@EQUINOX.REGION.VERSION@.jar@start,\
+ com.springsource.slf4j.api_@SLF4J.VERSION@.jar@start,\
+ com.springsource.slf4j.org.apache.commons.logging_@SLF4J.VERSION@.jar@start,\
+ com.springsource.org.aspectj.weaver_@ASPECTJ.VERSION@.jar@start,\
+ org.eclipse.virgo.kernel.deployer_@KERNEL.VERSION@.jar@start,\
+ org.eclipse.virgo.medic_@MEDIC.VERSION@.jar@start,\
+ org.eclipse.osgi.services_@OSGI.SERVICES.VERSION@.jar@start,\
+ org.eclipse.equinox.cm_@EQUINOX.CONFIGADMIN.VERSION@.jar@start,\
+ org.eclipse.virgo.medic.core_@MEDIC.VERSION@.jar@start,\
+ org.eclipse.virgo.util.osgi_@UTIL.VERSION@.jar@start,\
+ org.eclipse.equinox.event_@EQUINOX.EVENT.VERSION@.jar@start,\
+ org.eclipse.virgo.util.common_@UTIL.VERSION@.jar@start,\
+ org.eclipse.virgo.util.io_@UTIL.VERSION@.jar@start,\
+ org.eclipse.virgo.util.jmx_@UTIL.VERSION@.jar,\
+ org.eclipse.virgo.util.math_@UTIL.VERSION@.jar@start,\
+ org.eclipse.virgo.util.parser.manifest_@UTIL.VERSION@.jar@start,\
+ com.springsource.org.apache.commons.codec_1.3.0.jar@start,\
+ com.springsource.org.apache.commons.httpclient_3.1.0.jar@start,\
+ org.eclipse.virgo.repository_@REPOSITORY.VERSION@.jar@start,\
+ org.springframework.aop_@SPRING.VERSION@.jar,\
+ org.springframework.asm_@SPRING.VERSION@.jar,\
+ org.springframework.expression_@SPRING.VERSION@.jar,\
+ org.springframework.beans_@SPRING.VERSION@.jar,\
+ org.springframework.core_@SPRING.VERSION@.jar,\
+ org.springframework.context_@SPRING.VERSION@.jar,\
+ org.eclipse.virgo.kernel.core_@KERNEL.VERSION@.jar@start,\
+ org.eclipse.virgo.kernel.agent.dm_@KERNEL.VERSION@.jar@start,\
+ org.springframework.osgi.core_@SPRING.DM.VERSION@.jar,\
+ org.springframework.osgi.extender_@SPRING.DM.VERSION@.jar@start,\
+ org.springframework.osgi.io_@SPRING.DM.VERSION@.jar,\
+ com.springsource.org.aopalliance_1.0.0.jar,\
+ org.eclipse.equinox.ds_@EQUINOX.DS.VERSION@.jar@start,\
+ org.eclipse.equinox.util_@EQUINOX.UTIL.VERSION@.jar@start,\
+ org.eclipse.virgo.kernel.artifact_@KERNEL.VERSION@.jar@start,\
+ org.eclipse.virgo.kernel.services_@KERNEL.VERSION@.jar@start,\
+ org.eclipse.virgo.kernel.model_@KERNEL.VERSION@.jar@start,\
+ org.eclipse.virgo.kernel.kerneldmfragment_@KERNEL.VERSION@.jar,\
+ org.eclipse.virgo.kernel.shell_@KERNEL.VERSION@.jar@start,\
+ org.eclipse.virgo.kernel.osgi_@KERNEL.VERSION@.jar@start,\
+ org.eclipse.virgo.kernel.deployer.p2_@KERNEL_VERSION@start,\
+ org.eclipse.virgo.kernel.userregionfactory_@KERNEL.VERSION@.jar@start,\
+ org.eclipse.equinox.common_3.6.0.v20110506.jar@start,\
+ org.eclipse.equinox.frameworkadmin.equinox_1.0.300.v20110506.jar@start,\
+ org.eclipse.equinox.frameworkadmin_2.0.0.v20110502-1955.jar@start,\
+ org.eclipse.core.contenttype_3.4.100.v20110423-0524.jar@start,\
+ org.eclipse.core.jobs_3.5.100.v20110404.jar@start,\
+ org.eclipse.core.runtime_3.7.0.v20110110.jar@start,\
+ org.eclipse.ecf_3.1.200.v20110313-1843.jar@start,\
+ org.eclipse.ecf.filetransfer_5.0.0.v20110313-1843.jar@start,\
+ org.eclipse.ecf.identity_3.1.100.v20110313-1843.jar@start,\
+ org.eclipse.ecf.provider.filetransfer_3.2.0.v20110313-1843.jar@start,\
+ org.eclipse.ecf.ssl_1.0.100.v20100906-1425.jar@start,\
+ org.eclipse.equinox.app_1.3.100.v20110321.jar,\
+ org.eclipse.equinox.p2.artifact.repository_1.1.100.v20110511-1359.jar@start,\
+ org.eclipse.equinox.p2.console_1.0.300.v20110502-1955.jar@start,\
+ org.eclipse.equinox.p2.core_2.1.0.v20110502-1955.jar@start,\
+ org.eclipse.equinox.p2.director_2.1.0.v20110504-1715.jar,\
+ org.eclipse.equinox.p2.engine_2.1.0.v20110511.jar@start,\
+ org.eclipse.equinox.p2.garbagecollector_1.0.200.v20110510.jar,\
+ org.eclipse.equinox.p2.jarprocessor_1.0.200.v20110502-1955.jar,\
+ org.eclipse.equinox.p2.metadata_2.1.0.v20110510.jar@start,\
+ org.eclipse.equinox.p2.metadata.repository_1.2.0.v20110511-1359.jar@start,\
+ org.eclipse.equinox.p2.publisher_1.2.0.v20110511.jar@start,\
+ org.eclipse.equinox.p2.repository_2.1.0.v20110510.jar@start,\
+ org.eclipse.equinox.p2.touchpoint.eclipse_2.1.0.v20110511.jar@start,\
+ org.eclipse.equinox.p2.touchpoint.natives_1.0.300.v20110502-1955.jar@start,\
+ org.eclipse.equinox.p2.transport.ecf_1.0.0.v20110510.jar@start,\
+ org.eclipse.equinox.simpleconfigurator_1.0.200.v20110502-1955.jar@start,\
+ org.eclipse.equinox.simpleconfigurator.manipulator_2.0.0.v20110502-1955.jar@start,\
+ org.eclipse.equinox.preferences_3.4.0.v20110502.jar@start,\
+ org.eclipse.equinox.registry_3.5.100.v20110502.jar@start,\
+ org.eclipse.equinox.security_1.1.0.v20110502.jar,\
+ org.sat4j.core_2.3.0.v20110329.jar,\
+ org.sat4j.pb_2.3.0.v20110329.jar
+
+#Equinox Configuration
+osgi.parentClassloader=fwk
+osgi.context.bootdelegation=false
+osgi.compatibility.bootdelegation=false
+osgi.clean=true
+org.osgi.framework.bsnversion=multiple
+
+# osgi console support
+# osgi.console=2401
+
+osgi.java.profile=file:lib/java6-server.profile
+osgi.java.profile.bootdelegation=override
+osgi.hook.configurators.include=org.eclipse.virgo.osgi.extensions.equinox.hooks.ExtensionsHookConfigurator,org.eclipse.virgo.osgi.console.telnet.hook.TelnetHookConfigurator
+
+org.eclipse.virgo.medic.log.config.path=config/serviceability.xml
+org.eclipse.virgo.suppress.heap.dumps=false
+eclipse.bundle.setTCCL=false
+eclipse.enableStateSaver=false
+equinox.use.ds=true
+
+
+
diff --git a/build-kernel/org.eclipse.virgo.kernel.lib.kernel.product b/build-kernel/org.eclipse.virgo.kernel.lib.kernel.product
deleted file mode 100644
index fa236211..00000000
--- a/build-kernel/org.eclipse.virgo.kernel.lib.kernel.product
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0"?>
-<?pde version="3.5"?>
-
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ Copyright (c) 2010 SAP AG
- ~ All rights reserved. This program and the accompanying materials
- ~ are made available under the terms of the Eclipse Public License v1.0
- ~ which accompanies this distribution, and is available at
- ~ http://www.eclipse.org/legal/epl-v10.html
- ~
- ~ Contributors:
- ~ Hristo Iliev, SAP AG - initial contribution
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<product name="Virgo Kernel Distribution (kernel region)" uid="org.eclipse.virgo.kernel.lib.kernel.product" version="1.0.0"
- useFeatures="false" includeLaunchers="false">
-
- <plugins>
- <plugin id="com.springsource.org.aopalliance"/>
- <plugin id="com.springsource.org.apache.commons.codec"/>
- <plugin id="com.springsource.org.apache.commons.httpclient"/>
- <plugin id="com.springsource.org.apache.mina.core"/>
- <plugin id="com.springsource.org.apache.sshd"/>
- <plugin id="com.springsource.org.aspectj.weaver"/>
- <plugin id="com.springsource.slf4j.api"/>
- <plugin id="com.springsource.slf4j.org.apache.commons.logging"/>
- <plugin id="org.apache.felix.configadmin"/>
- <plugin id="org.apache.felix.eventadmin"/>
- <plugin id="org.eclipse.virgo.kernel.agent.dm"/>
- <plugin id="org.eclipse.virgo.kernel.artifact"/>
- <plugin id="org.eclipse.virgo.kernel.core"/>
- <plugin id="org.eclipse.virgo.kernel.deployer"/>
- <plugin id="org.eclipse.virgo.kernel.dm"/>
- <plugin id="org.eclipse.virgo.kernel.kerneldmfragment"/>
- <plugin id="org.eclipse.virgo.kernel.model"/>
- <plugin id="org.eclipse.virgo.kernel.osgi"/>
- <plugin id="org.eclipse.virgo.kernel.services"/>
- <plugin id="org.eclipse.virgo.kernel.shell"/>
- <plugin id="org.eclipse.virgo.kernel.userregion"/>
- <plugin id="org.eclipse.virgo.medic"/>
- <plugin id="org.eclipse.virgo.medic.core"/>
- <plugin id="org.eclipse.virgo.osgi.launcher"/>
- <plugin id="org.eclipse.virgo.repository"/>
- <plugin id="org.eclipse.virgo.util.osgi"/>
- <plugin id="org.eclipse.virgo.util.common"/>
- <plugin id="org.eclipse.virgo.util.io"/>
- <plugin id="org.eclipse.virgo.util.jmx"/>
- <plugin id="org.eclipse.virgo.util.math"/>
- <plugin id="org.eclipse.virgo.util.parser.manifest"/>
- <plugin id="org.springframework.aop"/>
- <plugin id="org.springframework.asm"/>
- <plugin id="org.springframework.expression"/>
- <plugin id="org.springframework.beans"/>
- <plugin id="org.springframework.core"/>
- <plugin id="org.springframework.context"/>
- <plugin id="org.springframework.context.support"/>
- <plugin id="org.springframework.osgi.core"/>
- <plugin id="org.springframework.osgi.extender"/>
- <plugin id="org.springframework.osgi.io"/>
- </plugins>
-
- <configurations>
- <plugin id="com.springsource.slf4j.api" autostart="true"/>
- <plugin id="com.springsource.slf4j.org.apache.commons.logging" autostart="true"/>
- <plugin id="com.springsource.org.aspectj.weaver" autostart="true"/>
- <plugin id="org.eclipse.virgo.medic" autostart="true"/>
- <plugin id="org.apache.felix.configadmin" autostart="true"/>
- <plugin id="org.eclipse.virgo.medic.core" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.osgi" autostart="true"/>
- <plugin id="org.apache.felix.eventadmin" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.common" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.io" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.jmx" autostart="false"/>
- <plugin id="org.eclipse.virgo.util.math" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.parser.manifest" autostart="true"/>
- <plugin id="com.springsource.org.apache.commons.codec" autostart="true"/>
- <plugin id="com.springsource.org.apache.commons.httpclient" autostart="true"/>
- <plugin id="org.eclipse.virgo.repository" autostart="true"/>
- <plugin id="org.springframework.aop" autostart="false"/>
- <plugin id="org.springframework.asm" autostart="false"/>
- <plugin id="org.springframework.expression" autostart="false"/>
- <plugin id="org.springframework.beans" autostart="false"/>
- <plugin id="org.springframework.core" autostart="false"/>
- <plugin id="org.springframework.context" autostart="false"/>
- <plugin id="org.eclipse.virgo.kernel.core" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.agent.dm" autostart="true"/>
- <plugin id="org.springframework.osgi.core" autostart="false"/>
- <plugin id="org.springframework.osgi.extender" autostart="true"/>
- <plugin id="org.springframework.osgi.io" autostart="false"/>
- <plugin id="com.springsource.org.aopalliance" autostart="false"/>
- <plugin id="org.eclipse.virgo.kernel.artifact" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.services" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.osgi" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.deployer" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.dm" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.model" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.kerneldmfragment" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.shell" autostart="true"/>
- </configurations>
-
-</product> \ No newline at end of file
diff --git a/build-kernel/org.eclipse.virgo.kernel.lib.product b/build-kernel/org.eclipse.virgo.kernel.lib.product
deleted file mode 100644
index 2d306258..00000000
--- a/build-kernel/org.eclipse.virgo.kernel.lib.product
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0"?>
-<?pde version="3.5"?>
-
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ Copyright (c) 2010 SAP AG
- ~ All rights reserved. This program and the accompanying materials
- ~ are made available under the terms of the Eclipse Public License v1.0
- ~ which accompanies this distribution, and is available at
- ~ http://www.eclipse.org/legal/epl-v10.html
- ~
- ~ Contributors:
- ~ Hristo Iliev, SAP AG - initial contribution
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<product name="Virgo Kernel Distribution (user region)" uid="org.eclipse.virgo.kernel.lib.product" version="1.0.0"
- useFeatures="false" includeLaunchers="false">
-
- <plugins>
- <plugin id="org.eclipse.virgo.kernel.resources"/>
- <plugin id="com.springsource.javax.transaction"/>
- <plugin id="com.springsource.org.aopalliance"/>
- <plugin id="com.springsource.org.apache.commons.codec"/>
- <plugin id="com.springsource.org.apache.commons.httpclient"/>
- <plugin id="com.springsource.org.apache.commons.logging"/>
- <plugin id="com.springsource.org.apache.mina.core"/>
- <plugin id="com.springsource.org.apache.sshd"/>
- <plugin id="com.springsource.org.aspectj.runtime"/>
- <plugin id="com.springsource.slf4j.api"/>
- <plugin id="org.apache.felix.configadmin"/>
- <plugin id="org.apache.felix.eventadmin"/>
- <plugin id="org.eclipse.virgo.kernel.artifact"/>
- <plugin id="org.eclipse.virgo.kernel.authentication"/>
- <plugin id="org.eclipse.virgo.kernel.core"/>
- <plugin id="org.eclipse.virgo.kernel.deployer"/>
- <plugin id="org.eclipse.virgo.kernel.model"/>
- <plugin id="org.eclipse.virgo.kernel.osgi"/>
- <plugin id="org.eclipse.virgo.kernel.osgicommand"/>
- <plugin id="org.eclipse.virgo.kernel.services"/>
- <plugin id="org.eclipse.virgo.kernel.shell"/>
- <plugin id="org.eclipse.virgo.medic"/>
- <plugin id="org.eclipse.virgo.medic.core"/>
- <plugin id="org.eclipse.virgo.osgi.extensions.equinox"/>
- <plugin id="org.eclipse.virgo.osgi.launcher"/>
- <plugin id="org.eclipse.virgo.repository"/>
- <plugin id="org.eclipse.virgo.util.common"/>
- <plugin id="org.eclipse.virgo.util.io"/>
- <plugin id="org.eclipse.virgo.util.jmx"/>
- <plugin id="org.eclipse.virgo.util.math"/>
- <plugin id="org.eclipse.virgo.util.osgi"/>
- <plugin id="org.eclipse.virgo.util.parser.manifest"/>
- <plugin id="org.springframework.aop"/>
- <plugin id="org.springframework.asm"/>
- <plugin id="org.springframework.expression"/>
- <plugin id="org.springframework.beans"/>
- <plugin id="org.springframework.core"/>
- <plugin id="org.springframework.context"/>
- <plugin id="org.springframework.osgi.core"/>
- <plugin id="org.springframework.osgi.extender"/>
- <plugin id="org.springframework.osgi.io"/>
- </plugins>
-
- <configurations>
- <plugin id="com.springsource.slf4j.api" autostart="true"/>
- <plugin id="org.eclipse.virgo.medic" autostart="true"/>
- <plugin id="org.apache.felix.configadmin" autostart="true"/>
- <plugin id="org.eclipse.virgo.medic.core" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.osgi" autostart="true"/>
- <plugin id="org.apache.felix.eventadmin" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.common" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.io" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.jmx" autostart="false"/>
- <plugin id="org.eclipse.virgo.util.math" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.parser.manifest" autostart="true"/>
- <plugin id="com.springsource.org.apache.commons.codec" autostart="true"/>
- <plugin id="com.springsource.org.apache.commons.httpclient" autostart="true"/>
- <plugin id="org.eclipse.virgo.repository" autostart="true"/>
- <plugin id="org.springframework.aop" autostart="false"/>
- <plugin id="org.springframework.asm" autostart="false"/>
- <plugin id="org.springframework.expression" autostart="false"/>
- <plugin id="org.springframework.beans" autostart="false"/>
- <plugin id="org.springframework.core" autostart="false"/>
- <plugin id="org.springframework.context" autostart="false"/>
- <plugin id="org.eclipse.virgo.kernel.core" autostart="true"/>
- <plugin id="org.springframework.osgi.core" autostart="false"/>
- <plugin id="org.springframework.osgi.extender" autostart="true"/>
- <plugin id="org.springframework.osgi.io" autostart="false"/>
- <plugin id="com.springsource.org.aopalliance" autostart="false"/>
- <plugin id="org.eclipse.virgo.kernel.artifact" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.services" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.osgi" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.deployer" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.model" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.shell" autostart="true"/>
- </configurations>
-
-</product> \ No newline at end of file
diff --git a/build-kernel/org.eclipse.virgo.kernel.product b/build-kernel/org.eclipse.virgo.kernel.product
deleted file mode 100644
index 403a082f..00000000
--- a/build-kernel/org.eclipse.virgo.kernel.product
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0"?>
-<?pde version="3.5"?>
-
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ Copyright (c) 2010 SAP AG
- ~ All rights reserved. This program and the accompanying materials
- ~ are made available under the terms of the Eclipse Public License v1.0
- ~ which accompanies this distribution, and is available at
- ~ http://www.eclipse.org/legal/epl-v10.html
- ~
- ~ Contributors:
- ~ Hristo Iliev, SAP AG - initial contribution
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<product name="Virgo Kernel Distribution" uid="org.eclipse.virgo.kernel.product" version="1.0.0"
- useFeatures="false" includeLaunchers="false">
-
- <plugins>
- <plugin id="org.eclipse.virgo.kernel.resources"/>
- <plugin id="com.springsource.slf4j.api"/>
- <plugin id="com.springsource.slf4j.org.apache.commons.logging"/>
- <plugin id="com.springsource.org.aspectj.weaver"/>
- <plugin id="org.eclipse.virgo.medic"/>
- <plugin id="org.apache.felix.configadmin"/>
- <plugin id="org.eclipse.virgo.medic.core"/>
- <plugin id="org.eclipse.virgo.util.osgi"/>
- <plugin id="org.apache.felix.eventadmin"/>
- <plugin id="org.eclipse.virgo.util.common"/>
- <plugin id="org.eclipse.virgo.util.io"/>
- <plugin id="org.eclipse.virgo.util.jmx"/>
- <plugin id="org.eclipse.virgo.util.math"/>
- <plugin id="org.eclipse.virgo.util.parser.manifest"/>
- <plugin id="com.springsource.org.apache.commons.codec"/>
- <plugin id="com.springsource.org.apache.commons.httpclient"/>
- <plugin id="org.eclipse.virgo.repository"/>
- <plugin id="org.springframework.aop"/>
- <plugin id="org.springframework.asm"/>
- <plugin id="org.springframework.expression"/>
- <plugin id="org.springframework.beans"/>
- <plugin id="org.springframework.core"/>
- <plugin id="org.springframework.context"/>
- <plugin id="org.eclipse.virgo.kernel.core"/>
- <plugin id="org.eclipse.virgo.kernel.agent.dm"/>
- <plugin id="org.springframework.osgi.core"/>
- <plugin id="org.springframework.osgi.extender"/>
- <plugin id="org.springframework.osgi.io"/>
- <plugin id="com.springsource.org.aopalliance"/>
- <plugin id="org.eclipse.virgo.kernel.artifact"/>
- <plugin id="org.eclipse.virgo.kernel.services"/>
- <plugin id="org.eclipse.virgo.kernel.osgi"/>
- <plugin id="org.eclipse.virgo.kernel.deployer"/>
- <plugin id="org.eclipse.virgo.kernel.dm"/>
- <plugin id="org.eclipse.virgo.kernel.model"/>
- <plugin id="org.eclipse.virgo.kernel.kerneldmfragment"/>
- <plugin id="org.eclipse.virgo.kernel.shell"/>
- </plugins>
-
- <configurations>
- <plugin id="com.springsource.slf4j.api" autostart="true"/>
- <plugin id="com.springsource.slf4j.org.apache.commons.logging" autostart="true"/>
- <plugin id="com.springsource.org.aspectj.weaver" autostart="true"/>
- <plugin id="org.eclipse.virgo.medic" autostart="true"/>
- <plugin id="org.apache.felix.configadmin" autostart="true"/>
- <plugin id="org.eclipse.virgo.medic.core" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.osgi" autostart="true"/>
- <plugin id="org.apache.felix.eventadmin" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.common" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.io" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.jmx" autostart="false"/>
- <plugin id="org.eclipse.virgo.util.math" autostart="true"/>
- <plugin id="org.eclipse.virgo.util.parser.manifest" autostart="true"/>
- <plugin id="com.springsource.org.apache.commons.codec" autostart="true"/>
- <plugin id="com.springsource.org.apache.commons.httpclient" autostart="true"/>
- <plugin id="org.eclipse.virgo.repository" autostart="true"/>
- <plugin id="org.springframework.aop" autostart="false"/>
- <plugin id="org.springframework.asm" autostart="false"/>
- <plugin id="org.springframework.expression" autostart="false"/>
- <plugin id="org.springframework.beans" autostart="false"/>
- <plugin id="org.springframework.core" autostart="false"/>
- <plugin id="org.springframework.context" autostart="false"/>
- <plugin id="org.eclipse.virgo.kernel.core" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.agent.dm" autostart="true"/>
- <plugin id="org.springframework.osgi.core" autostart="false"/>
- <plugin id="org.springframework.osgi.extender" autostart="true"/>
- <plugin id="org.springframework.osgi.io" autostart="false"/>
- <plugin id="com.springsource.org.aopalliance" autostart="false"/>
- <plugin id="org.eclipse.virgo.kernel.artifact" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.services" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.osgi" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.deployer" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.dm" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.model" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.kerneldmfragment" autostart="true"/>
- <plugin id="org.eclipse.virgo.kernel.shell" autostart="true"/>
- </configurations>
-
-</product> \ No newline at end of file
diff --git a/build-kernel/org.eclipse.virgo.kernel.repository.ext.product b/build-kernel/org.eclipse.virgo.kernel.repository.ext.product
deleted file mode 100644
index ffe64ee2..00000000
--- a/build-kernel/org.eclipse.virgo.kernel.repository.ext.product
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<?pde version="3.5"?>
-
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ Copyright (c) 2010 SAP AG
- ~ All rights reserved. This program and the accompanying materials
- ~ are made available under the terms of the Eclipse Public License v1.0
- ~ which accompanies this distribution, and is available at
- ~ http://www.eclipse.org/legal/epl-v10.html
- ~
- ~ Contributors:
- ~ Hristo Iliev, SAP AG - initial contribution
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<product name="Virgo Kernel Distribution (repository/ext)" uid="org.eclipse.virgo.kernel.repository.ext.product" version="1.0.0"
- useFeatures="false" includeLaunchers="false">
-
- <plugins>
- <plugin id="com.springsource.org.aopalliance"/>
- <plugin id="org.eclipse.virgo.kernel.agent.dm"/>
- <plugin id="org.eclipse.virgo.kernel.deployer.dm"/>
- <plugin id="org.eclipse.virgo.kernel.dmfragment"/>
- <plugin id="org.springframework.aop"/>
- <plugin id="org.springframework.asm"/>
- <plugin id="org.springframework.expression"/>
- <plugin id="org.springframework.beans"/>
- <plugin id="org.springframework.core"/>
- <plugin id="org.springframework.context"/>
- <plugin id="org.springframework.osgi.core"/>
- <plugin id="org.springframework.osgi.extender"/>
- <plugin id="org.springframework.osgi.io"/>
- </plugins>
-
- <configurations>
- <plugin id="com.springsource.org.aopalliance" autostart="false"/>
- <plugin id="org.eclipse.virgo.kernel.agent.dm" autostart="true"/>
- <plugin id="org.springframework.aop" autostart="false"/>
- <plugin id="org.springframework.asm" autostart="false"/>
- <plugin id="org.springframework.expression" autostart="false"/>
- <plugin id="org.springframework.beans" autostart="false"/>
- <plugin id="org.springframework.core" autostart="false"/>
- <plugin id="org.springframework.context" autostart="false"/>
- <plugin id="org.springframework.osgi.core" autostart="false"/>
- <plugin id="org.springframework.osgi.extender" autostart="true"/>
- <plugin id="org.springframework.osgi.io" autostart="false"/>
- </configurations>
-
-</product> \ No newline at end of file
diff --git a/build-kernel/p2.inf b/build-kernel/p2.inf
deleted file mode 100644
index e09ad725..00000000
--- a/build-kernel/p2.inf
+++ /dev/null
@@ -1,13 +0,0 @@
-################################################################################
-# Copyright (c) 2010 SAP AG
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Hristo Iliev, SAP AG - initial contribution
-################################################################################
-
-properties.1.name = org.eclipse.equinox.p2.type.category
-properties.1.value = true
diff --git a/build-kernel/p2_resources/config.ini b/build-kernel/p2_resources/config.ini
new file mode 100644
index 00000000..bb87343f
--- /dev/null
+++ b/build-kernel/p2_resources/config.ini
@@ -0,0 +1,6 @@
+osgi.bundles=reference\:file\:org.eclipse.equinox.simpleconfigurator_@SIMPLE.CONFIG.VERSION@.jar@1\:start
+org.eclipse.equinox.simpleconfigurator.configUrl=file\:org.eclipse.equinox.simpleconfigurator/bundles.info
+equinox.use.ds=true
+osgi.clean=true
+osgi.bundles.defaultStartLevel=4
+org.osgi.framework.bootdelegation=org.xml.*,javax.xml.* \ No newline at end of file
diff --git a/build-kernel/p2build-ivy.xml b/build-kernel/p2build-ivy.xml
new file mode 100644
index 00000000..20a086fc
--- /dev/null
+++ b/build-kernel/p2build-ivy.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd" version="1.3">
+
+ <info organisation="org.eclipse.virgo" module="${ant.project.name}" />
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ <conf name="p2-build" visibility="public" description="Dependencies to be used for p2"/>
+ </configurations>
+
+ <dependencies>
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.build.p2" rev="latest.integration" conf="p2-build->runtime"/>
+ </dependencies>
+
+</ivy-module>
+
diff --git a/build-kernel/p2runtime-ivy.xml b/build-kernel/p2runtime-ivy.xml
new file mode 100644
index 00000000..617a1e40
--- /dev/null
+++ b/build-kernel/p2runtime-ivy.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd" version="1.3">
+
+ <info organisation="org.eclipse.virgo" module="${ant.project.name}" />
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ <conf name="p2-runtime" visibility="public" description="Dependencies to be used for p2"/>
+ </configurations>
+
+ <dependencies>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi.services" rev="${org.eclipse.osgi.services}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.ds" rev="${org.eclipse.equinox.ds}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.util" rev="${org.eclipse.equinox.util}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.core.contenttype" rev="${org.eclipse.core.contenttype}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.core.jobs" rev="${org.eclipse.core.jobs}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.core.runtime" rev="${org.eclipse.core.runtime}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.ecf" rev="${org.eclipse.ecf}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.ecf.filetransfer" rev="${org.eclipse.ecf.filetransfer}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.ecf.identity" rev="${org.eclipse.ecf.identity}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.ecf.provider.filetransfer" rev="${org.eclipse.ecf.provider.filetransfer}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.ecf.ssl" rev="${org.eclipse.ecf.ssl}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.app" rev="${org.eclipse.equinox.app}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.common" rev="${org.eclipse.equinox.common}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.frameworkadmin" rev="${org.eclipse.equinox.frameworkadmin}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.frameworkadmin.equinox" rev="${org.eclipse.equinox.frameworkadmin.equinox}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.launcher" rev="${org.eclipse.equinox.launcher}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.artifact.repository" rev="${org.eclipse.equinox.p2.artifact.repository}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.console" rev="${org.eclipse.equinox.p2.console}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.core" rev="${org.eclipse.equinox.p2.core}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.director" rev="${org.eclipse.equinox.p2.director}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.engine" rev="${org.eclipse.equinox.p2.engine}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.garbagecollector" rev="${org.eclipse.equinox.p2.garbagecollector}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.jarprocessor" rev="${org.eclipse.equinox.p2.jarprocessor}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.metadata" rev="${org.eclipse.equinox.p2.metadata}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.metadata.repository" rev="${org.eclipse.equinox.p2.metadata.repository}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.publisher" rev="${org.eclipse.equinox.p2.publisher}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.publisher.eclipse" rev="${org.eclipse.equinox.p2.publisher.eclipse}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.repository" rev="${org.eclipse.equinox.p2.repository}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.touchpoint.eclipse" rev="${org.eclipse.equinox.p2.touchpoint.eclipse}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.touchpoint.natives" rev="${org.eclipse.equinox.p2.touchpoint.natives}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.transport.ecf" rev="${org.eclipse.equinox.p2.transport.ecf}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.preferences" rev="${org.eclipse.equinox.preferences}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.registry" rev="${org.eclipse.equinox.registry}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.security" rev="${org.eclipse.equinox.security}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.simpleconfigurator" rev="${org.eclipse.equinox.simpleconfigurator}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.simpleconfigurator.manipulator" rev="${org.eclipse.equinox.simpleconfigurator.manipulator}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.artifact" rev="latest.integration" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.osgi" rev="${org.eclipse.virgo.util.osgi}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.io" rev="${org.eclipse.virgo.util.io}" conf="p2-runtime->runtime"/>
+ <dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic.core" rev="${org.eclipse.virgo.medic.core}" conf="p2-runtime->runtime"/>
+
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.deployer.p2" rev="latest.integration" conf="p2-runtime->runtime"/>
+ </dependencies>
+
+</ivy-module>
+
diff --git a/build-kernel/user-ivy.xml b/build-kernel/user-ivy.xml
new file mode 100644
index 00000000..4888b395
--- /dev/null
+++ b/build-kernel/user-ivy.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd" version="1.3">
+
+ <info organisation="org.eclipse.virgo" module="${ant.project.name}" />
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ <conf name="lib-user" visibility="public" description="Dependencies to be packaged in lib/user"/>
+ </configurations>
+
+ <dependencies>
+ <!-- lib/user -->
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.osgicommand" rev="latest.integration" conf="lib-user->runtime"/>
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.userregion" rev="latest.integration" conf="lib-user->runtime"/>
+
+ </dependencies>
+</ivy-module> \ No newline at end of file
diff --git a/build.versions b/build.versions
index 1c9e71c6..509d32fe 100644
--- a/build.versions
+++ b/build.versions
@@ -11,11 +11,49 @@ org.eclipse.virgo.medic=3.0.0.M05
org.eclipse.virgo.osgi=3.0.0.M05
org.eclipse.virgo.repository=3.0.0.M05
org.eclipse.virgo.util=3.0.0.M05
+org.eclipse.virgo.io=3.0.0.M05
+org.eclipse.virgo.medic.core=3.0.0.M05
org.slf4j=1.6.1
org.slf4j.spi=1.6.1
org.springframework.osgi=1.2.1
org.springframework=3.0.5.RELEASE
+# p2 Publishing
+org.eclipse.core.contenttype=3.4.100.v20110423-0524
+org.eclipse.core.jobs=3.5.100.v20110404
+org.eclipse.core.runtime=3.7.0.v20110110
+org.eclipse.ecf=3.1.200.v20110313-1843
+org.eclipse.ecf.filetransfer=5.0.0.v20110313-1843
+org.eclipse.ecf.identity=3.1.100.v20110313-1843
+org.eclipse.ecf.provider.filetransfer=3.2.0.v20110313-1843
+org.eclipse.ecf.provider.filetransfer.ssl=1.0.0.v20110313-1843
+org.eclipse.ecf.ssl=1.0.100.v20110313-1843
+org.eclipse.equinox.app=1.3.100.v20110321
+org.eclipse.equinox.common=3.6.0.v20110506
+org.eclipse.equinox.frameworkadmin=2.0.0.v20110502-1955
+org.eclipse.equinox.frameworkadmin.equinox=1.0.300.v20110506
+org.eclipse.equinox.launcher=1.2.0.v20110502
+org.eclipse.equinox.p2.artifact.repository=1.1.100.v20110511-1359
+org.eclipse.equinox.p2.console=1.0.300.v20110502-1955
+org.eclipse.equinox.p2.core=2.1.0.v20110502-1955
+org.eclipse.equinox.p2.director=2.1.0.v20110504-1715
+org.eclipse.equinox.p2.engine=2.1.0.v20110511
+org.eclipse.equinox.p2.garbagecollector=1.0.200.v20110510
+org.eclipse.equinox.p2.jarprocessor=1.0.200.v20110502-1955
+org.eclipse.equinox.p2.metadata=2.1.0.v20110510
+org.eclipse.equinox.p2.metadata.repository=1.2.0.v20110511-1359
+org.eclipse.equinox.p2.publisher=1.2.0.v20110511
+org.eclipse.equinox.p2.publisher.eclipse=1.0.0.v20110511
+org.eclipse.equinox.p2.repository=2.1.0.v20110510
+org.eclipse.equinox.p2.touchpoint.eclipse=2.1.0.v20110511
+org.eclipse.equinox.p2.touchpoint.natives=1.0.300.v20110502-1955
+org.eclipse.equinox.p2.transport.ecf=1.0.0.v20110510
+org.eclipse.equinox.preferences=3.4.0.v20110502
+org.eclipse.equinox.registry=3.5.100.v20110502
+org.eclipse.equinox.security=1.1.0.v20110502
+org.eclipse.equinox.simpleconfigurator=1.0.200.v20110502-1955
+org.eclipse.equinox.simpleconfigurator.manipulator=2.0.0.v20110502-1955
+
# Test
org.springframework.old=2.5.6.SEC01
javax.servlet=3.0.0.v201103241009
diff --git a/org.eclipse.virgo.kernel.build.p2/.classpath b/org.eclipse.virgo.kernel.build.p2/.classpath
new file mode 100644
index 00000000..44931cdd
--- /dev/null
+++ b/org.eclipse.virgo.kernel.build.p2/.classpath
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/test/resources"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20110224/org.eclipse.osgi-3.7.0.v20110224.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20110224/org.eclipse.osgi-sources-3.7.0.v20110224.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.metadata.repository/1.2.0.v20110511-1359/org.eclipse.equinox.p2.metadata.repository-1.2.0.v20110511-1359.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110110/org.eclipse.osgi.services-3.3.0.v20110110.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110110/org.eclipse.osgi.services-sources-3.3.0.v20110110.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.artifact.repository/1.1.100.v20110511-1359/org.eclipse.equinox.p2.artifact.repository-1.1.100.v20110511-1359.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.metadata/2.1.0.v20110510/org.eclipse.equinox.p2.metadata-2.1.0.v20110510.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.core/2.1.0.v20110502-1955/org.eclipse.equinox.p2.core-2.1.0.v20110502-1955.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.repository/2.1.0.v20110510/org.eclipse.equinox.p2.repository-2.1.0.v20110510.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.engine/2.1.0.v20110511/org.eclipse.equinox.p2.engine-2.1.0.v20110511.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.core.runtime/3.7.0.v20110110/org.eclipse.core.runtime-3.7.0.v20110110.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.common/3.6.0.v20110506/org.eclipse.equinox.common-3.6.0.v20110506.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.director/2.1.0.v20110504-1715/org.eclipse.equinox.p2.director-2.1.0.v20110504-1715.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.deployer.p2"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.virgo.kernel.build.p2/.project b/org.eclipse.virgo.kernel.build.p2/.project
new file mode 100644
index 00000000..fc76eb0f
--- /dev/null
+++ b/org.eclipse.virgo.kernel.build.p2/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.virgo.kernel.build.p2</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.virgo.kernel.build.p2/META-INF/MANIFEST.MF b/org.eclipse.virgo.kernel.build.p2/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..deceb541
--- /dev/null
+++ b/org.eclipse.virgo.kernel.build.p2/META-INF/MANIFEST.MF
@@ -0,0 +1,21 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: VirgoRepositoryPublisher
+Service-Component: OSGI-INF/virgo.repo.publisher.xml
+Bundle-Version: 1.0.0.qualifier
+Bundle-SymbolicName: org.eclipse.virgo.kernel.build.p2
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Import-Package: org.eclipse.equinox.internal.p2.artifact.repository,
+ org.eclipse.equinox.internal.p2.artifact.repository.simple,
+ org.eclipse.equinox.p2.core;version="2.0.0",
+ org.eclipse.equinox.p2.engine;version="2.0.0",
+ org.eclipse.equinox.p2.metadata;version="2.1.0",
+ org.eclipse.equinox.p2.planner;version="2.0.0",
+ org.eclipse.equinox.p2.query;version="2.0.0",
+ org.eclipse.equinox.p2.repository.artifact;version="2.0.0",
+ org.eclipse.equinox.p2.repository.metadata;version="2.0.0",
+ org.eclipse.virgo.kernel.p2.publisher,
+ org.osgi.framework;version="1.3.0",
+ org.osgi.service.component
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0"
diff --git a/org.eclipse.virgo.kernel.build.p2/bin/org/eclipse/virgo/kernel/p2/build/VirgoBuildP2RepoPublisher.class b/org.eclipse.virgo.kernel.build.p2/bin/org/eclipse/virgo/kernel/p2/build/VirgoBuildP2RepoPublisher.class
new file mode 100644
index 00000000..e42ee017
--- /dev/null
+++ b/org.eclipse.virgo.kernel.build.p2/bin/org/eclipse/virgo/kernel/p2/build/VirgoBuildP2RepoPublisher.class
Binary files differ
diff --git a/org.eclipse.virgo.kernel.build.p2/build.xml b/org.eclipse.virgo.kernel.build.p2/build.xml
new file mode 100644
index 00000000..890cc972
--- /dev/null
+++ b/org.eclipse.virgo.kernel.build.p2/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.virgo.kernel.build.p2">
+
+ <property name="findbugs.exclude.file" value="${basedir}/findbugs-exclude.xml"/>
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../build.versions"/>
+ <import file="${basedir}/../virgo-build/weaving/default.xml"/>
+
+</project>
diff --git a/org.eclipse.virgo.kernel.build.p2/findbugs-exclude.xml b/org.eclipse.virgo.kernel.build.p2/findbugs-exclude.xml
new file mode 100644
index 00000000..ca6b7edc
--- /dev/null
+++ b/org.eclipse.virgo.kernel.build.p2/findbugs-exclude.xml
@@ -0,0 +1,8 @@
+<FindBugsFilter>
+ <!-- Exclusions -->
+ <Match>
+ <Bug pattern="ES_COMPARING_PARAMETER_STRING_WITH_EQ"/>
+ <Class name="org.eclipse.virgo.kernel.deployer.core.module.StandardModule"/>
+ <Method name="unwrapNull"/>
+ </Match>
+</FindBugsFilter>
diff --git a/org.eclipse.virgo.kernel.build.p2/ivy.xml b/org.eclipse.virgo.kernel.build.p2/ivy.xml
new file mode 100644
index 00000000..1e38e476
--- /dev/null
+++ b/org.eclipse.virgo.kernel.build.p2/ivy.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="org.eclipse.virgo.kernel" module="${ant.project.name}"/>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.deployer.p2" rev="latest.integration" conf="compile->runtime"/>
+
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.core.runtime" rev="${org.eclipse.core.runtime}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.common" rev="${org.eclipse.equinox.common}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi.services" rev="${org.eclipse.osgi.services}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.metadata.repository" rev="${org.eclipse.equinox.p2.metadata.repository}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.artifact.repository" rev="${org.eclipse.equinox.p2.artifact.repository}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.metadata" rev="${org.eclipse.equinox.p2.metadata}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.core" rev="${org.eclipse.equinox.p2.core}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.repository" rev="${org.eclipse.equinox.p2.repository}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.engine" rev="${org.eclipse.equinox.p2.engine}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.director" rev="${org.eclipse.equinox.p2.director}" conf="compile->runtime"/>
+
+ <!-- Allow Equinox to be upgraded point-wise before rippling -->
+ <override org="org.eclipse.osgi" module="org.eclipse.osgi" rev="${org.eclipse.osgi}"/>
+ </dependencies>
+
+</ivy-module>
diff --git a/org.eclipse.virgo.kernel.build.p2/src/main/java/org/eclipse/virgo/kernel/p2/build/Main.java b/org.eclipse.virgo.kernel.build.p2/src/main/java/org/eclipse/virgo/kernel/p2/build/Main.java
new file mode 100644
index 00000000..72c0ed17
--- /dev/null
+++ b/org.eclipse.virgo.kernel.build.p2/src/main/java/org/eclipse/virgo/kernel/p2/build/Main.java
@@ -0,0 +1,66 @@
+
+package org.eclipse.virgo.kernel.p2.build;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+
+public class Main {
+
+ protected static final String SIMPLECONFIGURATOR_BSN = "org.eclipse.equinox.simpleconfigurator";
+
+ private static final String ORG_ECLIPSE_OSGI = "org.eclipse.osgi";
+
+ private static final String BSN_VERSION_SEPARATOR = "_";
+
+ private static final String SC_CONFIG_DIR = "configuration/" + SIMPLECONFIGURATOR_BSN;
+
+ private static final String BINFO_FILE_NAME = "bundles.info";
+
+ private static final String P2_CLIENT_DIR = "p2";
+
+ public static void main(String[] args) throws IOException {
+ if (args != null && args.length == 1) {
+ String baseDir = args[0];
+
+ String bundlesInfoContent = new String();
+ File baseDirFile = new File(baseDir + File.separatorChar + P2_CLIENT_DIR);
+ if (baseDirFile.isDirectory()) {
+ for (File file : baseDirFile.listFiles()) {
+ if (file.getName().endsWith(".jar") && file.getName().contains(BSN_VERSION_SEPARATOR)) {
+ String[] bsnVersionPair = file.getName().split(BSN_VERSION_SEPARATOR);
+ String name = bsnVersionPair[0];
+ String version = bsnVersionPair[1];
+ version = version.substring(0, version.indexOf(".jar"));
+ int startLevel = 4;
+ if (name.equals(SIMPLECONFIGURATOR_BSN)) {
+ startLevel = 1;
+ }
+ if (name.equals(ORG_ECLIPSE_OSGI)) {
+ startLevel = -1;
+ }
+ bundlesInfoContent = bundlesInfoContent + name + "," + version + "," + file.getName() + "," + startLevel + "," + "true\n";
+ }
+ }
+ }
+
+ File bundlesInfoFolder = new File(baseDir + File.separatorChar + P2_CLIENT_DIR + File.separatorChar + SC_CONFIG_DIR);
+ bundlesInfoFolder.mkdirs();
+ File bundlesInfo = new File(baseDir + File.separatorChar + P2_CLIENT_DIR + File.separatorChar + SC_CONFIG_DIR + File.separatorChar + BINFO_FILE_NAME);
+ bundlesInfo.createNewFile();
+ FileWriter writer = null;
+ try {
+ writer = new FileWriter(bundlesInfo);
+ writer.write(bundlesInfoContent);
+ } catch (IOException e) {
+ throw e;
+ } finally {
+ writer.flush();
+ writer.close();
+ }
+ } else {
+ throw new IllegalArgumentException("Required argument for build-kernel's location is missing or wrong.");
+ }
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.build.p2/src/main/java/org/eclipse/virgo/kernel/p2/build/ProductFileBuilder.java b/org.eclipse.virgo.kernel.build.p2/src/main/java/org/eclipse/virgo/kernel/p2/build/ProductFileBuilder.java
new file mode 100644
index 00000000..d6183ee4
--- /dev/null
+++ b/org.eclipse.virgo.kernel.build.p2/src/main/java/org/eclipse/virgo/kernel/p2/build/ProductFileBuilder.java
@@ -0,0 +1,164 @@
+
+package org.eclipse.virgo.kernel.p2.build;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * Helper class for building product files from a defined startup configuration
+ * <strong>Concurrent Semantics</strong><br />
+ * Thread-safe.
+ */
+public class ProductFileBuilder {
+
+ private static final String PROPERTY_PREFIX = "<property name=";
+
+ private static final String START_LEVEL_1 = "startLevel=\"1\"";
+
+ private static final String PRODUCT_SUFFIX = "</product>\n";
+
+ private static final String CONFIGURATIONS_SUFFIX = "</configurations>\n";
+
+ private static final String CONFIGURATIONS_PREFIX = "<configurations>\n";
+
+ private static final String PLUGINS_SUFFIX = "</plugins>\n";
+
+ private static final String PLUGINS_PREFIX = "<plugins>\n";
+
+ private static final String PRODUCT_PREFIX = "<?xml version=\"1.0\"?>\n<?pde version=\"3.5\"?>\n<product name=\"Virgo Kernel Distribution\" uid=\"virgo.product\" version=\"1.0.0\" useFeatures=\"false\" includeLaunchers=\"false\">\n";
+
+ private static final String ELEMENT_SUFFIX = "/>\n";
+
+ private static final String PLUGIN_ELEMENT_PREFIX = "<plugin id=";
+
+ private static final String AUTO_START_INSTRUCTION = "autoStart=\"true\"";
+
+ private static final String BSN_VERSION_SEPARATOR = "_";
+
+ private static final String PROP_LAUNCHER_BUNDLES = "launcher.bundles";
+
+ private final Object monitor = new Object();
+
+ /**
+ * Generates a product file from launch configuration
+ * @param targetLocation - the location where the product file will be saved
+ * @param productFileName - the product file's name
+ * @param launchConfigLocation - the location of the launch configuration
+ * @throws IOException - when the write operation on the product file failed
+ */
+ public void generateProductFile(String targetLocation, String productFileName, String launchConfigLocation) throws IOException {
+ synchronized (this.monitor) {
+ File bundlesDir = new File(targetLocation);
+ if (bundlesDir.isDirectory()) {
+ File productFile = new File(targetLocation + "/" + productFileName);
+ if (productFile.exists()) {
+ productFile.delete();
+ productFile.createNewFile();
+ }
+ FileWriter writer = new FileWriter(productFile);
+ writer.write(PRODUCT_PREFIX);
+
+ Map<String, String> productConfiguration = initializeProductConfiguration(launchConfigLocation);
+
+ writeProductPlugins(bundlesDir, writer, productConfiguration);
+ writeProductConfiguration(writer, productConfiguration);
+
+ writer.write(PRODUCT_SUFFIX);
+ writer.flush();
+ writer.close();
+ }
+ }
+ }
+
+ private void writeProductConfiguration(FileWriter writer, Map<String, String> productConfiguration) throws IOException {
+ writer.write(CONFIGURATIONS_PREFIX);
+ for (String configuration : productConfiguration.values()) {
+ writer.write(configuration);
+ }
+ writer.write(CONFIGURATIONS_SUFFIX);
+ }
+
+ private void writeProductPlugins(File bundlesDir, FileWriter writer, Map<String, String> productConfiguration) throws IOException {
+ writer.write(PLUGINS_PREFIX);
+ for (File bundle : bundlesDir.listFiles()) {
+ if (bundle.getName().endsWith(".jar")) {
+ String bsn = bundle.getName().substring(0, bundle.getName().indexOf(BSN_VERSION_SEPARATOR));
+ if (productConfiguration.containsKey(bsn)) {
+ writer.write(PLUGIN_ELEMENT_PREFIX + "\"" + bsn + "\"" + ELEMENT_SUFFIX);
+ }
+ }
+ }
+ writer.write(PLUGINS_SUFFIX);
+ }
+
+ private Properties parseConfigProperties(String configPath) throws IOException {
+ File file = new File(configPath);
+ if (!file.exists()) {
+ throw new FileNotFoundException("Config path '" + file.getAbsolutePath() + "' does not exist.");
+ }
+ Properties props = new Properties();
+ InputStream stream = null;
+ try {
+ stream = new FileInputStream(file);
+ props.load(stream);
+ return props;
+ } catch (IOException e) {
+ throw new IOException("Unable to read config properties file '" + file.getAbsolutePath() + "'.", e);
+ } finally {
+ if (stream != null) {
+ try {
+ stream.close();
+ } catch (IOException ex) {
+ }
+ }
+ }
+ }
+
+ private Map<String, String> parseBundlesToBeStarted(String entryList) {
+ Map<String, String> bundlesConfiguration = new HashMap<String, String>();
+
+ String[] entries = entryList.split(",");
+ for (String entry : entries) {
+ boolean isAutoStart = entry.contains("@start");
+ String bsn = entry.substring(0, entry.indexOf(BSN_VERSION_SEPARATOR));
+ if (isAutoStart) {
+ bundlesConfiguration.put(bsn, createProductInstruction(bsn));
+ }
+ }
+ return bundlesConfiguration;
+ }
+
+ private String createProductInstruction(String bsn) {
+ if (bsn.equals(Main.SIMPLECONFIGURATOR_BSN)) {
+ return PLUGIN_ELEMENT_PREFIX + "\"" + bsn + "\" " + AUTO_START_INSTRUCTION + " " + START_LEVEL_1 + ELEMENT_SUFFIX;
+ }
+ return PLUGIN_ELEMENT_PREFIX + "\"" + bsn + "\" " + AUTO_START_INSTRUCTION + ELEMENT_SUFFIX;
+ }
+
+ private Map<String, String> initializeProductConfiguration(String launchConfigLocation) throws IOException {
+
+ Properties launchConfig = parseConfigProperties(launchConfigLocation);
+
+ Map<String, String> productConfiguration = new HashMap<String, String>();
+
+ String launcherBundles = launchConfig.getProperty(PROP_LAUNCHER_BUNDLES);
+ if (launcherBundles != null) {
+ productConfiguration.putAll(parseBundlesToBeStarted(launcherBundles));
+ }
+
+ launchConfig.remove(PROP_LAUNCHER_BUNDLES);
+
+ for (String propKey : launchConfig.stringPropertyNames()) {
+ productConfiguration.put(propKey, PROPERTY_PREFIX + "\"" + propKey + "\" value=\"" + launchConfig.getProperty(propKey) + "\"" + ELEMENT_SUFFIX);
+ }
+
+ return productConfiguration;
+ }
+}
diff --git a/org.eclipse.virgo.kernel.build.p2/src/main/java/org/eclipse/virgo/kernel/p2/build/VirgoBuildP2RepoPublisher.java b/org.eclipse.virgo.kernel.build.p2/src/main/java/org/eclipse/virgo/kernel/p2/build/VirgoBuildP2RepoPublisher.java
new file mode 100644
index 00000000..c2521bd2
--- /dev/null
+++ b/org.eclipse.virgo.kernel.build.p2/src/main/java/org/eclipse/virgo/kernel/p2/build/VirgoBuildP2RepoPublisher.java
@@ -0,0 +1,251 @@
+package org.eclipse.virgo.kernel.p2.build;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.IProvisioningAgentProvider;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.engine.IEngine;
+import org.eclipse.equinox.p2.engine.IProfile;
+import org.eclipse.equinox.p2.engine.IProfileRegistry;
+import org.eclipse.equinox.p2.engine.IProvisioningPlan;
+import org.eclipse.equinox.p2.engine.ProvisioningContext;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.planner.IPlanner;
+import org.eclipse.equinox.p2.planner.IProfileChangeRequest;
+import org.eclipse.equinox.p2.query.IQuery;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.query.QueryUtil;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.component.ComponentContext;
+import org.eclipse.virgo.kernel.deployer.p2.VirgoPublisher;
+
+/**
+ * This is a helper class used during building the kernel distribution to create a p2 repository and create a kernel distro for zip operation.
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ * Not thread-safe.
+ */
+public class VirgoBuildP2RepoPublisher {
+
+ private static final String P2_FOLDER = "/p2";
+
+ private static final String OSGI_CONFIG_AREA = "/work/osgi/configuration";
+
+ private static final String TARGET_LOCATION_OFFSET = "/lib/kernel";
+
+ private static final String TARGET_PROFILE = "profile";
+
+ private static final String IU_TO_INSTALL = "installIU";
+
+ private static final String INSTALL_LOCATION = "install.location";
+
+ private static final String SOURCE_P2_REPO = "source.p2.repo";
+
+ private static final String LAUNCH_CONFIG_LOCATION = "launch.config.location";
+
+ private static final String VIRGO_PRODUCT = "virgo.product";
+
+ private static final String PRODUCT_LOCATION = "product.location";
+
+ private static final String INSTALL_KERNEL = "installKernel";
+
+ private static final String P2_REPO_PUBLISH = "p2repoPublish";
+
+ private static final String OPERATION_TYPE = "operationType";
+
+ public void activate(ComponentContext context) throws Exception {
+ BundleContext bundleContext = context.getBundleContext();
+
+ ServiceReference<VirgoPublisher> publisherRef = bundleContext.getServiceReference(VirgoPublisher.class);
+ VirgoPublisher publisher = bundleContext.getService(publisherRef);
+
+ String publishType = System.getProperty(OPERATION_TYPE);
+
+ if (publishType.equals(P2_REPO_PUBLISH)) {
+ String launchConfigLocation = System.getProperty(LAUNCH_CONFIG_LOCATION);
+ String productLocation = System.getProperty(PRODUCT_LOCATION);
+
+ launchConfigLocation = replaceBackslashesWithSlash(launchConfigLocation);
+ productLocation = replaceBackslashesWithSlash(productLocation);
+
+ new ProductFileBuilder().generateProductFile(productLocation, VIRGO_PRODUCT, launchConfigLocation);
+ publisher.publishProduct(productLocation, productLocation);
+ }
+
+ if (publishType.equals(INSTALL_KERNEL)) {
+ // sourceRepo location should start with 'file:' by default
+ String sourceRepo = System.getProperty(SOURCE_P2_REPO);
+ String installLocation = System.getProperty(INSTALL_LOCATION);
+ String installIU = System.getProperty(IU_TO_INSTALL);
+ String targetProfile = System.getProperty(TARGET_PROFILE);
+
+ installLocation = replaceBackslashesWithSlash(installLocation);
+ sourceRepo = replaceBackslashesWithSlash(sourceRepo);
+ installProduct(bundleContext, sourceRepo, installLocation, installIU, targetProfile);
+ }
+
+ // We are done - exit now.
+ System.exit(0);
+ }
+
+ private void installProduct(BundleContext bundleContext, String sourceRepoLocation, String installLocation, String installIU, String targetProfile)
+ throws ProvisionException, URISyntaxException {
+ IProvisioningAgent pAgent = initialiseProvisioningAgentForInstallLocation(bundleContext, installLocation);
+
+ IMetadataRepositoryManager metadataRepoManager = (IMetadataRepositoryManager) pAgent.getService(IMetadataRepositoryManager.class.getName());
+
+ ProvisioningContext provisioningContext = initialiseProvisioningContext(sourceRepoLocation, pAgent, metadataRepoManager);
+
+ IProfile targetSystemProfile = initialiseTargetP2Profile(installLocation, targetProfile, pAgent);
+
+ IInstallableUnit unitToInstall = getKernelProductInstallableUnit(sourceRepoLocation, installIU, metadataRepoManager);
+
+ IProvisioningPlan plan = createPlan(targetSystemProfile, provisioningContext, pAgent, new IInstallableUnit[] { unitToInstall });
+
+ IStatus status = executePlan(pAgent, plan);
+ if (!status.isOK()) {
+ throw new ProvisionException("Failed to install Virgo Kernel product");
+ }
+ }
+
+ private IInstallableUnit getKernelProductInstallableUnit(String sourceRepoLocation, String installIU,
+ IMetadataRepositoryManager metadataRepoManager) throws URISyntaxException, ProvisionException, OperationCanceledException {
+ IMetadataRepository metadataRepo = loadMetadataRepository(sourceRepoLocation, metadataRepoManager);
+
+ IQuery<IInstallableUnit> matchQuery = QueryUtil.createIUQuery(installIU);
+ IQueryResult<IInstallableUnit> result = metadataRepo.query(matchQuery, null);
+ IInstallableUnit unitToInstall = null;
+ if (result.iterator().hasNext()) {
+ unitToInstall = result.iterator().next();
+ }
+ return unitToInstall;
+ }
+
+ private ProvisioningContext initialiseProvisioningContext(String sourceRepoLocation, IProvisioningAgent pAgent,
+ IMetadataRepositoryManager metadataRepoManager) throws URISyntaxException, ProvisionException, OperationCanceledException {
+ IArtifactRepositoryManager artifactRepoManager = (IArtifactRepositoryManager) pAgent.getService(IArtifactRepositoryManager.class.getName());
+
+ metadataRepoManager.loadRepository(new URI(sourceRepoLocation), null);
+ artifactRepoManager.loadRepository(new URI(sourceRepoLocation), null);
+
+ ProvisioningContext provisioningContext = new ProvisioningContext(pAgent);
+ provisioningContext.setMetadataRepositories(metadataRepoManager.getKnownRepositories(0));
+ provisioningContext.setArtifactRepositories(artifactRepoManager.getKnownRepositories(0));
+ return provisioningContext;
+ }
+
+ private IMetadataRepository loadMetadataRepository(String sourceRepoLocation, IMetadataRepositoryManager metadataRepoManager)
+ throws URISyntaxException, ProvisionException, OperationCanceledException {
+ IMetadataRepository metadataRepo = metadataRepoManager.loadRepository(new URI(sourceRepoLocation), null);
+ return metadataRepo;
+ }
+
+ private IProfile initialiseTargetP2Profile(String installLocation, String targetProfile, IProvisioningAgent pAgent) throws ProvisionException {
+ IProfileRegistry registry = (IProfileRegistry) pAgent.getService(IProfileRegistry.class.getName());
+
+ Map<String, String> props = new HashMap<String, String>();
+ props.put(IProfile.PROP_INSTALL_FOLDER, installLocation + TARGET_LOCATION_OFFSET);
+ props.put(IProfile.PROP_CACHE, installLocation + TARGET_LOCATION_OFFSET);
+ props.put(IProfile.PROP_CONFIGURATION_FOLDER, installLocation + OSGI_CONFIG_AREA);
+ String env = getEnvironmentProperty();
+ if (env != null) {
+ props.put(IProfile.PROP_ENVIRONMENTS, env);
+ }
+
+ IProfile targetSystemProfile = registry.addProfile(targetProfile, props);
+ return targetSystemProfile;
+ }
+
+ private IProvisioningAgent initialiseProvisioningAgentForInstallLocation(BundleContext bundleContext, String installLocation)
+ throws URISyntaxException, ProvisionException {
+ ServiceReference<IProvisioningAgentProvider> pAgentRef = bundleContext.getServiceReference(IProvisioningAgentProvider.class);
+ IProvisioningAgentProvider pAgentProvider = bundleContext.getService(pAgentRef);
+
+ String agentInstallLocation = createAgentInstallLocation(installLocation);
+
+ IProvisioningAgent pAgent = pAgentProvider.createAgent(new URI(agentInstallLocation));
+ return pAgent;
+ }
+
+ private String createAgentInstallLocation(String installLocation) {
+ // this is done to avoid 'URI not hierarchical' issue as the ProvisioningAgentProvider accepts hierarchical URIs
+ String agentInstallLocation = "file:/" + installLocation;
+ agentInstallLocation = agentInstallLocation + TARGET_LOCATION_OFFSET + P2_FOLDER;
+ return agentInstallLocation;
+ }
+
+ private IStatus executePlan(IProvisioningAgent pAgent, IProvisioningPlan plan) {
+ IEngine engine = (IEngine) pAgent.getService(IEngine.class.getName());
+ IStatus planStatus = plan.getStatus();
+ if (planStatus.getSeverity() == IStatus.ERROR || planStatus.getSeverity() == IStatus.CANCEL) {
+ return planStatus;
+ }
+
+ if (plan.getInstallerPlan() != null) {
+ IStatus installerPlanStatus = engine.perform(plan.getInstallerPlan(), null);
+ if (!installerPlanStatus.isOK()) {
+ return installerPlanStatus;
+ }
+ }
+ return engine.perform(plan, null);
+ }
+
+ private IProvisioningPlan createPlan(IProfile profile, ProvisioningContext provisioningContext, IProvisioningAgent agent,
+ IInstallableUnit[] unitToInstall) {
+ IPlanner planner = (IPlanner) agent.getService(IPlanner.SERVICE_NAME);
+
+ IProfileChangeRequest request = planner.createChangeRequest(profile);
+ if (unitToInstall != null) {
+ request.addAll(Arrays.asList(unitToInstall));
+ }
+
+ return planner.getProvisioningPlan(request, provisioningContext, null);
+ }
+
+ private String getEnvironmentProperty() {
+ HashMap<String, String> values = new HashMap<String, String>();
+ values.put("osgi.os", "all");
+ values.put("osgi.ws", "all");
+ values.put("osgi.arch", "all");
+ return values.isEmpty() ? null : envToString(values);
+ }
+
+ private String envToString(Map<String, String> context) {
+ StringBuffer result = new StringBuffer();
+ for (Map.Entry<String, String> entry : context.entrySet()) {
+ if (result.length() > 0) {
+ result.append(',');
+ }
+ result.append(entry.getKey());
+ result.append('=');
+ result.append(entry.getValue());
+ }
+ return result.toString();
+ }
+
+ private String replaceBackslashesWithSlash(String location) {
+ location = location.replace("\\", "/");
+ return location;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ */
+ public void deactivate(ComponentContext bundleContext) throws Exception {
+
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.build.p2/src/main/resources/OSGI-INF/kernel.build.p2.xml b/org.eclipse.virgo.kernel.build.p2/src/main/resources/OSGI-INF/kernel.build.p2.xml
new file mode 100644
index 00000000..1e3b5c18
--- /dev/null
+++ b/org.eclipse.virgo.kernel.build.p2/src/main/resources/OSGI-INF/kernel.build.p2.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
+ immediate="true" name="kernel.build.p2">
+ <implementation
+ class="org.eclipse.virgo.kernel.p2.build.VirgoBuildP2RepoPublisher" />
+
+ <reference name="VirgoPublisher"
+ interface="org.eclipse.virgo.kernel.deployer.p2.VirgoPublisher"
+ policy="static"/>
+
+ <reference name="IProvisioningAgent"
+ interface="org.eclipse.equinox.p2.core.IProvisioningAgent"
+ policy="static"/>
+</scr:component>
diff --git a/org.eclipse.virgo.kernel.build.p2/template.mf b/org.eclipse.virgo.kernel.build.p2/template.mf
new file mode 100644
index 00000000..2d80e33f
--- /dev/null
+++ b/org.eclipse.virgo.kernel.build.p2/template.mf
@@ -0,0 +1,23 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Virgo Kernel P2 Builder
+Bundle-Version: 3.0.0
+Main-Class: org.eclipse.virgo.kernel.p2.build.Main
+Service-Component: OSGI-INF/kernel.build.p2.xml
+Bundle-SymbolicName: org.eclipse.virgo.kernel.build.p2
+Import-Template: org.eclipse.equinox.internal.p2.artifact.repository.*;version="0",
+ org.eclipse.equinox.p2.core;version="0",
+ org.eclipse.equinox.p2.engine;version="0",
+ org.eclipse.equinox.p2.metadata;version="0",
+ org.eclipse.equinox.p2.planner;version="0",
+ org.eclipse.equinox.p2.query;version="0",
+ org.eclipse.equinox.p2.repository.artifact;version="0",
+ org.eclipse.equinox.p2.repository.metadata;version="0",
+ org.eclipse.virgo.kernel.p2.publisher;version="0",
+ org.osgi.framework;version="0",
+ org.osgi.service.component;version="0",
+ org.eclipse.core.runtime;version="0",
+ org.eclipse.virgo.kernel.deployer.p2;version="0"
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0"
+Excluded-Exports:
+ *.internal.*
diff --git a/org.eclipse.virgo.kernel.deployer.p2/.classpath b/org.eclipse.virgo.kernel.deployer.p2/.classpath
new file mode 100644
index 00000000..50eb4fe6
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.p2/.classpath
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" path="src/test/resources"/>
+ <classpathentry kind="src" path="src/test/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20110224/org.eclipse.osgi-3.7.0.v20110224.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20110224/org.eclipse.osgi-sources-3.7.0.v20110224.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.core.runtime/3.7.0.v20110110/org.eclipse.core.runtime-3.7.0.v20110110.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.publisher/1.2.0.v20110511/org.eclipse.equinox.p2.publisher-1.2.0.v20110511.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.repository/2.1.0.v20110510/org.eclipse.equinox.p2.repository-2.1.0.v20110510.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.core/2.1.0.v20110502-1955/org.eclipse.equinox.p2.core-2.1.0.v20110502-1955.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.artifact.repository/1.1.100.v20110511-1359/org.eclipse.equinox.p2.artifact.repository-1.1.100.v20110511-1359.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.metadata.repository/1.2.0.v20110511-1359/org.eclipse.equinox.p2.metadata.repository-1.2.0.v20110511-1359.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.common/3.6.0.v20110506/org.eclipse.equinox.common-3.6.0.v20110506.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.metadata/2.1.0.v20110510/org.eclipse.equinox.p2.metadata-2.1.0.v20110510.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/pdepublishing/1.0.0/pdepublishing-1.0.0.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110110/org.eclipse.osgi.services-3.3.0.v20110110.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi.services/3.3.0.v20110110/org.eclipse.osgi.services-sources-3.3.0.v20110110.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.virgo.kernel.deployer.p2/.project b/org.eclipse.virgo.kernel.deployer.p2/.project
new file mode 100644
index 00000000..f1badaff
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.p2/.project
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.virgo.kernel.deployer.p2</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.virgo.kernel.deployer.p2/build.xml b/org.eclipse.virgo.kernel.deployer.p2/build.xml
new file mode 100644
index 00000000..3f8f2b0b
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.p2/build.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.virgo.kernel.deployer.p2">
+
+ <property name="findbugs.exclude.file" value="${basedir}/findbugs-exclude.xml"/>
+ <property file="${basedir}/../build.properties"/>
+ <property file="${basedir}/../build.versions"/>
+ <import file="${basedir}/../virgo-build/weaving/default.xml"/>
+
+</project>
diff --git a/org.eclipse.virgo.kernel.deployer.p2/findbugs-exclude.xml b/org.eclipse.virgo.kernel.deployer.p2/findbugs-exclude.xml
new file mode 100644
index 00000000..ca6b7edc
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.p2/findbugs-exclude.xml
@@ -0,0 +1,8 @@
+<FindBugsFilter>
+ <!-- Exclusions -->
+ <Match>
+ <Bug pattern="ES_COMPARING_PARAMETER_STRING_WITH_EQ"/>
+ <Class name="org.eclipse.virgo.kernel.deployer.core.module.StandardModule"/>
+ <Method name="unwrapNull"/>
+ </Match>
+</FindBugsFilter>
diff --git a/org.eclipse.virgo.kernel.deployer.p2/ivy.xml b/org.eclipse.virgo.kernel.deployer.p2/ivy.xml
new file mode 100644
index 00000000..8a61d895
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.p2/ivy.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="org.eclipse.virgo.kernel" module="${ant.project.name}"/>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.aspectj" name="com.springsource.org.aspectj.weaver" rev="${org.aspectj}" conf="compile->runtime"/>
+
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.core.runtime" rev="${org.eclipse.core.runtime}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi.services" rev="${org.eclipse.osgi.services}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.publisher" rev="${org.eclipse.equinox.p2.publisher}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.repository" rev="${org.eclipse.equinox.p2.repository}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.core" rev="${org.eclipse.equinox.p2.core}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.artifact.repository" rev="${org.eclipse.equinox.p2.artifact.repository}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.metadata.repository" rev="${org.eclipse.equinox.p2.metadata.repository}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.common" rev="${org.eclipse.equinox.common}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.metadata" rev="${org.eclipse.equinox.p2.metadata}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.p2.publisher.eclipse.pdepublishing" rev="1.0.0" conf="provided->runtime"/>
+
+ <!-- Allow Equinox to be upgraded point-wise before rippling -->
+ <override org="org.eclipse.osgi" module="org.eclipse.osgi" rev="${org.eclipse.osgi}"/>
+ </dependencies>
+
+
+</ivy-module>
diff --git a/org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/VirgoPublisher.java b/org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/VirgoPublisher.java
new file mode 100644
index 00000000..de91d261
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/VirgoPublisher.java
@@ -0,0 +1,22 @@
+package org.eclipse.virgo.kernel.deployer.p2;
+
+import java.net.URISyntaxException;
+
+import org.eclipse.equinox.p2.core.ProvisionException;
+
+/**
+ * Common interface for all p2 publishers used within Virgo.
+ *
+ * Implementations of this interface are required to be thread safe.
+ */
+public interface VirgoPublisher {
+
+ /**
+ * Publishes a product and its dependencies in a p2 repository
+ * @param sourceLocation - the location of the folder where the product file is
+ * @param targetLocation - the location of the published repository
+ * @throws ProvisionException - when an error during publishing occurs
+ * @throws URISyntaxException - when the locations have wrong syntax
+ */
+ public void publishProduct(String sourceLocation, String targetLocation) throws ProvisionException, URISyntaxException;
+}
diff --git a/org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/publish/LocalFSVirgoPublisher.java b/org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/publish/LocalFSVirgoPublisher.java
new file mode 100644
index 00000000..84885d9f
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/publish/LocalFSVirgoPublisher.java
@@ -0,0 +1,164 @@
+package org.eclipse.virgo.kernel.deployer.p2.publish;
+
+import java.io.File;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.equinox.internal.p2.artifact.repository.ArtifactRepositoryManager;
+import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository;
+import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepositoryFactory;
+import org.eclipse.equinox.internal.p2.metadata.repository.MetadataRepositoryManager;
+import org.eclipse.equinox.internal.p2.metadata.repository.SimpleMetadataRepositoryFactory;
+import org.eclipse.equinox.internal.p2.publisher.Messages;
+import org.eclipse.equinox.internal.p2.publisher.eclipse.IProductDescriptor;
+import org.eclipse.equinox.internal.p2.publisher.eclipse.ProductFile;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.publisher.IPublisherAction;
+import org.eclipse.equinox.p2.publisher.IPublisherInfo;
+import org.eclipse.equinox.p2.publisher.Publisher;
+import org.eclipse.equinox.p2.publisher.PublisherInfo;
+import org.eclipse.equinox.p2.publisher.eclipse.ProductAction;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.virgo.kernel.deployer.p2.VirgoPublisher;
+import org.eclipse.virgo.kernel.deployer.p2.publish.actions.VirgoBundlesAction;
+import org.eclipse.virgo.kernel.deployer.p2.publish.actions.ZippedResourcesPublisherAction;
+import org.osgi.service.component.ComponentContext;
+
+/**
+ * This {@link VirgoPublisher} handles the local FS publishing of artifacts and products.
+ *
+ * <strong>Concurrent Semantics</strong><br />
+ * Thread-safe.
+ */
+public class LocalFSVirgoPublisher implements VirgoPublisher {
+
+ private static final String ENV_PROPERTY = "all.all.all";
+
+ private static final String VIRGO_PRODUCT = "/virgo.product";
+
+ private static final String[][] VIRGO_MAPPING_RULES = new String[][] {
+ { "(& (classifier=osgi.bundle))", "${repoUrl}/${id}_${version}.jar" },
+ { "(& (classifier=binary))", "${repoUrl}/${id}" },
+ { "(& (classifier=org.eclipse.update.feature))", "${repoUrl}/${id}_${version}.jar" } };;
+
+ private final Object monitor = new Object();
+
+ public void activate(ComponentContext context) {
+ }
+
+ public void deactivate(ComponentContext context) {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void publishProduct(String sourceLocation, String targetLocation) throws ProvisionException, URISyntaxException {
+ synchronized (this.monitor) {
+ IPublisherInfo info = createPublisherInfo(targetLocation);
+ Publisher publisher = new Publisher(info);
+ publisher.publish(createPublisherActionsForQualifiedArtifacts(sourceLocation), null);
+ publisher.publish(createProductAction(sourceLocation, targetLocation), null);
+ }
+ }
+
+ /**
+ * Create the product publisher action. This action will take care of updating the p2 metadata repository with the products description
+ * @param sourceLocation - the folder where the product file is located
+ * @param targetLocation - the location of the target repository that will be updated with the product file definition
+ * @return - return the {@link ProductAction} that will handle the publishing of the product
+ */
+ private IPublisherAction[] createProductAction(String sourceLocation, String targetLocation) {
+ IProductDescriptor productDescriptor = null;
+ String productFile = sourceLocation + VIRGO_PRODUCT;
+ try {
+ productDescriptor = new ProductFile(productFile);
+ } catch (Exception e) {
+ throw new IllegalArgumentException(NLS.bind(Messages.exception_errorLoadingProductFile, productFile, e.toString()));
+ }
+ return new IPublisherAction[] {new ProductAction(targetLocation, productDescriptor, "tooling", null)};
+ }
+
+ /**
+ * Initializes the publisher info used for the publishing operations.
+ * @param targetLocation - the location where a p2 repository will be created with that {@link IPublisherInfo}.
+ * @return - the {@link IPublisherInfo} that will be used to create a p2 repository in the specified location
+ * @throws URISyntaxException - when the URI for the p2 repository is with wrong syntax
+ */
+ private IPublisherInfo createPublisherInfo(String targetLocation) throws URISyntaxException {
+ targetLocation = targetLocation.startsWith("file:") ? targetLocation : "file:" + targetLocation;
+
+ PublisherInfo pInfo = new PublisherInfo();
+
+ pInfo.setConfigurations(new String[] {ENV_PROPERTY});
+
+ initialisePublisherInfoRepositories(targetLocation, pInfo);
+ pInfo.setArtifactOptions(IPublisherInfo.A_PUBLISH | IPublisherInfo.A_INDEX);
+ return pInfo;
+ }
+
+ /**
+ * Initializes the {@link IPublisherInfo} p2 metadata and artifact repositories on the specified location
+ * @param targetLocation - the location where the p2 repository will be published
+ * @param pInfo - the {@link IPublisherInfo} created for the target p2 repository
+ * @throws URISyntaxException - when the URI for the artifact or metadata p2 repositories is with wrong syntax
+ */
+ @SuppressWarnings("unchecked")
+ private void initialisePublisherInfoRepositories(String targetLocation, PublisherInfo pInfo) throws URISyntaxException {
+ IMetadataRepository metadataRepository = new SimpleMetadataRepositoryFactory().create(new URI(targetLocation), "Virgo Metadata Repository",
+ MetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, Collections.EMPTY_MAP);
+
+ IArtifactRepository artifactRepository = new SimpleArtifactRepositoryFactory().create(new URI(targetLocation), "Virgo Artifact Repository",
+ ArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, Collections.EMPTY_MAP);
+
+ ((SimpleArtifactRepository) artifactRepository).setRules(VIRGO_MAPPING_RULES);
+ ((SimpleArtifactRepository) artifactRepository).initializeAfterLoad(new URI(targetLocation));
+
+ pInfo.setMetadataRepository(metadataRepository);
+ pInfo.setArtifactRepository(artifactRepository);
+ }
+
+ /**
+ * Creates {@link IPublisherAction} for each qualified file at the specified location
+ * @param location - a location containing the artifacts that will be published in a p2 repository
+ * @return - an array of {@link IPublisherAction} that will be used for publishing to a p2 repository
+ */
+ private IPublisherAction[] createPublisherActionsForQualifiedArtifacts(String location) {
+ location = location.startsWith("file:") ? location.substring(5) : location;
+
+ File repository = new File(location);
+ List<File> bundles = new ArrayList<File>();
+ List<File> zippedFiles = new ArrayList<File>();
+
+ if (repository.isDirectory()) { // TODO: handle single artifact as directory
+ for (File file : repository.listFiles()) {
+ if (file.getName().endsWith(".jar") || file.isDirectory()) {
+ bundles.add(file);
+ }
+ if (file.getName().endsWith(".zip")) {
+ zippedFiles.add(file);
+ }
+ }
+ } else {
+ if (location.endsWith(".jar")) {
+ bundles.add(new File(location));
+ }
+ }
+ List<IPublisherAction> publisherActions = new ArrayList<IPublisherAction>();
+ if (bundles.size() > 0) {
+ VirgoBundlesAction bundleAction = new VirgoBundlesAction(bundles.toArray(new File[bundles.size()]));
+ publisherActions.add(bundleAction);
+ }
+ if (zippedFiles.size() > 0) {
+ ZippedResourcesPublisherAction zippedAction = new ZippedResourcesPublisherAction(zippedFiles.toArray(new File[zippedFiles.size()]));
+ publisherActions.add(zippedAction);
+ }
+ return publisherActions.toArray(new IPublisherAction[publisherActions.size()]);
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/publish/actions/VirgoBundlesAction.java b/org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/publish/actions/VirgoBundlesAction.java
new file mode 100644
index 00000000..5083a854
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/publish/actions/VirgoBundlesAction.java
@@ -0,0 +1,358 @@
+package org.eclipse.virgo.kernel.deployer.p2.publish.actions;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IInstallableUnitFragment;
+import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.IRequirement;
+import org.eclipse.equinox.p2.metadata.IUpdateDescriptor;
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.metadata.VersionRange;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitFragmentDescription;
+import org.eclipse.equinox.p2.publisher.IPublisherInfo;
+import org.eclipse.equinox.p2.publisher.IPublisherResult;
+import org.eclipse.equinox.p2.publisher.AdviceFileAdvice;
+import org.eclipse.equinox.p2.publisher.eclipse.BundlesAction;
+import org.eclipse.equinox.p2.publisher.eclipse.IBundleShapeAdvice;
+import org.eclipse.equinox.p2.query.IQueryResult;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.spi.p2.publisher.LocalizationHelper;
+import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
+import org.eclipse.osgi.service.resolver.BundleDescription;
+import org.eclipse.osgi.service.resolver.BundleSpecification;
+import org.eclipse.osgi.service.resolver.ExportPackageDescription;
+import org.eclipse.osgi.service.resolver.HostSpecification;
+import org.eclipse.osgi.service.resolver.ImportPackageSpecification;
+import org.osgi.framework.Constants;
+
+/**
+ * This class provides extension to the standard p2 BundlesAction by including the whole manifest in the published metadata.
+ *
+ */
+public class VirgoBundlesAction extends BundlesAction {
+
+ private static final String CAPABILITY_NS_OSGI_BUNDLE = "osgi.bundle"; //$NON-NLS-1$
+ private static final String CAPABILITY_NS_OSGI_FRAGMENT = "osgi.fragment"; //$NON-NLS-1$
+
+ private static final String[] BUNDLE_IU_PROPERTY_MAP = {Constants.BUNDLE_NAME, IInstallableUnit.PROP_NAME, Constants.BUNDLE_DESCRIPTION, IInstallableUnit.PROP_DESCRIPTION, Constants.BUNDLE_VENDOR, IInstallableUnit.PROP_PROVIDER, Constants.BUNDLE_CONTACTADDRESS, IInstallableUnit.PROP_CONTACT, Constants.BUNDLE_DOCURL, IInstallableUnit.PROP_DOC_URL, Constants.BUNDLE_UPDATELOCATION, IInstallableUnit.PROP_BUNDLE_LOCALIZATION, Constants.BUNDLE_LOCALIZATION, IInstallableUnit.PROP_BUNDLE_LOCALIZATION};
+
+ public VirgoBundlesAction(BundleDescription[] bundles) {
+ super(bundles);
+ }
+
+ public VirgoBundlesAction(File[] files) {
+ super(files);
+ }
+
+ @Override
+ protected void generateBundleIUs(BundleDescription[] bundleDescriptions, IPublisherInfo info, IPublisherResult result, IProgressMonitor monitor) {
+ // This assumes that hosts are processed before fragments because for each fragment the host
+ // is queried for the strings that should be translated.
+ for (int i = 0; i < bundleDescriptions.length; i++) {
+ if (monitor.isCanceled())
+ throw new OperationCanceledException();
+
+ BundleDescription bd = bundleDescriptions[i];
+ if (bd != null && bd.getSymbolicName() != null && bd.getVersion() != null) {
+ //First check to see if there is already an IU around for this
+ IInstallableUnit bundleIU = queryForIU(result, bundleDescriptions[i].getSymbolicName(), PublisherHelper.fromOSGiVersion(bd.getVersion()));
+ IArtifactKey key = createBundleArtifactKey(bd.getSymbolicName(), bd.getVersion().toString());
+ if (bundleIU == null) {
+ createAdviceFileAdvice(bundleDescriptions[i], info);
+ // Create the bundle IU according to any shape advice we have
+ bundleIU = createBundleIU(bd, key, info);
+ }
+
+ File location = new File(bd.getLocation());
+ IArtifactDescriptor ad = PublisherHelper.createArtifactDescriptor(info, key, location);
+ processArtifactPropertiesAdvice(bundleIU, ad, info);
+
+ // Publish according to the shape on disk
+ File bundleLocation = new File(bd.getLocation());
+ if (bundleLocation.isDirectory())
+ publishArtifact(ad, bundleLocation, bundleLocation.listFiles(), info);
+ else
+ publishArtifact(ad, bundleLocation, info);
+
+ IInstallableUnit fragment = null;
+ if (isFragment(bd)) {
+ // TODO: Need a test case for multiple hosts
+ String hostId = bd.getHost().getName();
+ VersionRange hostVersionRange = PublisherHelper.fromOSGiVersionRange(bd.getHost().getVersionRange());
+ IQueryResult<IInstallableUnit> hosts = queryForIUs(result, hostId, hostVersionRange);
+
+ for (Iterator<IInstallableUnit> itor = hosts.iterator(); itor.hasNext();) {
+ IInstallableUnit host = itor.next();
+ String fragmentId = makeHostLocalizationFragmentId(bd.getSymbolicName());
+ fragment = queryForIU(result, fragmentId, PublisherHelper.fromOSGiVersion(bd.getVersion()));
+ if (fragment == null) {
+ String[] externalizedStrings = getExternalizedStrings(host);
+ fragment = createHostLocalizationFragment(bundleIU, bd, hostId, externalizedStrings);
+ }
+ }
+
+ }
+
+ result.addIU(bundleIU, IPublisherResult.ROOT);
+ if (fragment != null)
+ result.addIU(fragment, IPublisherResult.NON_ROOT);
+
+ InstallableUnitDescription[] others = processAdditionalInstallableUnitsAdvice(bundleIU, info);
+ for (int iuIndex = 0; others != null && iuIndex < others.length; iuIndex++) {
+ result.addIU(MetadataFactory.createInstallableUnit(others[iuIndex]), IPublisherResult.ROOT);
+ }
+ }
+ }
+ }
+
+ public static IInstallableUnit createBundleIU(BundleDescription bd, IArtifactKey key, IPublisherInfo info) {
+ @SuppressWarnings("unchecked")
+ Map<String, String> manifest = (Map<String, String>) bd.getUserObject();
+ Map<Locale, Map<String, String>> manifestLocalizations = null;
+ if (manifest != null && bd.getLocation() != null)
+ manifestLocalizations = getManifestLocalizations(manifest, new File(bd.getLocation()));
+ InstallableUnitDescription iu = new MetadataFactory.InstallableUnitDescription();
+ iu.setSingleton(bd.isSingleton());
+ iu.setId(bd.getSymbolicName());
+ iu.setVersion(PublisherHelper.fromOSGiVersion(bd.getVersion()));
+ iu.setFilter(bd.getPlatformFilter());
+ iu.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(bd.getSymbolicName(), computeUpdateRange(bd.getVersion()), IUpdateDescriptor.NORMAL, null));
+ iu.setArtifacts(new IArtifactKey[] {key});
+ iu.setTouchpointType(PublisherHelper.TOUCHPOINT_OSGI);
+
+ boolean isFragment = bd.getHost() != null;
+ // boolean requiresAFragment = isFragment ? false : requireAFragment(bd, manifest);
+
+ //Process the required bundles
+ BundleSpecification requiredBundles[] = bd.getRequiredBundles();
+ ArrayList<IRequirement> reqsDeps = new ArrayList<IRequirement>();
+ // if (requiresAFragment)
+ // reqsDeps.add(MetadataFactory.createRequiredCapability(CAPABILITY_TYPE_OSGI_FRAGMENTS, bd.getSymbolicName(), VersionRange.emptyRange, null, false, false));
+ if (isFragment)
+ reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, bd.getHost().getName(), PublisherHelper.fromOSGiVersionRange(bd.getHost().getVersionRange()), null, false, false));
+ for (int j = 0; j < requiredBundles.length; j++)
+ reqsDeps.add(MetadataFactory.createRequirement(CAPABILITY_NS_OSGI_BUNDLE, requiredBundles[j].getName(), PublisherHelper.fromOSGiVersionRange(requiredBundles[j].getVersionRange()), null, requiredBundles[j].isOptional(), false));
+
+ // Process the import packages
+ ImportPackageSpecification osgiImports[] = bd.getImportPackages();
+ for (int i = 0; i < osgiImports.length; i++) {
+ // TODO we need to sort out how we want to handle wild-carded dynamic imports - for now we ignore them
+ ImportPackageSpecification importSpec = osgiImports[i];
+ String importPackageName = importSpec.getName();
+ if (importPackageName.indexOf('*') != -1)
+ continue;
+ VersionRange versionRange = PublisherHelper.fromOSGiVersionRange(importSpec.getVersionRange());
+ //TODO this needs to be refined to take into account all the attribute handled by imports
+ reqsDeps.add(MetadataFactory.createRequirement(PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE, importPackageName, versionRange, null, isOptional(importSpec), false));
+ }
+ iu.setRequirements(reqsDeps.toArray(new IRequirement[reqsDeps.size()]));
+
+ // Create set of provided capabilities
+ ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
+ providedCapabilities.add(PublisherHelper.createSelfCapability(bd.getSymbolicName(), PublisherHelper.fromOSGiVersion(bd.getVersion())));
+ providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_BUNDLE, bd.getSymbolicName(), PublisherHelper.fromOSGiVersion(bd.getVersion())));
+
+ // Process the export package
+ ExportPackageDescription exports[] = bd.getExportPackages();
+ for (int i = 0; i < exports.length; i++) {
+ //TODO make sure that we support all the refinement on the exports
+ providedCapabilities.add(MetadataFactory.createProvidedCapability(PublisherHelper.CAPABILITY_NS_JAVA_PACKAGE, exports[i].getName(), PublisherHelper.fromOSGiVersion(exports[i].getVersion())));
+ }
+ // Here we add a bundle capability to identify bundles
+ if (manifest != null && manifest.containsKey("Eclipse-SourceBundle")) //$NON-NLS-1$
+ providedCapabilities.add(SOURCE_BUNDLE_CAPABILITY);
+ else
+ providedCapabilities.add(BUNDLE_CAPABILITY);
+ if (isFragment)
+ providedCapabilities.add(MetadataFactory.createProvidedCapability(CAPABILITY_NS_OSGI_FRAGMENT, bd.getHost().getName(), PublisherHelper.fromOSGiVersion(bd.getVersion())));
+
+ if (manifestLocalizations != null) {
+ for (Entry<Locale, Map<String, String>> locEntry : manifestLocalizations.entrySet()) {
+ Locale locale = locEntry.getKey();
+ Map<String, String> translatedStrings = locEntry.getValue();
+ for (Entry<String, String> entry : translatedStrings.entrySet()) {
+ iu.setProperty(locale.toString() + '.' + entry.getKey(), entry.getValue());
+ }
+ providedCapabilities.add(PublisherHelper.makeTranslationCapability(bd.getSymbolicName(), locale));
+ }
+ }
+ iu.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
+ processUpdateDescriptorAdvice(iu, info);
+ processCapabilityAdvice(iu, info);
+
+ // Set certain properties from the manifest header attributes as IU properties.
+ // The values of these attributes may be localized (strings starting with '%')
+ // with the translated values appearing in the localization IU fragments
+ // associated with the bundle IU.
+ if (manifest != null) {
+ int i = 0;
+ while (i < BUNDLE_IU_PROPERTY_MAP.length) {
+ if (manifest.containsKey(BUNDLE_IU_PROPERTY_MAP[i])) {
+ String value = manifest.get(BUNDLE_IU_PROPERTY_MAP[i]);
+ if (value != null && value.length() > 0) {
+ iu.setProperty(BUNDLE_IU_PROPERTY_MAP[i + 1], value);
+ }
+ }
+ i += 2;
+ }
+ }
+
+ // Define the immutable metadata for this IU. In this case immutable means
+ // that this is something that will not impact the configuration.
+ Map<String, String> touchpointData = new HashMap<String, String>();
+ touchpointData.put("manifest", toManifestString(manifest)); //$NON-NLS-1$
+ if (isDir(bd, info))
+ touchpointData.put("zipped", "true"); //$NON-NLS-1$ //$NON-NLS-2$
+ processTouchpointAdvice(iu, touchpointData, info);
+
+ processInstallableUnitPropertiesAdvice(iu, info);
+ return MetadataFactory.createInstallableUnit(iu);
+ }
+
+ private static String toManifestString(Map<String, String> p) {
+ if (p == null)
+ return null;
+ StringBuffer result = new StringBuffer();
+ for (String key : p.keySet()) {
+ String value = p.get(key);
+ if (value != null)
+ result.append(key).append(": ").append(value).append('\n'); //$NON-NLS-1$
+ }
+ return result.length() == 0 ? null : result.toString();
+ }
+
+ private static boolean isOptional(ImportPackageSpecification importedPackage) {
+ if (importedPackage.getDirective(Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_DYNAMIC) || importedPackage.getDirective(Constants.RESOLUTION_DIRECTIVE).equals(ImportPackageSpecification.RESOLUTION_OPTIONAL))
+ return true;
+ return false;
+ }
+
+ static VersionRange computeUpdateRange(org.osgi.framework.Version base) {
+ VersionRange updateRange = null;
+ if (!base.equals(org.osgi.framework.Version.emptyVersion)) {
+ updateRange = new VersionRange(Version.emptyVersion, true, PublisherHelper.fromOSGiVersion(base), false);
+ } else {
+ updateRange = VersionRange.emptyRange;
+ }
+ return updateRange;
+ }
+
+ private static boolean isDir(BundleDescription bundle, IPublisherInfo info) {
+ Collection<IBundleShapeAdvice> advice = info.getAdvice(null, true, bundle.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundle.getVersion()), IBundleShapeAdvice.class);
+ // if the advice has a shape, use it
+ if (advice != null && !advice.isEmpty()) {
+ // we know there is some advice but if there is more than one, take the first.
+ String shape = advice.iterator().next().getShape();
+ if (shape != null)
+ return shape.equals(IBundleShapeAdvice.DIR);
+ }
+ // otherwise go with whatever we figured out from the manifest or the shape on disk
+ @SuppressWarnings("unchecked")
+ Map<String, String> manifest = (Map<String, String>) bundle.getUserObject();
+ String format = manifest.get(BUNDLE_SHAPE);
+ return DIR.equals(format);
+ }
+
+ // Return a map from locale to property set for the manifest localizations
+ // from the given bundle directory and given bundle localization path/name
+ // manifest property value.
+ private static Map<Locale, Map<String, String>> getManifestLocalizations(Map<String, String> manifest, File bundleLocation) {
+ Map<Locale, Map<String, String>> localizations;
+ Locale defaultLocale = null; // = Locale.ENGLISH; // TODO: get this from GeneratorInfo
+ String[] bundleManifestValues = getManifestCachedValues(manifest);
+ String bundleLocalization = bundleManifestValues[BUNDLE_LOCALIZATION_INDEX]; // Bundle localization is the last one in the list
+
+ if ("jar".equalsIgnoreCase(new Path(bundleLocation.getName()).getFileExtension()) && //$NON-NLS-1$
+ bundleLocation.isFile()) {
+ localizations = LocalizationHelper.getJarPropertyLocalizations(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
+ //localizations = getJarManifestLocalization(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
+ } else {
+ localizations = LocalizationHelper.getDirPropertyLocalizations(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
+ // localizations = getDirManifestLocalization(bundleLocation, bundleLocalization, defaultLocale, bundleManifestValues);
+ }
+
+ return localizations;
+ }
+
+ private void createAdviceFileAdvice(BundleDescription bundleDescription, IPublisherInfo publisherInfo) {
+ String location = bundleDescription.getLocation();
+ if (location == null)
+ return;
+
+ AdviceFileAdvice advice = new AdviceFileAdvice(bundleDescription.getSymbolicName(), PublisherHelper.fromOSGiVersion(bundleDescription.getVersion()), new Path(location), AdviceFileAdvice.BUNDLE_ADVICE_FILE);
+ if (advice.containsAdvice())
+ publisherInfo.addAdvice(advice);
+
+ }
+
+ private boolean isFragment(BundleDescription bd) {
+ return (bd.getHost() != null ? true : false);
+ }
+
+ /**
+ * @param id
+ * @return the id for the iu fragment containing localized properties
+ * for the fragment with the given id.
+ */
+ private static String makeHostLocalizationFragmentId(String id) {
+ return id + ".translated_host_properties"; //$NON-NLS-1$
+ }
+
+ private IInstallableUnitFragment createHostLocalizationFragment(IInstallableUnit bundleIU, BundleDescription bd, String hostId, String[] hostBundleManifestValues) {
+ Map<Locale, Map<String, String>> hostLocalizations = getHostLocalizations(new File(bd.getLocation()), hostBundleManifestValues);
+ if (hostLocalizations == null || hostLocalizations.isEmpty())
+ return null;
+ return createLocalizationFragmentOfHost(bd, hostId, hostBundleManifestValues, hostLocalizations);
+ }
+
+ /*
+ * @param hostId
+ * @param bd
+ * @param locale
+ * @param localizedStrings
+ * @return installableUnitFragment
+ */
+ private static IInstallableUnitFragment createLocalizationFragmentOfHost(BundleDescription bd, String hostId, String[] hostManifestValues, Map<Locale, Map<String, String>> hostLocalizations) {
+ InstallableUnitFragmentDescription fragment = new MetadataFactory.InstallableUnitFragmentDescription();
+ String fragmentId = makeHostLocalizationFragmentId(bd.getSymbolicName());
+ fragment.setId(fragmentId);
+ fragment.setVersion(PublisherHelper.fromOSGiVersion(bd.getVersion())); // TODO: is this a meaningful version?
+
+ HostSpecification hostSpec = bd.getHost();
+ IRequirement[] hostReqs = new IRequirement[] {MetadataFactory.createRequirement(IInstallableUnit.NAMESPACE_IU_ID, hostSpec.getName(), PublisherHelper.fromOSGiVersionRange(hostSpec.getVersionRange()), null, false, false, false)};
+ fragment.setHost(hostReqs);
+
+ fragment.setSingleton(true);
+ fragment.setProperty(InstallableUnitDescription.PROP_TYPE_FRAGMENT, Boolean.TRUE.toString());
+
+ // Create a provided capability for each locale and add the translated properties.
+ ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>(hostLocalizations.keySet().size());
+ providedCapabilities.add(PublisherHelper.createSelfCapability(fragmentId, fragment.getVersion()));
+ for (Entry<Locale, Map<String, String>> localeEntry : hostLocalizations.entrySet()) {
+ Locale locale = localeEntry.getKey();
+ Map<String, String> translatedStrings = localeEntry.getValue();
+ for (Entry<String, String> entry : translatedStrings.entrySet()) {
+ fragment.setProperty(locale.toString() + '.' + entry.getKey(), entry.getValue());
+ }
+ providedCapabilities.add(PublisherHelper.makeTranslationCapability(hostId, locale));
+ }
+ fragment.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
+
+ return MetadataFactory.createInstallableUnitFragment(fragment);
+ }
+
+}
diff --git a/org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/publish/actions/ZippedResourcesPublisherAction.java b/org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/publish/actions/ZippedResourcesPublisherAction.java
new file mode 100644
index 00000000..d7f5761e
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.p2/src/main/java/org/eclipse/virgo/kernel/deployer/p2/publish/actions/ZippedResourcesPublisherAction.java
@@ -0,0 +1,118 @@
+
+package org.eclipse.virgo.kernel.deployer.p2.publish.actions;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
+import org.eclipse.equinox.internal.p2.publisher.Messages;
+import org.eclipse.equinox.p2.metadata.IArtifactKey;
+import org.eclipse.equinox.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.p2.metadata.IProvidedCapability;
+import org.eclipse.equinox.p2.metadata.MetadataFactory;
+import org.eclipse.equinox.p2.metadata.MetadataFactory.InstallableUnitDescription;
+import org.eclipse.equinox.p2.metadata.Version;
+import org.eclipse.equinox.p2.publisher.AbstractPublisherAction;
+import org.eclipse.equinox.p2.publisher.IPublisherAction;
+import org.eclipse.equinox.p2.publisher.IPublisherInfo;
+import org.eclipse.equinox.p2.publisher.IPublisherResult;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
+import org.eclipse.equinox.spi.p2.publisher.PublisherHelper;
+
+/**
+ * Publishes a zipped resource artifact
+ * <strong>Concurrent Semantics</strong><br />
+ * Thread-safe.
+ */
+public class ZippedResourcesPublisherAction extends AbstractPublisherAction {
+
+ private static final Version DEFAULT_VERSION = Version.createOSGi(1, 0, 0);
+
+ private static final String ZIPPED_RESOURCES_NAME = "zipped.resources";
+
+ private final File[] locations;
+
+ private final Object monitor = new Object();
+
+ public ZippedResourcesPublisherAction(File[] locations) {
+ this.locations = locations;
+ }
+
+ /**
+ * Executes the action, resulting in a published artifact and metadata for it
+ *
+ * @param publisherInfo - initialized {@link IPublisherInfo} with repositories to be used by this {@link IPublisherAction}
+ * @param results - {@link IPublisherResult} that will be passed on the next publishing stages
+ * @param monitor - {@link IProgressMonitor} used for monitoring the progress of this action, can be <b>null</b>
+ * @return - the {@link IStatus} containing the result of the operation
+ */
+ @Override
+ public IStatus perform(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
+ if (this.locations == null) {
+ throw new IllegalStateException(Messages.exception_noBundlesOrLocations);
+ }
+ synchronized (this.monitor) {
+ setPublisherInfo(publisherInfo);
+ try {
+ publishZippedIUs(publisherInfo, results, monitor);
+ } catch (OperationCanceledException e) {
+ return Status.CANCEL_STATUS;
+ }
+ }
+ return Status.OK_STATUS;
+ }
+
+ private void publishZippedIUs(IPublisherInfo publisherInfo, IPublisherResult results, IProgressMonitor monitor) {
+
+ InstallableUnitDescription iuDescription = createZippedResourceIUDescriptionShell();
+
+ addZippedResourcesToIUDescription(publisherInfo, iuDescription);
+
+ setTouchpointInstructionsToIUDescription(iuDescription);
+
+ results.addIU(MetadataFactory.createInstallableUnit(iuDescription), IPublisherResult.ROOT);
+
+ }
+
+ private void setTouchpointInstructionsToIUDescription(InstallableUnitDescription iuDescription) {
+ Map<String, String> touchpointData = new HashMap<String, String>();
+ // the install folder is moved two folders up in order to ensure Virgo's root structure is kept the same
+ touchpointData.put("install", "unzip(source:@artifact, target:${installFolder}/../../);");
+ touchpointData.put("uninstall", "cleanupzip(source:@artifact, target:${installFolder}/../../);");
+ iuDescription.addTouchpointData(MetadataFactory.createTouchpointData(touchpointData));
+ }
+
+ private void addZippedResourcesToIUDescription(IPublisherInfo publisherInfo, InstallableUnitDescription iuDescription) {
+ List<IArtifactKey> zippedArtifacts = new ArrayList<IArtifactKey>();
+
+ for (File zippedFile : this.locations) {
+ IArtifactKey key = new ArtifactKey(PublisherHelper.BINARY_ARTIFACT_CLASSIFIER, zippedFile.getName(), DEFAULT_VERSION);
+ IArtifactDescriptor zipDescriptor = PublisherHelper.createArtifactDescriptor(publisherInfo, key, zippedFile);
+ publishArtifact(zipDescriptor, zippedFile, publisherInfo);
+ zippedArtifacts.add(key);
+ }
+
+ iuDescription.setArtifacts(zippedArtifacts.toArray(new IArtifactKey[zippedArtifacts.size()]));
+ }
+
+ private InstallableUnitDescription createZippedResourceIUDescriptionShell() {
+ InstallableUnitDescription iuDescription = new MetadataFactory.InstallableUnitDescription();
+ iuDescription.setId(ZIPPED_RESOURCES_NAME);
+ iuDescription.setVersion(DEFAULT_VERSION);
+
+ ArrayList<IProvidedCapability> providedCapabilities = new ArrayList<IProvidedCapability>();
+ IProvidedCapability p2IUCapability = MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, iuDescription.getId(),
+ DEFAULT_VERSION);
+ providedCapabilities.add(p2IUCapability);
+ iuDescription.setCapabilities(providedCapabilities.toArray(new IProvidedCapability[providedCapabilities.size()]));
+ iuDescription.setTouchpointType(MetadataFactory.createTouchpointType("org.eclipse.equinox.p2.native", DEFAULT_VERSION));
+ return iuDescription;
+ }
+}
diff --git a/org.eclipse.virgo.kernel.deployer.p2/src/main/resources/OSGI-INF/org.eclipse.virgo.kernel.deployer.p2.publisher.xml b/org.eclipse.virgo.kernel.deployer.p2/src/main/resources/OSGI-INF/org.eclipse.virgo.kernel.deployer.p2.publisher.xml
new file mode 100644
index 00000000..bcc3dc10
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.p2/src/main/resources/OSGI-INF/org.eclipse.virgo.kernel.deployer.p2.publisher.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
+ immediate="true" name="org.eclipse.virgo.kernel.deployer.p2.publisher">
+ <implementation class="org.eclipse.virgo.kernel.deployer.p2.publish.LocalFSVirgoPublisher" />
+
+ <reference name="IProvisioningAgent"
+ interface="org.eclipse.equinox.p2.core.IProvisioningAgent"
+ policy="static"/>
+
+ <service>
+ <provide interface="org.eclipse.virgo.kernel.deployer.p2.VirgoPublisher"/>
+ </service>
+</scr:component> \ No newline at end of file
diff --git a/org.eclipse.virgo.kernel.deployer.p2/template.mf b/org.eclipse.virgo.kernel.deployer.p2/template.mf
new file mode 100644
index 00000000..898ea3ae
--- /dev/null
+++ b/org.eclipse.virgo.kernel.deployer.p2/template.mf
@@ -0,0 +1,26 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Virgo Kernel P2 Deployer
+Bundle-SymbolicName: org.eclipse.virgo.kernel.deployer.p2
+Bundle-Version: 3.0.0
+Service-Component: OSGI-INF/org.eclipse.virgo.kernel.deployer.p2.publisher.xml
+Import-Template:
+ org.osgi.framework.*;version="0",
+ org.eclipse.osgi.*;version="0",
+ org.osgi.service.*;version="0",
+ org.eclipse.equinox.p2.core;version="0",
+ org.eclipse.equinox.internal.p2.artifact.repository;version="0",
+ org.eclipse.equinox.internal.p2.artifact.repository.simple;version="0",
+ org.eclipse.equinox.internal.p2.metadata.*;version="0",
+ org.eclipse.equinox.internal.p2.publisher;version="0",
+ org.eclipse.equinox.internal.p2.publisher.eclipse;version="0",
+ org.eclipse.equinox.p2.publisher;version="0",
+ org.eclipse.equinox.p2.publisher.eclipse;version="0",
+ org.eclipse.equinox.p2.repository.artifact;version="0",
+ org.eclipse.equinox.p2.repository.metadata;version="0",
+ org.eclipse.core.runtime;version="0",
+ org.eclipse.equinox.p2.metadata.*;version="0",
+ org.eclipse.equinox.p2.query;version="0",
+ org.eclipse.equinox.spi.p2.publisher;version="0"
+Excluded-Exports:
+ *.internal.*
diff --git a/org.eclipse.virgo.kernel.deployer/.classpath b/org.eclipse.virgo.kernel.deployer/.classpath
index 8938e0cc..8dea08ed 100644
--- a/org.eclipse.virgo.kernel.deployer/.classpath
+++ b/org.eclipse.virgo.kernel.deployer/.classpath
@@ -1,58 +1,67 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" path="src/main/resources">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="src" output="target/test-classes" path="src/test/resources">
- <attributes>
- <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.M05/org.eclipse.virgo.util.common-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.M05/org.eclipse.virgo.util.common-sources-3.0.0.M05.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.M05/org.eclipse.virgo.util.io-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.M05/org.eclipse.virgo.util.io-sources-3.0.0.M05.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.M05/org.eclipse.virgo.util.math-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.M05/org.eclipse.virgo.util.math-sources-3.0.0.M05.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.M05/org.eclipse.virgo.util.osgi-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.M05/org.eclipse.virgo.util.osgi-sources-3.0.0.M05.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.M05/org.eclipse.virgo.util.parser.manifest-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.M05/org.eclipse.virgo.util.parser.manifest-sources-3.0.0.M05.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20110224/org.eclipse.osgi-3.7.0.v20110224.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20110224/org.eclipse.osgi-sources-3.7.0.v20110224.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/3.0.0.M05/org.eclipse.virgo.osgi.extensions.equinox-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/3.0.0.M05/org.eclipse.virgo.osgi.extensions.equinox-sources-3.0.0.M05.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-sources-3.0.5.RELEASE.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-1.2.1.jar" sourcepath="/DEV_DIR/external-artifacts/non-spring-build/org.springframework.osgi/org.springframework.osgi.extender/1.2.1.RC1-SFW3/org.springframework.osgi.extender-sources.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-sources-1.2.1.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.M05/org.eclipse.virgo.repository-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.M05/org.eclipse.virgo.repository-sources-3.0.0.M05.jar"/>
- <classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.M05/org.eclipse.virgo.medic-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.M05/org.eclipse.virgo.medic-sources-3.0.0.M05.jar">
- <attributes>
- <attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.0.0.M05/org.eclipse.virgo.medic.core-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.0.0.M05/org.eclipse.virgo.medic.core-sources-3.0.0.M05.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.services"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.M05/org.eclipse.virgo.medic.test-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.M05/org.eclipse.virgo.medic.test-sources-3.0.0.M05.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.M05/org.eclipse.virgo.teststubs.osgi-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/1.0.0.CI-B39/org.eclipse.virgo.teststubs.osgi-sources-1.0.0.CI-B39.jar"/>
- <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.event/1.2.100.v20110110/org.eclipse.equinox.event-1.2.100.v20110110.jar"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java">
+ <attributes>
+ <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" path="src/main/resources">
+ <attributes>
+ <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="false"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+ <attributes>
+ <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources">
+ <attributes>
+ <attribute name="com.springsource.server.ide.jdt.core.test.classpathentry" value="true"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.aspectj/com.springsource.org.aspectj.runtime/1.6.6.RELEASE/com.springsource.org.aspectj.runtime-1.6.6.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.M05/org.eclipse.virgo.util.common-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.common/3.0.0.M05/org.eclipse.virgo.util.common-sources-3.0.0.M05.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.M05/org.eclipse.virgo.util.io-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.io/3.0.0.M05/org.eclipse.virgo.util.io-sources-3.0.0.M05.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.M05/org.eclipse.virgo.util.math-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.math/3.0.0.M05/org.eclipse.virgo.util.math-sources-3.0.0.M05.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.M05/org.eclipse.virgo.util.osgi-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.M05/org.eclipse.virgo.util.osgi-sources-3.0.0.M05.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.M05/org.eclipse.virgo.util.parser.manifest-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.M05/org.eclipse.virgo.util.parser.manifest-sources-3.0.0.M05.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20110224/org.eclipse.osgi-3.7.0.v20110224.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20110224/org.eclipse.osgi-sources-3.7.0.v20110224.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/3.0.0.M05/org.eclipse.virgo.osgi.extensions.equinox-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.extensions.equinox/3.0.0.M05/org.eclipse.virgo.osgi.extensions.equinox-sources-3.0.0.M05.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.beans/3.0.5.RELEASE/org.springframework.beans-sources-3.0.5.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.core/3.0.5.RELEASE/org.springframework.core-sources-3.0.5.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-3.0.5.RELEASE.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework/org.springframework.context/3.0.5.RELEASE/org.springframework.context-sources-3.0.5.RELEASE.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.extender/1.2.1/org.springframework.osgi.extender-1.2.1.jar" sourcepath="/DEV_DIR/external-artifacts/non-spring-build/org.springframework.osgi/org.springframework.osgi.extender/1.2.1.RC1-SFW3/org.springframework.osgi.extender-sources.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-1.2.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.springframework.osgi/org.springframework.osgi.core/1.2.1/org.springframework.osgi.core-sources-1.2.1.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.M05/org.eclipse.virgo.repository-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.repository/org.eclipse.virgo.repository/3.0.0.M05/org.eclipse.virgo.repository-sources-3.0.0.M05.jar"/>
+ <classpathentry kind="con" path="org.eclipse.ajdt.core.ASPECTJRT_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.M05/org.eclipse.virgo.medic-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.M05/org.eclipse.virgo.medic-sources-3.0.0.M05.jar">
+ <attributes>
+ <attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.0.0.M05/org.eclipse.virgo.medic.core-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.core/3.0.0.M05/org.eclipse.virgo.medic.core-sources-3.0.0.M05.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.api/1.6.1/com.springsource.slf4j.api-sources-1.6.1.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-1.6.1.jar" sourcepath="/KERNEL_IVY_CACHE/org.slf4j/com.springsource.slf4j.nop/1.6.1/com.springsource.slf4j.nop-sources-1.6.1.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.services"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.M05/org.eclipse.virgo.medic.test-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic.test/3.0.0.M05/org.eclipse.virgo.medic.test-sources-3.0.0.M05.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.artifact"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.M05/org.eclipse.virgo.teststubs.osgi-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/1.0.0.CI-B39/org.eclipse.virgo.teststubs.osgi-sources-1.0.0.CI-B39.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.event/1.2.100.v20110110/org.eclipse.equinox.event-1.2.100.v20110110.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.core.runtime/3.7.0.v20110110/org.eclipse.core.runtime-3.7.0.v20110110.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.publisher/1.2.0.v20110511/org.eclipse.equinox.p2.publisher-1.2.0.v20110511.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.repository/2.1.0.v20110510/org.eclipse.equinox.p2.repository-2.1.0.v20110510.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.core/2.1.0.v20110502-1955/org.eclipse.equinox.p2.core-2.1.0.v20110502-1955.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.artifact.repository/1.1.100.v20110511-1359/org.eclipse.equinox.p2.artifact.repository-1.1.100.v20110511-1359.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.metadata.repository/1.2.0.v20110511-1359/org.eclipse.equinox.p2.metadata.repository-1.2.0.v20110511-1359.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.common/3.6.0.v20110506/org.eclipse.equinox.common-3.6.0.v20110506.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.p2.metadata/2.1.0.v20110510/org.eclipse.equinox.p2.metadata-2.1.0.v20110510.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/pdepublishing/1.0.0/pdepublishing-1.0.0.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.virgo.kernel.deployer/.project b/org.eclipse.virgo.kernel.deployer/.project
index 79dd1e24..f166e188 100644
--- a/org.eclipse.virgo.kernel.deployer/.project
+++ b/org.eclipse.virgo.kernel.deployer/.project
@@ -1,37 +1,42 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.virgo.kernel.deployer</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.ajdt.core.ajbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.springframework.ide.eclipse.core.springbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.springsource.server.ide.bundlor.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.ajdt.ui.ajnature</nature>
- <nature>com.springsource.server.ide.facet.core.bundlenature</nature>
- <nature>org.springframework.ide.eclipse.core.springnature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>com.springsource.server.dev.eclipse.serverdevelopmentnature</nature>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.virgo.kernel.deployer</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.ajdt.core.ajbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.core.springbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.springsource.server.ide.bundlor.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.ajdt.ui.ajnature</nature>
+ <nature>com.springsource.server.ide.facet.core.bundlenature</nature>
+ <nature>org.springframework.ide.eclipse.core.springnature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>com.springsource.server.dev.eclipse.serverdevelopmentnature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.virgo.kernel.deployer/ivy.xml b/org.eclipse.virgo.kernel.deployer/ivy.xml
index 193766df..415c7155 100644
--- a/org.eclipse.virgo.kernel.deployer/ivy.xml
+++ b/org.eclipse.virgo.kernel.deployer/ivy.xml
@@ -1,67 +1,66 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
-<ivy-module
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
- version="1.3">
-
- <info organisation="org.eclipse.virgo.kernel" module="${ant.project.name}"/>
-
- <configurations>
- <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
- </configurations>
-
- <publications>
- <artifact name="${ant.project.name}"/>
- <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
- </publications>
-
- <dependencies>
- <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
- <dependency org="org.easymock" name="com.springsource.org.easymock" rev="${org.easymock}" conf="test->runtime"/>
- <dependency org="org.eclipse.virgo.teststubs" name="org.eclipse.virgo.teststubs.osgi" rev="${org.eclipse.virgo.teststubs}" conf="test->runtime"/>
-
- <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="compile->runtime"/>
- <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.event" rev="${org.eclipse.equinox.event}" conf="compile->runtime"/>
-
- <dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="compile->runtime"/>
- <dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="compile->runtime"/>
- <dependency org="org.springframework" name="org.springframework.aop" rev="${org.springframework}" conf="compile->runtime"/>
- <dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="compile->runtime"/>
-
- <dependency org="org.eclipse.osgi" name="org.eclipse.osgi.services" rev="${org.eclipse.osgi.services}" conf="compile->runtime"/>
- <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.cm" rev="${org.eclipse.equinox.cm}" conf="compile->runtime"/>
-
- <dependency org="org.springframework.osgi" name="org.springframework.osgi.core" rev="${org.springframework.osgi}" conf="compile->runtime"/>
- <dependency org="org.springframework.osgi" name="org.springframework.osgi.extender" rev="${org.springframework.osgi}" conf="compile->runtime"/>
- <dependency org="org.springframework.osgi" name="org.springframework.osgi.io" rev="${org.springframework.osgi}" conf="compile->runtime"/>
-
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.core" rev="latest.integration" conf="aspects->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.osgi" rev="latest.integration" conf="aspects->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.services" rev="latest.integration" conf="aspects->compile"/>
- <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.artifact" rev="latest.integration" conf="compile->compile"/>
-
- <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.common" rev="${org.eclipse.virgo.util}" conf="compile->compile"/>
- <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.io" rev="${org.eclipse.virgo.util}" conf="compile->compile"/>
- <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.jmx" rev="${org.eclipse.virgo.util}" conf="aspects->runtime"/>
- <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.math" rev="${org.eclipse.virgo.util}" conf="compile->compile"/>
- <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.osgi" rev="${org.eclipse.virgo.util}" conf="compile->compile"/>
-
- <dependency org="org.slf4j" name="com.springsource.slf4j.api" rev="${org.slf4j}" conf="compile->runtime"/>
- <dependency org="org.slf4j" name="com.springsource.slf4j.nop" rev="${org.slf4j}" conf="test->runtime"/>
-
- <dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic" rev="${org.eclipse.virgo.medic}" conf="aspects, compile->runtime"/>
- <dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic.core" rev="${org.eclipse.virgo.medic}" conf="runtime->runtime"/>
- <dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic.test" rev="${org.eclipse.virgo.medic}" conf="test->runtime"/>
-
- <dependency name='org.eclipse.virgo.repository' rev='${org.eclipse.virgo.repository}' conf='compile->compile' org='org.eclipse.virgo.repository'/>
-
- <override org="org.springframework" rev="${org.springframework}"/>
- <override org="org.eclipse.virgo.util" rev="${org.eclipse.virgo.util}"/>
-
- <!-- Allow Equinox to be upgraded point-wise before rippling -->
- <override org="org.eclipse.osgi" module="org.eclipse.osgi" rev="${org.eclipse.osgi}"/>
- </dependencies>
-
-
-</ivy-module>
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="http://ivyrep.jayasoft.org/ivy-doc.xsl"?>
+<ivy-module
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="http://incubator.apache.org/ivy/schemas/ivy.xsd"
+ version="1.3">
+
+ <info organisation="org.eclipse.virgo.kernel" module="${ant.project.name}"/>
+
+ <configurations>
+ <include file="${virgo.build.dir}/common/default-ivy-configurations.xml"/>
+ </configurations>
+
+ <publications>
+ <artifact name="${ant.project.name}"/>
+ <artifact name="${ant.project.name}-sources" type="src" ext="jar"/>
+ </publications>
+
+ <dependencies>
+ <dependency org="org.junit" name="com.springsource.org.junit" rev="${org.junit}" conf="test->runtime"/>
+ <dependency org="org.easymock" name="com.springsource.org.easymock" rev="${org.easymock}" conf="test->runtime"/>
+ <dependency org="org.eclipse.virgo.teststubs" name="org.eclipse.virgo.teststubs.osgi" rev="${org.eclipse.virgo.teststubs}" conf="test->runtime"/>
+
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi" rev="${org.eclipse.osgi}" conf="compile->runtime"/>
+
+ <dependency org="org.springframework" name="org.springframework.core" rev="${org.springframework}" conf="compile->runtime"/>
+ <dependency org="org.springframework" name="org.springframework.context" rev="${org.springframework}" conf="compile->runtime"/>
+ <dependency org="org.springframework" name="org.springframework.aop" rev="${org.springframework}" conf="compile->runtime"/>
+ <dependency org="org.springframework" name="org.springframework.beans" rev="${org.springframework}" conf="compile->runtime"/>
+
+ <dependency org="org.eclipse.osgi" name="org.eclipse.osgi.services" rev="${org.eclipse.osgi.services}" conf="compile->runtime"/>
+ <dependency org="org.eclipse.osgi" name="org.eclipse.equinox.cm" rev="${org.eclipse.equinox.cm}" conf="compile->runtime"/>
+
+ <dependency org="org.springframework.osgi" name="org.springframework.osgi.core" rev="${org.springframework.osgi}" conf="compile->runtime"/>
+ <dependency org="org.springframework.osgi" name="org.springframework.osgi.extender" rev="${org.springframework.osgi}" conf="compile->runtime"/>
+ <dependency org="org.springframework.osgi" name="org.springframework.osgi.io" rev="${org.springframework.osgi}" conf="compile->runtime"/>
+
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.core" rev="latest.integration" conf="aspects->compile"/>
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.osgi" rev="latest.integration" conf="aspects->compile"/>
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.services" rev="latest.integration" conf="aspects->compile"/>
+ <dependency org="org.eclipse.virgo.kernel" name="org.eclipse.virgo.kernel.artifact" rev="latest.integration" conf="compile->compile"/>
+
+ <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.common" rev="${org.eclipse.virgo.util}" conf="compile->compile"/>
+ <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.io" rev="${org.eclipse.virgo.util}" conf="compile->compile"/>
+ <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.jmx" rev="${org.eclipse.virgo.util}" conf="aspects->runtime"/>
+ <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.math" rev="${org.eclipse.virgo.util}" conf="compile->compile"/>
+ <dependency org="org.eclipse.virgo.util" name="org.eclipse.virgo.util.osgi" rev="${org.eclipse.virgo.util}" conf="compile->compile"/>
+
+ <dependency org="org.slf4j" name="com.springsource.slf4j.api" rev="${org.slf4j}" conf="compile->runtime"/>
+ <dependency org="org.slf4j" name="com.springsource.slf4j.nop" rev="${org.slf4j}" conf="test->runtime"/>
+
+ <dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic" rev="${org.eclipse.virgo.medic}" conf="aspects, compile->runtime"/>
+ <dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic.core" rev="${org.eclipse.virgo.medic}" conf="runtime->runtime"/>
+ <dependency org="org.eclipse.virgo.medic" name="org.eclipse.virgo.medic.test" rev="${org.eclipse.virgo.medic}" conf="test->runtime"/>
+
+ <dependency name='org.eclipse.virgo.repository' rev='${org.eclipse.virgo.repository}' conf='compile->compile' org='org.eclipse.virgo.repository'/>
+
+ <override org="org.springframework" rev="${org.springframework}"/>
+ <override org="org.eclipse.virgo.util" rev="${org.eclipse.virgo.util}"/>
+
+ <!-- Allow Equinox to be upgraded point-wise before rippling -->
+ <override org="org.eclipse.osgi" module="org.eclipse.osgi" rev="${org.eclipse.osgi}"/>
+ </dependencies>
+
+
+</ivy-module>
diff --git a/org.eclipse.virgo.kernel.deployer/template.mf b/org.eclipse.virgo.kernel.deployer/template.mf
index 7b38699e..0c2f947c 100644
--- a/org.eclipse.virgo.kernel.deployer/template.mf
+++ b/org.eclipse.virgo.kernel.deployer/template.mf
@@ -1,32 +1,32 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Virgo Kernel Deployer
-Bundle-SymbolicName: org.eclipse.virgo.kernel.deployer
-Bundle-Version: 3.0.0
-Import-Template:
- org.eclipse.virgo.kernel.*;version="${version:[=.=.=, =.+1)}",
- org.eclipse.virgo.util.*;version="${org.eclipse.virgo.util:[=.=.=, =.+1)}",
- org.eclipse.virgo.repository.*;version="${org.eclipse.virgo.repository:[=.=.=, =.+1)}",
- org.eclipse.virgo.medic.*;version="${org.eclipse.virgo.medic:[=.=.=, =.+1)}",
- org.slf4j.*;version="${org.slf4j:[=.=.=, +1)}",
- org.aspectj.*;version="${org.aspectj:[=.=.=.=, +1)}",
- org.springframework.*;version="${org.springframework:[2.5.6, =.+1)}",
- org.springframework.osgi.*;version="${org.springframework.osgi:[=.=.=, +1]}",
- org.osgi.framework.*;version="0",
- org.eclipse.osgi.*;version="0",
- org.osgi.service.*;version="0",
- org.osgi.util.tracker.*;version="0",
- org.eclipse.equinox.region.*;version="${org.eclipse.equinox.region:[=.=.=, =.+1)}",
- javax.management.*;version="0",
- javax.xml.*;version="0",
- org.xml.*;version="0",
- org.w3c.*;version="0"
-Excluded-Imports:
- org.eclipse.virgo.osgi.extensions.*
-Excluded-Exports:
- org.eclipse.virgo.kernel.deployer.app.*,
- org.eclipse.virgo.kernel.deployer.core.module.*,
- org.eclipse.virgo.kernel.deployer.core.parse.*,
- org.eclipse.virgo.kernel.deployer.lib.*,
- org.eclipse.virgo.kernel.deployer.management.*,
- *.internal.*
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Virgo Kernel Deployer
+Bundle-SymbolicName: org.eclipse.virgo.kernel.deployer
+Bundle-Version: 3.0.0
+Import-Template:
+ org.eclipse.virgo.kernel.*;version="${version:[=.=.=, =.+1)}",
+ org.eclipse.virgo.util.*;version="${org.eclipse.virgo.util:[=.=.=, =.+1)}",
+ org.eclipse.virgo.repository.*;version="${org.eclipse.virgo.repository:[=.=.=, =.+1)}",
+ org.eclipse.virgo.medic.*;version="${org.eclipse.virgo.medic:[=.=.=, =.+1)}",
+ org.slf4j.*;version="${org.slf4j:[=.=.=, +1)}",
+ org.aspectj.*;version="${org.aspectj:[=.=.=.=, +1)}",
+ org.springframework.*;version="${org.springframework:[2.5.6, =.+1)}",
+ org.springframework.osgi.*;version="${org.springframework.osgi:[=.=.=, +1]}",
+ org.osgi.framework.*;version="0",
+ org.eclipse.osgi.*;version="0",
+ org.osgi.service.*;version="0",
+ org.osgi.util.tracker.*;version="0",
+ org.eclipse.equinox.region.*;version="${org.eclipse.equinox.region:[=.=.=, =.+1)}",
+ javax.management.*;version="0",
+ javax.xml.*;version="0",
+ org.xml.*;version="0",
+ org.w3c.*;version="0"
+Excluded-Imports:
+ org.eclipse.virgo.osgi.extensions.*
+Excluded-Exports:
+ org.eclipse.virgo.kernel.deployer.app.*,
+ org.eclipse.virgo.kernel.deployer.core.module.*,
+ org.eclipse.virgo.kernel.deployer.core.parse.*,
+ org.eclipse.virgo.kernel.deployer.lib.*,
+ org.eclipse.virgo.kernel.deployer.management.*,
+ *.internal.*
diff --git a/org.eclipse.virgo.kernel.userregionfactory/.classpath b/org.eclipse.virgo.kernel.userregionfactory/.classpath
index f563c4a1..067110f1 100644
--- a/org.eclipse.virgo.kernel.userregionfactory/.classpath
+++ b/org.eclipse.virgo.kernel.userregionfactory/.classpath
@@ -1,24 +1,30 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src/main/java"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
- <classpathentry kind="src" path="src/main/resources"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20110224/org.eclipse.osgi-3.7.0.v20110224.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
- <classpathentry kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.M05/org.eclipse.virgo.medic-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar">
- <attributes>
- <attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
- </attributes>
- </classpathentry>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.0.0.M05/org.eclipse.virgo.osgi.launcher-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/2.2.0.D-20101207145732/org.eclipse.virgo.osgi.launcher-sources-2.2.0.D-20101207145732.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.M05/org.eclipse.virgo.util.osgi-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/2.2.0.D-20101207150035/org.eclipse.virgo.util.osgi-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.M05/org.eclipse.virgo.util.parser.manifest-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-sources-2.2.0.D-20101207150035.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.M05/org.eclipse.virgo.teststubs.osgi-3.0.0.M05.jar"/>
- <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.region/1.0.0.v20110503/org.eclipse.equinox.region-1.0.0.v20110503.jar"/>
- <classpathentry kind="output" path="target/classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src/main/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry kind="src" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-4.7.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.junit/com.springsource.org.junit/4.7.0/com.springsource.org.junit-sources-4.7.0.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20110224/org.eclipse.osgi-3.7.0.v20110224.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.osgi/3.7.0.v20101022/org.eclipse.osgi-sources-3.7.0.v20101022.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-2.3.0.jar" sourcepath="/KERNEL_IVY_CACHE/org.easymock/com.springsource.org.easymock/2.3.0/com.springsource.org.easymock-sources-2.3.0.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/org.eclipse.virgo.kernel.core"/>
+ <classpathentry kind="src" path="/org.eclipse.virgo.kernel.osgi"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/3.0.0.M05/org.eclipse.virgo.medic-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.medic/org.eclipse.virgo.medic/1.0.0.CI-B20/org.eclipse.virgo.medic-sources-1.0.0.CI-B20.jar">
+ <attributes>
+ <attribute name="org.eclipse.ajdt.aspectpath" value="org.eclipse.ajdt.aspectpath"/>
+ </attributes>
+ </classpathentry>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/3.0.0.M05/org.eclipse.virgo.osgi.launcher-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.osgi/org.eclipse.virgo.osgi.launcher/2.2.0.D-20101207145732/org.eclipse.virgo.osgi.launcher-sources-2.2.0.D-20101207145732.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.M05/org.eclipse.virgo.util.osgi-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.osgi/3.0.0.M05/org.eclipse.virgo.util.osgi-sources-3.0.0.M05.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/3.0.0.M05/org.eclipse.virgo.util.parser.manifest-3.0.0.M05.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.virgo.util/org.eclipse.virgo.util.parser.manifest/2.2.0.D-20101207150035/org.eclipse.virgo.util.parser.manifest-sources-2.2.0.D-20101207150035.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.virgo.teststubs/org.eclipse.virgo.teststubs.osgi/3.0.0.M05/org.eclipse.virgo.teststubs.osgi-3.0.0.M05.jar"/>
+ <classpathentry kind="var" path="KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.region/1.0.0.v20110503/org.eclipse.equinox.region-1.0.0.v20110503.jar" sourcepath="/KERNEL_IVY_CACHE/org.eclipse.osgi/org.eclipse.equinox.region/1.0.0.v20110503/org.eclipse.equinox.region-1.0.0.v20110503.jar"/>
+ <classpathentry kind="lib" path="C:/DEV/git/org.eclipse.virgo.kernel/ivy-cache/repository/org.eclipse.osgi/org.eclipse.equinox.p2.core/2.1.0.v20110502-1955/org.eclipse.equinox.p2.core-2.1.0.v20110502-1955.jar"/>
+ <classpathentry kind="lib" path="C:/DEV/git/org.eclipse.virgo.kernel/ivy-cache/repository/org.eclipse.osgi/org.eclipse.equinox.p2.engine/2.1.0.v20110511/org.eclipse.equinox.p2.engine-2.1.0.v20110511.jar"/>
+ <classpathentry kind="lib" path="C:/DEV/git/org.eclipse.virgo.kernel/ivy-cache/repository/org.eclipse.osgi/org.eclipse.equinox.p2.metadata/2.1.0.v20110510/org.eclipse.equinox.p2.metadata-2.1.0.v20110510.jar"/>
+ <classpathentry kind="lib" path="C:/DEV/git/org.eclipse.virgo.kernel/ivy-cache/repository/org.eclipse.osgi/org.eclipse.equinox.p2.publisher/1.2.0.v20110511/org.eclipse.equinox.p2.publisher-1.2.0.v20110511.jar"/>
+ <classpathentry kind="lib" path="C:/DEV/git/org.eclipse.virgo.kernel/ivy-cache/repository/org.eclipse.osgi/org.eclipse.core.runtime/3.7.0.v20110110/org.eclipse.core.runtime-3.7.0.v20110110.jar"/>
+ <classpathentry kind="lib" path="C:/DEV/git/org.eclipse.virgo.kernel/ivy-cache/repository/org.eclipse.osgi/org.eclipse.equinox.common/3.6.0.v20110506/org.eclipse.equinox.common-3.6.0.v20110506.jar"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
diff --git a/org.eclipse.virgo.kernel.userregionfactory/.project b/org.eclipse.virgo.kernel.userregionfactory/.project
index 95e65506..030ebc3a 100644
--- a/org.eclipse.virgo.kernel.userregionfactory/.project
+++ b/org.eclipse.virgo.kernel.userregionfactory/.project
@@ -1,35 +1,40 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.virgo.kernel.userregionfactory</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.wst.common.project.facet.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>com.springsource.server.ide.bundlor.core.builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.springframework.ide.eclipse.core.springbuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>com.springsource.server.ide.facet.core.bundlenature</nature>
- <nature>org.springframework.ide.eclipse.core.springnature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.virgo.kernel.userregionfactory</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.wst.common.project.facet.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.springsource.server.ide.bundlor.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.core.springbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ds.core.builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.springsource.server.ide.facet.core.bundlenature</nature>
+ <nature>org.springframework.ide.eclipse.core.springnature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java b/org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java
index 98ddd727..4c6ea2e0 100644
--- a/org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java
+++ b/org.eclipse.virgo.kernel.userregionfactory/src/main/java/org/eclipse/virgo/kernel/userregionfactory/Activator.java
@@ -44,7 +44,6 @@ import org.eclipse.virgo.util.osgi.manifest.ImportedPackage;
import org.eclipse.virgo.util.osgi.manifest.RequireBundle;
import org.eclipse.virgo.util.osgi.manifest.RequiredBundle;
import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
import org.osgi.framework.Constants;
@@ -52,6 +51,7 @@ import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.Version;
import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.component.ComponentContext;
import org.osgi.service.event.Event;
import org.osgi.service.event.EventAdmin;
@@ -64,7 +64,7 @@ import org.osgi.service.event.EventAdmin;
* Not thread safe.
*
*/
-public final class Activator implements BundleActivator {
+public final class Activator {
private static final String KERNEL_REGION_NAME = "org.eclipse.equinox.region.kernel";
@@ -119,9 +119,8 @@ public final class Activator implements BundleActivator {
/**
* {@inheritDoc}
*/
- @Override
- public void start(BundleContext bundleContext) throws Exception {
- this.bundleContext = bundleContext;
+ public void activate(ComponentContext componentContext) throws Exception {
+ this.bundleContext = componentContext.getBundleContext();
this.dumpGenerator = getPotentiallyDelayedService(bundleContext, DumpGenerator.class);
RegionDigraph regionDigraph = getPotentiallyDelayedService(bundleContext, RegionDigraph.class);
this.eventAdmin = getPotentiallyDelayedService(bundleContext, EventAdmin.class);
@@ -367,8 +366,7 @@ public final class Activator implements BundleActivator {
/**
* {@inheritDoc}
*/
- @Override
- public void stop(BundleContext context) throws Exception {
+ public void deactivate(ComponentContext context) throws Exception {
}
private static <T> T getPotentiallyDelayedService(BundleContext context, Class<T> serviceClass) throws TimeoutException, InterruptedException {
diff --git a/org.eclipse.virgo.kernel.userregionfactory/src/main/resources/OSGI-INF/userregionfactory.xml b/org.eclipse.virgo.kernel.userregionfactory/src/main/resources/OSGI-INF/userregionfactory.xml
new file mode 100644
index 00000000..91372349
--- /dev/null
+++ b/org.eclipse.virgo.kernel.userregionfactory/src/main/resources/OSGI-INF/userregionfactory.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" immediate="true" name="User Region Factory Component">
+ <implementation class="org.eclipse.virgo.kernel.userregionfactory.Activator"/>
+ <reference name="EventLogger"
+ interface="org.eclipse.virgo.medic.eventlog.EventLogger"
+ policy="static"/>
+ <reference name="DumpGenerator"
+ interface="org.eclipse.virgo.medic.dump.DumpGenerator"
+ policy="static"/>
+ <reference name="ConfigAdmin"
+ interface="org.osgi.service.cm.ConfigurationAdmin"
+ policy="static"/>
+ <reference name="EventAdmin"
+ interface="org.osgi.service.event.EventAdmin"
+ policy="static"/>
+ <reference name="Shutdown"
+ interface="org.eclipse.virgo.kernel.core.Shutdown"
+ policy="static"/>
+ <reference name="RegionDigraph"
+ interface="org.eclipse.equinox.region.RegionDigraph"
+ policy="static"/>
+ <reference name="Repository"
+ interface="org.eclipse.virgo.repository.Repository"
+ policy="static"/>
+</scr:component> \ No newline at end of file
diff --git a/org.eclipse.virgo.kernel.userregionfactory/template.mf b/org.eclipse.virgo.kernel.userregionfactory/template.mf
index b645996e..f96b410c 100644
--- a/org.eclipse.virgo.kernel.userregionfactory/template.mf
+++ b/org.eclipse.virgo.kernel.userregionfactory/template.mf
@@ -3,6 +3,7 @@ Bundle-ManifestVersion: 2
Bundle-Name: Virgo Kernel User Region Factory
Bundle-SymbolicName: org.eclipse.virgo.kernel.userregionfactory
Bundle-Version: 2.2.0
+Service-Component: OSGI-INF/userregionfactory.xml
Import-Template:
org.eclipse.virgo.kernel.*;version="${version:[=.=.=, =.+1)}",
org.eclipse.virgo.util.*;version="${org.eclipse.virgo.util:[=.=.=, =.+1)}",
@@ -11,9 +12,9 @@ Import-Template:
org.osgi.framework.*;version="0",
org.osgi.service.*;version="0",
org.eclipse.virgo.medic.*;version="${org.eclipse.virgo.medic:[=.=.=, =.+1)}",
- org.eclipse.equinox.region.*;version="${org.eclipse.equinox.region:[=.=.=, =.+1)}"
+ org.eclipse.equinox.region.*;version="${org.eclipse.equinox.region:[=.=.=, =.+1)}",
+ org.osgi.service.component.*;version="0"
Import-Package: org.aspectj.lang;version="0"
-Bundle-Activator: org.eclipse.virgo.kernel.userregionfactory.Activator
Excluded-Imports: org.easymock,
org.eclipse.virgo.osgi.launcher.*,
org.eclipse.virgo.teststubs.*

Back to the top