@@ -262,9 +262,10 @@ public String getComponentName() {
262
262
return "MSOpenTechTools.AzurePlugin" ;
263
263
}
264
264
265
- // plugin will be installed into plugins-sandbox in debug model
265
+ // currently we didn't have a better way to know if it is in debug model.
266
+ // the code suppose we are under debug model if the plugin root path contains 'sandbox' for Gradle default debug path
266
267
private boolean isDebugModel () {
267
- return PluginUtil .getPluginRootDirectory ().contains ("plugins- sandbox" );
268
+ return PluginUtil .getPluginRootDirectory ().contains ("sandbox" );
268
269
}
269
270
270
271
/**
@@ -273,20 +274,18 @@ private boolean isDebugModel() {
273
274
*/
274
275
private void copyPluginComponents () {
275
276
try {
276
- if (!isDebugModel ()) {
277
- for (AzureLibrary azureLibrary : AzureLibrary .LIBRARIES ) {
278
- if (azureLibrary .getLocation () != null ) {
279
- if (!new File (pluginFolder + File .separator + azureLibrary .getLocation ()).exists ()) {
280
- for (String entryName : Utils .getJarEntries (pluginFolder + File .separator + "lib" + File .separator + CommonConst .PLUGIN_NAME + ".jar" , azureLibrary .getLocation ())) {
281
- new File (pluginFolder + File .separator + entryName ).getParentFile ().mkdirs ();
282
- copyResourceFile (entryName , pluginFolder + File .separator + entryName );
283
- }
277
+ extractJobViewResource ();
278
+ for (AzureLibrary azureLibrary : AzureLibrary .LIBRARIES ) {
279
+ if (azureLibrary .getLocation () != null ) {
280
+ if (!new File (pluginFolder + File .separator + azureLibrary .getLocation ()).exists ()) {
281
+ for (String entryName : Utils .getJarEntries (pluginFolder + File .separator + "lib" + File .separator + CommonConst .PLUGIN_NAME + ".jar" , azureLibrary .getLocation ())) {
282
+ new File (pluginFolder + File .separator + entryName ).getParentFile ().mkdirs ();
283
+ copyResourceFile (entryName , pluginFolder + File .separator + entryName );
284
284
}
285
285
}
286
286
}
287
287
}
288
288
289
- extractJobViewResource ();
290
289
} catch (Exception e ) {
291
290
LOG .error (e .getMessage (), e );
292
291
}
0 commit comments