mirror of
https://github.com/theonedev/onedev.git
synced 2025-12-08 18:26:30 +00:00
Reset commons.jsw version
This commit is contained in:
parent
45e4956ddb
commit
f1705d4558
@ -106,7 +106,7 @@
|
||||
<dependency>
|
||||
<groupId>com.pmease</groupId>
|
||||
<artifactId>commons.jsw</artifactId>
|
||||
<version>3.5.14</version>
|
||||
<version>1.0.1</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@ -138,29 +138,35 @@ public class Bootstrap {
|
||||
}
|
||||
|
||||
ClassLoader appClassLoader = new URLClassLoader(urls.toArray(new URL[0]), Bootstrap.class.getClassLoader());
|
||||
ClassLoader originClassLoader = Thread.currentThread().getContextClassLoader();
|
||||
Thread.currentThread().setContextClassLoader(appClassLoader);
|
||||
|
||||
String appLoaderClassName = System.getProperty(APP_LOADER_PROPERTY_NAME);
|
||||
if (appLoaderClassName == null)
|
||||
appLoaderClassName = DEFAULT_APP_LOADER;
|
||||
|
||||
final Lifecycle appLoader;
|
||||
try {
|
||||
Class<?> appLoaderClass = appClassLoader.loadClass(appLoaderClassName);
|
||||
appLoader = (Lifecycle) appLoaderClass.newInstance();
|
||||
appLoader.start();
|
||||
} catch (Exception e) {
|
||||
throw BootstrapUtils.unchecked(e);
|
||||
}
|
||||
|
||||
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||
public void run() {
|
||||
try {
|
||||
appLoader.stop();
|
||||
} catch (Exception e) {
|
||||
throw BootstrapUtils.unchecked(e);
|
||||
}
|
||||
String appLoaderClassName = System.getProperty(APP_LOADER_PROPERTY_NAME);
|
||||
if (appLoaderClassName == null)
|
||||
appLoaderClassName = DEFAULT_APP_LOADER;
|
||||
|
||||
final Lifecycle appLoader;
|
||||
try {
|
||||
Class<?> appLoaderClass = appClassLoader.loadClass(appLoaderClassName);
|
||||
appLoader = (Lifecycle) appLoaderClass.newInstance();
|
||||
appLoader.start();
|
||||
} catch (Exception e) {
|
||||
throw BootstrapUtils.unchecked(e);
|
||||
}
|
||||
});
|
||||
|
||||
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||
public void run() {
|
||||
try {
|
||||
appLoader.stop();
|
||||
} catch (Exception e) {
|
||||
throw BootstrapUtils.unchecked(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
} finally {
|
||||
Thread.currentThread().setContextClassLoader(originClassLoader);
|
||||
}
|
||||
}
|
||||
|
||||
private static void configureLogback() {
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<version>1.0.0</version>
|
||||
</parent>
|
||||
<artifactId>commons.jsw</artifactId>
|
||||
<version>3.5.14</version>
|
||||
<version>1.0.1</version>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
@ -54,5 +54,4 @@
|
||||
<url>http://artifact.pmease.com/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</project>
|
||||
Loading…
x
Reference in New Issue
Block a user