diff options
-rw-r--r-- | demo/app/pom.xml | 26 | ||||
-rw-r--r-- | pf4j/pom.xml | 18 | ||||
-rw-r--r-- | pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java | 9 |
3 files changed, 23 insertions, 30 deletions
diff --git a/demo/app/pom.xml b/demo/app/pom.xml index 818be11..834eca0 100644 --- a/demo/app/pom.xml +++ b/demo/app/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - + <parent> <groupId>ro.fortsoft.pf4j.demo</groupId> <artifactId>pf4j-demo-parent</artifactId> @@ -15,11 +15,11 @@ <properties> <main.class>ro.fortsoft.pf4j.demo.Boot</main.class> - <slf4j.version>1.6.4</slf4j.version> + <slf4j.version>1.7.5</slf4j.version> </properties> - + <build> - <plugins> + <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>2.3</version> @@ -41,7 +41,7 @@ </execution> </executions> </plugin> - + <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> @@ -56,7 +56,7 @@ </archive> </configuration> </plugin> - + <plugin> <artifactId>maven-deploy-plugin</artifactId> <configuration> @@ -71,13 +71,13 @@ <groupId>ro.fortsoft.pf4j</groupId> <artifactId>pf4j</artifactId> <version>${project.version}</version> - </dependency> + </dependency> <dependency> <groupId>ro.fortsoft.pf4j.demo</groupId> <artifactId>pf4j-demo-api</artifactId> <version>${project.version}</version> - </dependency> + </dependency> <!-- Logs --> <dependency> @@ -88,21 +88,15 @@ <dependency> <groupId>org.slf4j</groupId> - <artifactId>jul-to-slf4j</artifactId> + <artifactId>slf4j-log4j12</artifactId> <version>${slf4j.version}</version> </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>${slf4j.version}</version> - </dependency> - - <dependency> <groupId>commons-lang</groupId> <artifactId>commons-lang</artifactId> <version>2.4</version> </dependency> </dependencies> - + </project> diff --git a/pf4j/pom.xml b/pf4j/pom.xml index 862ba4b..00e6cc6 100644 --- a/pf4j/pom.xml +++ b/pf4j/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - + <parent> <groupId>ro.fortsoft.pf4j</groupId> <artifactId>pf4j-parent</artifactId> @@ -25,19 +25,19 @@ </plugin> </plugins> </build> - + <dependencies> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> - <version>1.6.4</version> + <version>1.7.5</version> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.8.1</version> + <scope>test</scope> </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.8.1</version> - <scope>test</scope> - </dependency> </dependencies> </project> diff --git a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java index c4ffedf..22f899d 100644 --- a/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java +++ b/pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java @@ -432,7 +432,6 @@ public class DefaultPluginManager implements PluginManager { throw new IllegalArgumentException(String.format("Unknown pluginId %s", pluginId)); } - PluginWrapper pluginWrapper = getPlugin(pluginId); PluginDescriptor pluginDescriptor = pluginWrapper.getDescriptor(); PluginState pluginState = pluginWrapper.getPluginState(); @@ -470,8 +469,7 @@ public class DefaultPluginManager implements PluginManager { PluginWrapper pluginWrapper = getPlugin(pluginId); if (!isPluginValid(pluginWrapper)) { - log.warn("Plugin '{}:{}' can not be enabled", - pluginWrapper.getPluginId(), + log.warn("Plugin '{}:{}' can not be enabled", pluginWrapper.getPluginId(), pluginWrapper.getDescriptor().getVersion()); return false; } @@ -663,10 +661,11 @@ public class DefaultPluginManager implements PluginManager { return true; } - log.warn(String.format("Plugin '%s:%s' requires a minimum system version of %s", + log.warn("Plugin '{}:{}' requires a minimum system version of {}", pluginWrapper.getPluginId(), pluginWrapper.getDescriptor().getVersion(), - requires)); + requires); + return false; } |