Skip to content

Commit

Permalink
Fix issue when executing using gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
vogti committed Apr 12, 2023
1 parent 9f7cb6d commit 916dd17
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions core/src/main/java/org/polypheny/db/plugins/PolyPluginManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public class PolyPluginManager extends DefaultPluginManager {

static {
final File jarFile = new File( PolyPluginManager.class.getProtectionDomain().getCodeSource().getLocation().getPath() );
File pluginsFolder = PolyphenyHomeDirManager.getInstance().registerNewFolder( "plugins" );
if ( jarFile.isFile() ) { // Run with JAR file
File pluginsFolder = PolyphenyHomeDirManager.getInstance().registerNewFolder( "plugins" );
try {
final JarFile jar = new JarFile( jarFile );
final Enumeration<JarEntry> entries = jar.entries();
Expand All @@ -104,16 +104,14 @@ public class PolyPluginManager extends DefaultPluginManager {
}
jar.close();
} catch ( Exception e ) {
// Ignore
// ignore
}
pluginManager = new PolyPluginManager( Path.of( pluginsFolder.getPath() ) );
} else {
pluginManager = new PolyPluginManager(
Path.of( PolyphenyHomeDirManager.getInstance().registerNewFolder( "plugins" ).getPath() ),
Path.of( "../build/plugins" ),
Path.of( "./build/plugins" ),
Path.of( "../../build/plugins" ) );
}
pluginManager = new PolyPluginManager(
Path.of( PolyphenyHomeDirManager.getInstance().registerNewFolder( "plugins" ).getPath() ),
Path.of( "../build/plugins" ),
Path.of( "./build/plugins" ),
Path.of( "../../build/plugins" ) );
}


Expand Down Expand Up @@ -156,7 +154,6 @@ public static void init( boolean resetPluginsOnStartup ) {
List<PluginWrapper> startedPlugins = pluginManager.getStartedPlugins();
for ( PluginWrapper plugin : startedPlugins ) {
String pluginId = plugin.getDescriptor().getPluginId();

log.info( String.format( "Plugin '%s' added", pluginId ) );
}
}
Expand Down

0 comments on commit 916dd17

Please sign in to comment.