Browse Source

Change root package from ro.fortsoft.pf4j to org.pf4j (#168)

tags/release-2.0.0
Decebal Suiu 6 years ago
parent
commit
5916ee64d9
100 changed files with 264 additions and 261 deletions
  1. 4
    1
      .travis.yml
  2. 17
    17
      README.md
  3. 2
    2
      demo/api/pom.xml
  4. 2
    2
      demo/api/src/main/java/org/pf4j/demo/api/Greeting.java
  5. 4
    4
      demo/app/pom.xml
  6. 6
    6
      demo/app/src/main/java/org/pf4j/demo/Boot.java
  7. 2
    2
      demo/app/src/main/java/org/pf4j/demo/HowdyGreeting.java
  8. 3
    3
      demo/app/src/main/java/org/pf4j/demo/WhazzupGreeting.java
  9. 1
    0
      demo/app/src/main/resources/META-INF/services/org.pf4j.demo.api.Greeting
  10. 0
    1
      demo/app/src/main/resources/META-INF/services/ro.fortsoft.pf4j.demo.api.Greeting
  11. 6
    6
      demo/app/src/main/resources/log4j.properties
  12. 1
    1
      demo/plugins/plugin1/plugin.properties
  13. 2
    2
      demo/plugins/plugin1/pom.xml
  14. 6
    6
      demo/plugins/plugin1/src/main/java/org/pf4j/demo/welcome/WelcomePlugin.java
  15. 1
    1
      demo/plugins/plugin2/plugin.properties
  16. 2
    2
      demo/plugins/plugin2/pom.xml
  17. 5
    5
      demo/plugins/plugin2/src/main/java/org/pf4j/demo/hello/HelloPlugin.java
  18. 3
    3
      demo/plugins/pom.xml
  19. 2
    2
      demo/pom.xml
  20. 3
    3
      demo_gradle/api/build.gradle
  21. 3
    3
      demo_gradle/api/src/main/java/org/pf4j/demo/api/Greeting.java
  22. 9
    9
      demo_gradle/app/build.gradle
  23. 5
    5
      demo_gradle/app/src/main/java/org/pf4j/demo/Boot.java
  24. 3
    3
      demo_gradle/app/src/main/java/org/pf4j/demo/WhazzupGreeting.java
  25. 3
    3
      demo_gradle/app/src/main/resources/log4j.properties
  26. 6
    6
      demo_gradle/build.gradle
  27. 20
    19
      demo_gradle/plugins/plugin1/build.gradle
  28. 1
    1
      demo_gradle/plugins/plugin1/plugin.properties
  29. 5
    5
      demo_gradle/plugins/plugin1/src/main/java/org/pf4j/demo/welcome/WelcomePlugin.java
  30. 24
    23
      demo_gradle/plugins/plugin2/build.gradle
  31. 1
    1
      demo_gradle/plugins/plugin2/plugin.properties
  32. 5
    5
      demo_gradle/plugins/plugin2/src/main/java/org/pf4j/demo/hello/HelloPlugin.java
  33. 7
    7
      demo_gradle/plugins/plugin3/build.gradle
  34. 5
    5
      demo_gradle/plugins/plugin3/src/main/kotlin/org/pf4j/demo/kotlin/KotlinPlugin.kt
  35. 0
    1
      demo_gradle/settings.gradle
  36. 1
    1
      pf4j/pom.xml
  37. 2
    2
      pf4j/src/main/java/org/pf4j/AbstractExtensionFinder.java
  38. 2
    2
      pf4j/src/main/java/org/pf4j/AbstractPluginManager.java
  39. 2
    2
      pf4j/src/main/java/org/pf4j/BasePluginRepository.java
  40. 1
    1
      pf4j/src/main/java/org/pf4j/CompoundPluginRepository.java
  41. 1
    1
      pf4j/src/main/java/org/pf4j/DefaultExtensionFactory.java
  42. 1
    1
      pf4j/src/main/java/org/pf4j/DefaultExtensionFinder.java
  43. 1
    1
      pf4j/src/main/java/org/pf4j/DefaultPluginClasspath.java
  44. 1
    1
      pf4j/src/main/java/org/pf4j/DefaultPluginDescriptorFinder.java
  45. 1
    1
      pf4j/src/main/java/org/pf4j/DefaultPluginFactory.java
  46. 2
    2
      pf4j/src/main/java/org/pf4j/DefaultPluginLoader.java
  47. 2
    2
      pf4j/src/main/java/org/pf4j/DefaultPluginManager.java
  48. 9
    9
      pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java
  49. 2
    2
      pf4j/src/main/java/org/pf4j/DefaultPluginStatusProvider.java
  50. 1
    1
      pf4j/src/main/java/org/pf4j/DefaultVersionManager.java
  51. 2
    2
      pf4j/src/main/java/org/pf4j/DependencyResolver.java
  52. 1
    1
      pf4j/src/main/java/org/pf4j/DevelopmentPluginClasspath.java
  53. 1
    1
      pf4j/src/main/java/org/pf4j/Extension.java
  54. 1
    1
      pf4j/src/main/java/org/pf4j/ExtensionDescriptor.java
  55. 1
    1
      pf4j/src/main/java/org/pf4j/ExtensionFactory.java
  56. 1
    1
      pf4j/src/main/java/org/pf4j/ExtensionFinder.java
  57. 1
    1
      pf4j/src/main/java/org/pf4j/ExtensionPoint.java
  58. 1
    1
      pf4j/src/main/java/org/pf4j/ExtensionWrapper.java
  59. 9
    9
      pf4j/src/main/java/org/pf4j/JarPluginManager.java
  60. 2
    2
      pf4j/src/main/java/org/pf4j/LegacyExtensionFinder.java
  61. 2
    2
      pf4j/src/main/java/org/pf4j/ManifestPluginDescriptorFinder.java
  62. 1
    1
      pf4j/src/main/java/org/pf4j/Plugin.java
  63. 2
    2
      pf4j/src/main/java/org/pf4j/PluginClassLoader.java
  64. 1
    1
      pf4j/src/main/java/org/pf4j/PluginClasspath.java
  65. 1
    1
      pf4j/src/main/java/org/pf4j/PluginDependency.java
  66. 1
    1
      pf4j/src/main/java/org/pf4j/PluginDescriptor.java
  67. 1
    1
      pf4j/src/main/java/org/pf4j/PluginDescriptorFinder.java
  68. 2
    2
      pf4j/src/main/java/org/pf4j/PluginException.java
  69. 1
    1
      pf4j/src/main/java/org/pf4j/PluginFactory.java
  70. 1
    1
      pf4j/src/main/java/org/pf4j/PluginLoader.java
  71. 1
    1
      pf4j/src/main/java/org/pf4j/PluginManager.java
  72. 1
    1
      pf4j/src/main/java/org/pf4j/PluginRepository.java
  73. 1
    1
      pf4j/src/main/java/org/pf4j/PluginState.java
  74. 1
    1
      pf4j/src/main/java/org/pf4j/PluginStateEvent.java
  75. 1
    1
      pf4j/src/main/java/org/pf4j/PluginStateListener.java
  76. 1
    1
      pf4j/src/main/java/org/pf4j/PluginStatusProvider.java
  77. 1
    1
      pf4j/src/main/java/org/pf4j/PluginWrapper.java
  78. 2
    2
      pf4j/src/main/java/org/pf4j/PropertiesPluginDescriptorFinder.java
  79. 1
    1
      pf4j/src/main/java/org/pf4j/RuntimeMode.java
  80. 2
    2
      pf4j/src/main/java/org/pf4j/ServiceProviderExtensionFinder.java
  81. 1
    1
      pf4j/src/main/java/org/pf4j/VersionManager.java
  82. 3
    3
      pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java
  83. 1
    1
      pf4j/src/main/java/org/pf4j/processor/ExtensionStorage.java
  84. 1
    1
      pf4j/src/main/java/org/pf4j/processor/LegacyExtensionStorage.java
  85. 1
    1
      pf4j/src/main/java/org/pf4j/processor/ServiceProviderExtensionStorage.java
  86. 1
    2
      pf4j/src/main/java/org/pf4j/util/AndFileFilter.java
  87. 1
    1
      pf4j/src/main/java/org/pf4j/util/ClassUtils.java
  88. 1
    1
      pf4j/src/main/java/org/pf4j/util/DirectedGraph.java
  89. 1
    1
      pf4j/src/main/java/org/pf4j/util/DirectoryFileFilter.java
  90. 1
    1
      pf4j/src/main/java/org/pf4j/util/ExtensionFileFilter.java
  91. 1
    1
      pf4j/src/main/java/org/pf4j/util/FileUtils.java
  92. 1
    1
      pf4j/src/main/java/org/pf4j/util/HiddenFilter.java
  93. 1
    1
      pf4j/src/main/java/org/pf4j/util/JarFileFilter.java
  94. 1
    1
      pf4j/src/main/java/org/pf4j/util/NameFileFilter.java
  95. 1
    1
      pf4j/src/main/java/org/pf4j/util/NotFileFilter.java
  96. 1
    1
      pf4j/src/main/java/org/pf4j/util/OrFileFilter.java
  97. 1
    1
      pf4j/src/main/java/org/pf4j/util/StringUtils.java
  98. 1
    1
      pf4j/src/main/java/org/pf4j/util/Unzip.java
  99. 1
    1
      pf4j/src/main/java/org/pf4j/util/ZipFileFilter.java
  100. 0
    0
      pf4j/src/main/resources/META-INF/services/javax.annotation.processing.Processor

+ 4
- 1
.travis.yml View File

language: java language: java
jdk: jdk:
- oraclejdk7
- openjdk7
# JDK7 is not supported anymore; https://github.com/travis-ci/travis-ci/issues/7884#issuecomment-308451879
# - oraclejdk7
- oraclejdk8
after_success: after_success:
- mvn clean cobertura:cobertura coveralls:report - mvn clean cobertura:cobertura coveralls:report

+ 17
- 17
README.md View File

[![Join the chat at https://gitter.im/decebals/pf4j](https://badges.gitter.im/decebals/pf4j.svg)](https://gitter.im/decebals/pf4j?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Join the chat at https://gitter.im/decebals/pf4j](https://badges.gitter.im/decebals/pf4j.svg)](https://gitter.im/decebals/pf4j?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Travis CI Build Status](https://travis-ci.org/decebals/pf4j.png)](https://travis-ci.org/decebals/pf4j) [![Travis CI Build Status](https://travis-ci.org/decebals/pf4j.png)](https://travis-ci.org/decebals/pf4j)
[![Coverage Status](https://coveralls.io/repos/decebals/pf4j/badge.svg?branch=master&service=github)](https://coveralls.io/github/decebals/pf4j?branch=master) [![Coverage Status](https://coveralls.io/repos/decebals/pf4j/badge.svg?branch=master&service=github)](https://coveralls.io/github/decebals/pf4j?branch=master)
[![Maven Central](http://img.shields.io/maven-central/v/ro.fortsoft.pf4j/pf4j.svg)](http://search.maven.org/#search|ga|1|pf4j)
[![Maven Central](http://img.shields.io/maven-central/v/org.pf4j/pf4j.svg)](http://search.maven.org/#search|ga|1|pf4j)


A plugin is a way for a third party to extend the functionality of an application. A plugin implements extension points A plugin is a way for a third party to extend the functionality of an application. A plugin implements extension points
declared by application or other plugins. Also a plugin can define extension points. declared by application or other plugins. Also a plugin can define extension points.


**NOTE:** Starting with version 0.9 you can define an extension directly in the application jar (you're not obligated to put the extension in a plugin - you can see this extension as a default/system extension). See [WhazzupGreeting](https://github.com/decebals/pf4j/blob/master/demo/app/src/main/java/ro/fortsoft/pf4j/demo/WhazzupGreeting.java) for a real example.
**NOTE:** Starting with version 0.9 you can define an extension directly in the application jar (you're not obligated to put the extension in a plugin - you can see this extension as a default/system extension). See [WhazzupGreeting](https://github.com/decebals/pf4j/blob/master/demo/app/src/main/java/org/pf4j/demo/WhazzupGreeting.java) for a real example.


Features/Benefits Features/Benefits
------------------- -------------------


```xml ```xml
<dependency> <dependency>
<groupId>ro.fortsoft.pf4j</groupId>
<groupId>org.pf4j</groupId>
<artifactId>pf4j</artifactId> <artifactId>pf4j</artifactId>
<version>${pf4j.version}</version> <version>${pf4j.version}</version>
</dependency> </dependency>
Created-By: Apache Maven Created-By: Apache Maven
Built-By: decebal Built-By: decebal
Build-Jdk: 1.6.0_17 Build-Jdk: 1.6.0_17
Plugin-Class: ro.fortsoft.pf4j.demo.welcome.WelcomePlugin
Plugin-Class: org.pf4j.demo.welcome.WelcomePlugin
Plugin-Dependencies: x, y, z Plugin-Dependencies: x, y, z
Plugin-Id: welcome-plugin Plugin-Id: welcome-plugin
Plugin-Provider: Decebal Suiu Plugin-Provider: Decebal Suiu
Plugin-Version: 0.0.1 Plugin-Version: 0.0.1
``` ```


In above manifest I described a plugin with id `welcome-plugin`, with class `ro.fortsoft.pf4j.demo.welcome.WelcomePlugin`, with version `0.0.1` and with dependencies
In above manifest I described a plugin with id `welcome-plugin`, with class `org.pf4j.demo.welcome.WelcomePlugin`, with version `0.0.1` and with dependencies
to plugins `x, y, z`. to plugins `x, y, z`.


**NOTE:** The plugin version must be compliant with [Semantic Versioning](http://semver.org) (PF4J uses `jsemver` as implementation for SemVer because it comes with support for comparing versions) **NOTE:** The plugin version must be compliant with [Semantic Versioning](http://semver.org) (PF4J uses `jsemver` as implementation for SemVer because it comes with support for comparing versions)
and in plugin repository you must have a plugin.properties file with the below content: and in plugin repository you must have a plugin.properties file with the below content:


``` ```
plugin.class=ro.fortsoft.pf4j.demo.welcome.WelcomePlugin
plugin.class=org.pf4j.demo.welcome.WelcomePlugin
plugin.dependencies=x, y, z plugin.dependencies=x, y, z
plugin.id=welcome-plugin plugin.id=welcome-plugin
plugin.provider=Decebal Suiu plugin.provider=Decebal Suiu
<version>2.5.1</version> <version>2.5.1</version>
<configuration> <configuration>
<annotationProcessors> <annotationProcessors>
<annotationProcessor>ro.fortsoft.pf4j.processor.ExtensionAnnotationProcessor</annotationProcessor>
<annotationProcessor>org.pf4j.processor.ExtensionAnnotationProcessor</annotationProcessor>
</annotationProcessors> </annotationProcessors>
</configuration> </configuration>
</plugin> </plugin>


Plugin lifecycle Plugin lifecycle
-------------------------- --------------------------
Each plugin passes through a pre-defined set of states. [PluginState](https://github.com/decebals/pf4j/blob/master/pf4j/src/main/java/ro/fortsoft/pf4j/PluginState.java) defines all possible states.
Each plugin passes through a pre-defined set of states. [PluginState](https://github.com/decebals/pf4j/blob/master/pf4j/src/main/java/org/pf4j/PluginState.java) defines all possible states.
The primary plugin states are: The primary plugin states are:
* CREATED * CREATED
* DISABLED * DISABLED


First, you can change the runtime mode using the "pf4j.mode" system property or overriding `DefaultPluginManager.getRuntimeMode()`. First, you can change the runtime mode using the "pf4j.mode" system property or overriding `DefaultPluginManager.getRuntimeMode()`.
For example I run the pf4j demo in eclipse in DEVELOPMENT mode adding only `"-Dpf4j.mode=development"` to the pf4j demo launcher. For example I run the pf4j demo in eclipse in DEVELOPMENT mode adding only `"-Dpf4j.mode=development"` to the pf4j demo launcher.
You can retrieve the current runtime mode using `PluginManager.getRuntimeMode()` or in your Plugin implementation with `getWrapper().getRuntimeMode()`(see [WelcomePlugin](https://github.com/decebals/pf4j/blob/master/demo/plugins/plugin1/src/main/java/ro/fortsoft/pf4j/demo/welcome/WelcomePlugin.java)).
You can retrieve the current runtime mode using `PluginManager.getRuntimeMode()` or in your Plugin implementation with `getWrapper().getRuntimeMode()`(see [WelcomePlugin](https://github.com/decebals/pf4j/blob/master/demo/plugins/plugin1/src/main/java/org/pf4j/demo/welcome/WelcomePlugin.java)).
The DefaultPluginManager determines automatically the correct runtime mode and for DEVELOPMENT mode overrides some components(pluginsDirectory is __"../plugins"__, __PropertiesPluginDescriptorFinder__ as PluginDescriptorFinder, __DevelopmentPluginClasspath__ as PluginClassPath). The DefaultPluginManager determines automatically the correct runtime mode and for DEVELOPMENT mode overrides some components(pluginsDirectory is __"../plugins"__, __PropertiesPluginDescriptorFinder__ as PluginDescriptorFinder, __DevelopmentPluginClasspath__ as PluginClassPath).
Another advantage of DEVELOPMENT runtime mode is that you can execute some code lines only in this mode (for example more debug messages). Another advantage of DEVELOPMENT runtime mode is that you can execute some code lines only in this mode (for example more debug messages).


------------------- -------------------
Starting with version 0.9 you can define an extension directly in the application jar (you're not obligated Starting with version 0.9 you can define an extension directly in the application jar (you're not obligated
to put the extension in a plugin - you can see this extension as a default/system extension). to put the extension in a plugin - you can see this extension as a default/system extension).
See [WhazzupGreeting](https://github.com/decebals/pf4j/blob/master/demo/app/src/main/java/ro/fortsoft/pf4j/demo/WhazzupGreeting.java)
See [WhazzupGreeting](https://github.com/decebals/pf4j/blob/master/demo/app/src/main/java/org/pf4j/demo/WhazzupGreeting.java)
for a real example. for a real example.


This is great for starting application phase. In this scenario you have a minimalist plugin framework with one class loader This is great for starting application phase. In this scenario you have a minimalist plugin framework with one class loader
Also you have the possibility to change the `ExtensionStorage` used in `ExtensionAnnotationProcessor`. Also you have the possibility to change the `ExtensionStorage` used in `ExtensionAnnotationProcessor`.
By default we use the format with `META-INF/extensions.idx` By default we use the format with `META-INF/extensions.idx`
``` ```
ro.fortsoft.pf4j.demo.HowdyGreeting
ro.fortsoft.pf4j.demo.WhazzupGreeting
org.pf4j.demo.HowdyGreeting
org.pf4j.demo.WhazzupGreeting
``` ```


but you can use a more standard location and format, `META-INF/services/<extension-point>`, used by Java Service Provider but you can use a more standard location and format, `META-INF/services/<extension-point>`, used by Java Service Provider
(see `java.util.ServiceLoader`) via `ServiceProviderExtensionStorage` implementation. (see `java.util.ServiceLoader`) via `ServiceProviderExtensionStorage` implementation.
In this case the format of `META-INF/services/ro.fortsoft.pf4j.demo.api.Greeting` is
In this case the format of `META-INF/services/org.pf4j.demo.api.Greeting` is
``` ```
# Generated by PF4J # Generated by PF4J
ro.fortsoft.pf4j.demo.HowdyGreeting
ro.fortsoft.pf4j.demo.WhazzupGreeting # pf4j extension
org.pf4j.demo.HowdyGreeting
org.pf4j.demo.WhazzupGreeting # pf4j extension
``` ```


where the `ro.fortsoft.pf4j.demo.HowdyGreeting` entry is legacy (it's not generated by PF4J) but it's seen as
where the `org.pf4j.demo.HowdyGreeting` entry is legacy (it's not generated by PF4J) but it's seen as
an extension of `Greeting` by PF4J (at runtime). an extension of `Greeting` by PF4J (at runtime).


You can plug your custom `ExtensionStorage` implementation in `ExtensionAnnotationProcessor` in two possible modes: You can plug your custom `ExtensionStorage` implementation in `ExtensionAnnotationProcessor` in two possible modes:
- set the system property with key `pf4j.storageClassName` - set the system property with key `pf4j.storageClassName`


For example if I want to use `ServiceProviderExtensionStorage` then the value for the `pf4j.storageClassName` key must be For example if I want to use `ServiceProviderExtensionStorage` then the value for the `pf4j.storageClassName` key must be
`ro.fortsoft.pf4j.processor.ServiceProviderExtensionStorage`
`org.pf4j.processor.ServiceProviderExtensionStorage`


**NOTE:** `ServiceLoaderExtensionFinder`, the class that lookups for extensions stored in `META-INF/services` folder, is **NOTE:** `ServiceLoaderExtensionFinder`, the class that lookups for extensions stored in `META-INF/services` folder, is
not added/enabled by default. To do this please override `createExtensionFinder` from `DefaultPluginManager`: not added/enabled by default. To do this please override `createExtensionFinder` from `DefaultPluginManager`:

+ 2
- 2
demo/api/pom.xml View File

<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"> <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> <parent>
<groupId>ro.fortsoft.pf4j.demo</groupId>
<groupId>org.pf4j.demo</groupId>
<artifactId>pf4j-demo-parent</artifactId> <artifactId>pf4j-demo-parent</artifactId>
<version>1.4.0-SNAPSHOT</version> <version>1.4.0-SNAPSHOT</version>
</parent> </parent>


<dependencies> <dependencies>
<dependency> <dependency>
<groupId>ro.fortsoft.pf4j</groupId>
<groupId>org.pf4j</groupId>
<artifactId>pf4j</artifactId> <artifactId>pf4j</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<!-- !!! VERY IMPORTANT --> <!-- !!! VERY IMPORTANT -->

demo/api/src/main/java/ro/fortsoft/pf4j/demo/api/Greeting.java → demo/api/src/main/java/org/pf4j/demo/api/Greeting.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.demo.api;
package org.pf4j.demo.api;


import ro.fortsoft.pf4j.ExtensionPoint;
import org.pf4j.ExtensionPoint;


/** /**
* @author Decebal Suiu * @author Decebal Suiu

+ 4
- 4
demo/app/pom.xml View File

<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"> <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> <parent>
<groupId>ro.fortsoft.pf4j.demo</groupId>
<groupId>org.pf4j.demo</groupId>
<artifactId>pf4j-demo-parent</artifactId> <artifactId>pf4j-demo-parent</artifactId>
<version>1.4.0-SNAPSHOT</version> <version>1.4.0-SNAPSHOT</version>
</parent> </parent>
<name>Demo App</name> <name>Demo App</name>


<properties> <properties>
<main.class>ro.fortsoft.pf4j.demo.Boot</main.class>
<main.class>org.pf4j.demo.Boot</main.class>
<slf4j.version>1.7.5</slf4j.version> <slf4j.version>1.7.5</slf4j.version>
</properties> </properties>




<dependencies> <dependencies>
<dependency> <dependency>
<groupId>ro.fortsoft.pf4j</groupId>
<groupId>org.pf4j</groupId>
<artifactId>pf4j</artifactId> <artifactId>pf4j</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>


<dependency> <dependency>
<groupId>ro.fortsoft.pf4j.demo</groupId>
<groupId>org.pf4j.demo</groupId>
<artifactId>pf4j-demo-api</artifactId> <artifactId>pf4j-demo-api</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>

demo/app/src/main/java/ro/fortsoft/pf4j/demo/Boot.java → demo/app/src/main/java/org/pf4j/demo/Boot.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.demo;
package org.pf4j.demo;


import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;


import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;


import ro.fortsoft.pf4j.DefaultPluginManager;
import ro.fortsoft.pf4j.JarPluginManager;
import ro.fortsoft.pf4j.PluginManager;
import ro.fortsoft.pf4j.PluginWrapper;
import ro.fortsoft.pf4j.demo.api.Greeting;
import org.pf4j.PluginManager;
import org.pf4j.PluginWrapper;
import org.pf4j.demo.api.Greeting;
import org.pf4j.DefaultPluginManager;
import org.pf4j.JarPluginManager;


/** /**
* A boot class that start the demo. * A boot class that start the demo.

demo/app/src/main/java/ro/fortsoft/pf4j/demo/HowdyGreeting.java → demo/app/src/main/java/org/pf4j/demo/HowdyGreeting.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.demo;
package org.pf4j.demo;


import ro.fortsoft.pf4j.demo.api.Greeting;
import org.pf4j.demo.api.Greeting;


/** /**
* A Service Implementation (no @Extension) declared via Java Service Provider mechanism (using META-INF/services). * A Service Implementation (no @Extension) declared via Java Service Provider mechanism (using META-INF/services).

demo/app/src/main/java/ro/fortsoft/pf4j/demo/WhazzupGreeting.java → demo/app/src/main/java/org/pf4j/demo/WhazzupGreeting.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.demo;
package org.pf4j.demo;


import ro.fortsoft.pf4j.Extension;
import ro.fortsoft.pf4j.demo.api.Greeting;
import org.pf4j.Extension;
import org.pf4j.demo.api.Greeting;


/** /**
* @author Decebal Suiu * @author Decebal Suiu

+ 1
- 0
demo/app/src/main/resources/META-INF/services/org.pf4j.demo.api.Greeting View File

org.pf4j.demo.HowdyGreeting

+ 0
- 1
demo/app/src/main/resources/META-INF/services/ro.fortsoft.pf4j.demo.api.Greeting View File

ro.fortsoft.pf4j.demo.HowdyGreeting

+ 6
- 6
demo/app/src/main/resources/log4j.properties View File

# #
# PF4J log # PF4J log
# #
log4j.logger.ro.fortsoft.pf4j=DEBUG, Console
log4j.logger.org.pf4j=DEBUG, Console
# !!! Put the bellow classes on level TRACE when you are in trouble # !!! Put the bellow classes on level TRACE when you are in trouble
log4j.logger.ro.fortsoft.pf4j.PluginClassLoader=DEBUG, Console
log4j.logger.ro.fortsoft.pf4j.AbstractExtensionFinder=DEBUG, Console
log4j.additivity.ro.fortsoft.pf4j=false
log4j.additivity.ro.fortsoft.pf4j.PluginClassLoader=false
log4j.additivity.ro.fortsoft.pf4j.AbstractExtensionFinder=false
log4j.logger.org.pf4j.PluginClassLoader=DEBUG, Console
log4j.logger.org.pf4j.AbstractExtensionFinder=DEBUG, Console
log4j.additivity.org.pf4j=false
log4j.additivity.org.pf4j.PluginClassLoader=false
log4j.additivity.org.pf4j.AbstractExtensionFinder=false


# #
# Appenders # Appenders

+ 1
- 1
demo/plugins/plugin1/plugin.properties View File

plugin.id=welcome-plugin plugin.id=welcome-plugin
plugin.class=ro.fortsoft.pf4j.demo.welcome.WelcomePlugin
plugin.class=org.pf4j.demo.welcome.WelcomePlugin
plugin.version=0.0.1 plugin.version=0.0.1
plugin.provider=Decebal Suiu plugin.provider=Decebal Suiu
plugin.dependencies= plugin.dependencies=

+ 2
- 2
demo/plugins/plugin1/pom.xml View File

<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"> <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> <parent>
<groupId>ro.fortsoft.pf4j.demo</groupId>
<groupId>org.pf4j.demo</groupId>
<artifactId>pf4j-demo-plugins</artifactId> <artifactId>pf4j-demo-plugins</artifactId>
<version>1.4.0-SNAPSHOT</version> <version>1.4.0-SNAPSHOT</version>
</parent> </parent>


<properties> <properties>
<plugin.id>welcome-plugin</plugin.id> <plugin.id>welcome-plugin</plugin.id>
<plugin.class>ro.fortsoft.pf4j.demo.welcome.WelcomePlugin</plugin.class>
<plugin.class>org.pf4j.demo.welcome.WelcomePlugin</plugin.class>
<plugin.version>0.0.1</plugin.version> <plugin.version>0.0.1</plugin.version>
<plugin.provider>Decebal Suiu</plugin.provider> <plugin.provider>Decebal Suiu</plugin.provider>
<plugin.dependencies /> <plugin.dependencies />

demo/plugins/plugin1/src/main/java/ro/fortsoft/pf4j/demo/welcome/WelcomePlugin.java → demo/plugins/plugin1/src/main/java/org/pf4j/demo/welcome/WelcomePlugin.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.demo.welcome;
package org.pf4j.demo.welcome;


import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;


import ro.fortsoft.pf4j.Extension;
import ro.fortsoft.pf4j.Plugin;
import ro.fortsoft.pf4j.PluginWrapper;
import ro.fortsoft.pf4j.RuntimeMode;
import ro.fortsoft.pf4j.demo.api.Greeting;
import org.pf4j.PluginWrapper;
import org.pf4j.RuntimeMode;
import org.pf4j.demo.api.Greeting;
import org.pf4j.Extension;
import org.pf4j.Plugin;


/** /**
* @author Decebal Suiu * @author Decebal Suiu

+ 1
- 1
demo/plugins/plugin2/plugin.properties View File

plugin.id=hello-plugin plugin.id=hello-plugin
plugin.class=ro.fortsoft.pf4j.demo.hello.HelloPlugin
plugin.class=org.pf4j.demo.hello.HelloPlugin
plugin.version=0.0.1 plugin.version=0.0.1
plugin.provider=Decebal Suiu plugin.provider=Decebal Suiu
plugin.dependencies= plugin.dependencies=

+ 2
- 2
demo/plugins/plugin2/pom.xml View File

<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"> <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> <parent>
<groupId>ro.fortsoft.pf4j.demo</groupId>
<groupId>org.pf4j.demo</groupId>
<artifactId>pf4j-demo-plugins</artifactId> <artifactId>pf4j-demo-plugins</artifactId>
<version>1.4.0-SNAPSHOT</version> <version>1.4.0-SNAPSHOT</version>
</parent> </parent>


<properties> <properties>
<plugin.id>hello-plugin</plugin.id> <plugin.id>hello-plugin</plugin.id>
<plugin.class>ro.fortsoft.pf4j.demo.hello.HelloPlugin</plugin.class>
<plugin.class>org.pf4j.demo.hello.HelloPlugin</plugin.class>
<plugin.version>0.0.1</plugin.version> <plugin.version>0.0.1</plugin.version>
<plugin.provider>Decebal Suiu</plugin.provider> <plugin.provider>Decebal Suiu</plugin.provider>
<plugin.dependencies /> <plugin.dependencies />

demo/plugins/plugin2/src/main/java/ro/fortsoft/pf4j/demo/hello/HelloPlugin.java → demo/plugins/plugin2/src/main/java/org/pf4j/demo/hello/HelloPlugin.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.demo.hello;
package org.pf4j.demo.hello;


import ro.fortsoft.pf4j.Extension;
import ro.fortsoft.pf4j.Plugin;
import ro.fortsoft.pf4j.PluginWrapper;
import ro.fortsoft.pf4j.demo.api.Greeting;
import org.pf4j.Extension;
import org.pf4j.Plugin;
import org.pf4j.PluginWrapper;
import org.pf4j.demo.api.Greeting;


/** /**
* A very simple plugin. * A very simple plugin.

+ 3
- 3
demo/plugins/pom.xml View File

<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"> <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> <parent>
<groupId>ro.fortsoft.pf4j.demo</groupId>
<groupId>org.pf4j.demo</groupId>
<artifactId>pf4j-demo-parent</artifactId> <artifactId>pf4j-demo-parent</artifactId>
<version>1.4.0-SNAPSHOT</version> <version>1.4.0-SNAPSHOT</version>
</parent> </parent>


<dependencies> <dependencies>
<dependency> <dependency>
<groupId>ro.fortsoft.pf4j</groupId>
<groupId>org.pf4j</groupId>
<artifactId>pf4j</artifactId> <artifactId>pf4j</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<!-- !!! VERY IMPORTANT --> <!-- !!! VERY IMPORTANT -->
</dependency> </dependency>


<dependency> <dependency>
<groupId>ro.fortsoft.pf4j.demo</groupId>
<groupId>org.pf4j.demo</groupId>
<artifactId>pf4j-demo-api</artifactId> <artifactId>pf4j-demo-api</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<!-- !!! VERY IMPORTANT --> <!-- !!! VERY IMPORTANT -->

+ 2
- 2
demo/pom.xml View File

<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"> <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> <parent>
<groupId>ro.fortsoft.pf4j</groupId>
<groupId>org.pf4j</groupId>
<artifactId>pf4j-parent</artifactId> <artifactId>pf4j-parent</artifactId>
<version>1.4.0-SNAPSHOT</version> <version>1.4.0-SNAPSHOT</version>
</parent> </parent>


<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>ro.fortsoft.pf4j.demo</groupId>
<groupId>org.pf4j.demo</groupId>
<artifactId>pf4j-demo-parent</artifactId> <artifactId>pf4j-demo-parent</artifactId>
<version>1.4.0-SNAPSHOT</version> <version>1.4.0-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>

+ 3
- 3
demo_gradle/api/build.gradle View File

dependencies { dependencies {
compile 'ro.fortsoft.pf4j:pf4j:1.3.0'
compile 'org.apache.commons:commons-lang3:3.0'
testCompile group: 'junit', name: 'junit', version: '4.+'
compile 'org.pf4j:pf4j:1.4.0-SNAPSHOT'
compile 'org.apache.commons:commons-lang3:3.0'
testCompile group: 'junit', name: 'junit', version: '4.+'
} }

demo_gradle/api/src/main/java/ro/fortsoft/pf4j/demo/api/Greeting.java → demo_gradle/api/src/main/java/org/pf4j/demo/api/Greeting.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.demo.api;
package org.pf4j.demo.api;


import ro.fortsoft.pf4j.ExtensionPoint;
import org.pf4j.ExtensionPoint;


/** /**
* @author Decebal Suiu * @author Decebal Suiu
*/ */
public interface Greeting extends ExtensionPoint { public interface Greeting extends ExtensionPoint {


public String getGreeting();
String getGreeting();


} }

+ 9
- 9
demo_gradle/app/build.gradle View File

apply plugin:'application'
apply plugin: 'application'


mainClassName = 'ro.fortsoft.pf4j.demo.Boot'
mainClassName = 'org.pf4j.demo.Boot'


dependencies { dependencies {
compile project(':api')
compile 'ro.fortsoft.pf4j:pf4j:1.3.0'
compile 'org.apache.commons:commons-lang3:3.5'
testCompile group: 'junit', name: 'junit', version: '4.+'
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
compile project(':api')
compile 'org.pf4j:pf4j:1.4.0-SNAPSHOT'
compile 'org.apache.commons:commons-lang3:3.5'
testCompile group: 'junit', name: 'junit', version: '4.+'
compile group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.25'
} }


jar { jar {
baseName = 'Plugin Demo'
version = '0.1.0'
baseName = 'Plugin Demo'
version = '0.1.0'
} }

demo_gradle/app/src/main/java/ro/fortsoft/pf4j/demo/Boot.java → demo_gradle/app/src/main/java/org/pf4j/demo/Boot.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.demo;
package org.pf4j.demo;


import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import ro.fortsoft.pf4j.DefaultPluginManager;
import ro.fortsoft.pf4j.PluginManager;
import ro.fortsoft.pf4j.PluginWrapper;
import ro.fortsoft.pf4j.demo.api.Greeting;
import org.pf4j.DefaultPluginManager;
import org.pf4j.PluginManager;
import org.pf4j.PluginWrapper;
import org.pf4j.demo.api.Greeting;


import java.util.List; import java.util.List;



demo_gradle/app/src/main/java/ro/fortsoft/pf4j/demo/WhazzupGreeting.java → demo_gradle/app/src/main/java/org/pf4j/demo/WhazzupGreeting.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.demo;
package org.pf4j.demo;


import ro.fortsoft.pf4j.Extension;
import ro.fortsoft.pf4j.demo.api.Greeting;
import org.pf4j.Extension;
import org.pf4j.demo.api.Greeting;


/** /**
* @author Decebal Suiu * @author Decebal Suiu

+ 3
- 3
demo_gradle/app/src/main/resources/log4j.properties View File

# #
# PF4J log # PF4J log
# #
log4j.logger.ro.fortsoft.pf4j=DEBUG, Console
log4j.logger.ro.fortsoft.pf4j.PluginClassLoader=WARN, Console
log4j.additivity.ro.fortsoft.pf4j=false
log4j.logger.org.pf4j=DEBUG, Console
log4j.logger.org.pf4j.PluginClassLoader=WARN, Console
log4j.additivity.org.pf4j=false


# #
# Appenders # Appenders

+ 6
- 6
demo_gradle/build.gradle View File

subprojects { subprojects {
apply plugin: 'java'
apply plugin: 'java'


repositories {
mavenLocal()
mavenCentral()
}
repositories {
mavenLocal()
mavenCentral()
}
} }


task copyPlugins() { task copyPlugins() {


subprojects.each { p -> subprojects.each { p ->
if (p.path.contains(":plugins/")) { if (p.path.contains(":plugins/")) {
System.out.println("Copying plugin from " + p.path);
System.out.println("Copying plugin from " + p.path);
copy { copy {
from p.projectDir.toString() + '/build/libs' from p.projectDir.toString() + '/build/libs'
into 'app/plugins' into 'app/plugins'

+ 20
- 19
demo_gradle/plugins/plugin1/build.gradle View File

baseName = 'WelcomePlugin' baseName = 'WelcomePlugin'
version = '0.1.0' version = '0.1.0'
manifest { manifest {
attributes 'Plugin-Class' : 'ro.fortsoft.pf4j.demo.welcome.WelcomePlugin',
'Plugin-Id' : 'WelcomePlugin',
'Plugin-Version' : '1.0.0',
'Plugin-Provider' : 'Decebal Suiu'
attributes 'Plugin-Class': 'org.pf4j.demo.welcome.WelcomePlugin',
'Plugin-Id': 'WelcomePlugin',
'Plugin-Version': '1.0.0',
'Plugin-Provider': 'Decebal Suiu'
} }
} }


task plugin(type: Jar) { task plugin(type: Jar) {
baseName = 'WelcomePlugin'
version = '0.1.0'
into('classes'){
with jar
}
into('lib'){
from configurations.compile
}
extension('zip')
baseName = 'WelcomePlugin'
version = '0.1.0'
into('classes') {
with jar
}
into('lib') {
from configurations.compile
}
extension('zip')
} }
assemble.dependsOn plugin assemble.dependsOn plugin


dependencies { dependencies {
compileOnly project(':api') // compileOnly important!!! We do not want to put the api into the zip file since the main program has it already!
compile ('ro.fortsoft.pf4j:pf4j:1.3.0') {
exclude group: "org.slf4j"
}
compile 'org.apache.commons:commons-lang3:3.5'
testCompile group: 'junit', name: 'junit', version: '4.+'
compileOnly project(':api')
// compileOnly important!!! We do not want to put the api into the zip file since the main program has it already!
compile('org.pf4j:pf4j:1.4.0-SNAPSHOT') {
exclude group: "org.slf4j"
}
compile 'org.apache.commons:commons-lang3:3.5'
testCompile group: 'junit', name: 'junit', version: '4.+'
} }

+ 1
- 1
demo_gradle/plugins/plugin1/plugin.properties View File

plugin.id=welcome-plugin plugin.id=welcome-plugin
plugin.class=ro.fortsoft.pf4j.demo.welcome.WelcomePlugin
plugin.class=org.pf4j.demo.welcome.WelcomePlugin
plugin.version=0.0.1 plugin.version=0.0.1
plugin.provider=Decebal Suiu plugin.provider=Decebal Suiu
plugin.dependencies= plugin.dependencies=

demo_gradle/plugins/plugin1/src/main/java/ro/fortsoft/pf4j/demo/welcome/WelcomePlugin.java → demo_gradle/plugins/plugin1/src/main/java/org/pf4j/demo/welcome/WelcomePlugin.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.demo.welcome;
package org.pf4j.demo.welcome;


import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;


import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import ro.fortsoft.pf4j.Extension;
import ro.fortsoft.pf4j.Plugin;
import ro.fortsoft.pf4j.PluginWrapper;
import ro.fortsoft.pf4j.demo.api.Greeting;
import org.pf4j.Extension;
import org.pf4j.Plugin;
import org.pf4j.PluginWrapper;
import org.pf4j.demo.api.Greeting;


/** /**
* @author Decebal Suiu * @author Decebal Suiu

+ 24
- 23
demo_gradle/plugins/plugin2/build.gradle View File

jar { jar {
baseName = 'HelloPlugin'
version = '0.1.0'
manifest {
attributes 'Plugin-Class' : 'ro.fortsoft.pf4j.demo.hello.HelloPlugin',
'Plugin-Id' : 'HelloPlugin',
'Plugin-Version' : '1.0.0',
'Plugin-Provider' : 'Decebal Suiu'
}
baseName = 'HelloPlugin'
version = '0.1.0'
manifest {
attributes 'Plugin-Class': 'org.pf4j.demo.hello.HelloPlugin',
'Plugin-Id': 'HelloPlugin',
'Plugin-Version': '1.0.0',
'Plugin-Provider': 'Decebal Suiu'
}
} }


task plugin(type: Jar) { task plugin(type: Jar) {
baseName = 'HelloPlugin'
version = '0.1.0'
into('classes'){
with jar
}
into('lib'){
from configurations.compile
}
extension('zip')
baseName = 'HelloPlugin'
version = '0.1.0'
into('classes') {
with jar
}
into('lib') {
from configurations.compile
}
extension('zip')
} }
assemble.dependsOn plugin assemble.dependsOn plugin


dependencies { dependencies {
compileOnly project(':api') // compileOnly important!!! We do not want to put the api into the zip file since the main program has it already!
compile ('ro.fortsoft.pf4j:pf4j:1.3.0') {
exclude group: "org.slf4j"
}
compile 'org.apache.commons:commons-lang3:3.5'
testCompile group: 'junit', name: 'junit', version: '4.+'
compileOnly project(':api')
// compileOnly important!!! We do not want to put the api into the zip file since the main program has it already!
compile('org.pf4j:pf4j:1.4.0-SNAPSHOT') {
exclude group: "org.slf4j"
}
compile 'org.apache.commons:commons-lang3:3.5'
testCompile group: 'junit', name: 'junit', version: '4.+'
} }

+ 1
- 1
demo_gradle/plugins/plugin2/plugin.properties View File

plugin.id=hello-plugin plugin.id=hello-plugin
plugin.class=ro.fortsoft.pf4j.demo.hello.HelloPlugin
plugin.class=org.pf4j.demo.hello.HelloPlugin
plugin.version=0.0.1 plugin.version=0.0.1
plugin.provider=Decebal Suiu plugin.provider=Decebal Suiu
plugin.dependencies= plugin.dependencies=

demo_gradle/plugins/plugin2/src/main/java/ro/fortsoft/pf4j/demo/hello/HelloPlugin.java → demo_gradle/plugins/plugin2/src/main/java/org/pf4j/demo/hello/HelloPlugin.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.demo.hello;
package org.pf4j.demo.hello;


import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import ro.fortsoft.pf4j.Extension;
import ro.fortsoft.pf4j.Plugin;
import ro.fortsoft.pf4j.PluginWrapper;
import ro.fortsoft.pf4j.demo.api.Greeting;
import org.pf4j.Extension;
import org.pf4j.Plugin;
import org.pf4j.PluginWrapper;
import org.pf4j.demo.api.Greeting;


/** /**
* A very simple plugin. * A very simple plugin.

+ 7
- 7
demo_gradle/plugins/plugin3/build.gradle View File

baseName = 'KotlinPlugin' baseName = 'KotlinPlugin'
version = '0.1.0' version = '0.1.0'
manifest { manifest {
attributes 'Plugin-Class' : 'ro.fortsoft.pf4j.demo.kotlin.KotlinPlugin',
'Plugin-Id' : 'KotlinPlugin',
'Plugin-Version' : '1.0.0',
'Plugin-Provider' : 'Anindya Chatterjee'
attributes 'Plugin-Class': 'org.pf4j.demo.kotlin.KotlinPlugin',
'Plugin-Id': 'KotlinPlugin',
'Plugin-Version': '1.0.0',
'Plugin-Provider': 'Anindya Chatterjee'
} }
} }


task plugin(type: Jar) { task plugin(type: Jar) {
baseName = 'KotlinPlugin' baseName = 'KotlinPlugin'
version = '0.1.0' version = '0.1.0'
into('classes'){
into('classes') {
with jar with jar
} }
into('lib'){
into('lib') {
from configurations.compile from configurations.compile
} }
extension('zip') extension('zip')


dependencies { dependencies {
compileOnly project(':api') compileOnly project(':api')
kapt ('ro.fortsoft.pf4j:pf4j:1.3.0') {
kapt('org.pf4j:pf4j:1.4.0-SNAPSHOT') {
exclude group: "org.slf4j" exclude group: "org.slf4j"
} }
compile 'org.apache.commons:commons-lang3:3.5' compile 'org.apache.commons:commons-lang3:3.5'

demo_gradle/plugins/plugin3/src/main/kotlin/ro/fortsoft/pf4j/demo/kotlin/KotlinPlugin.kt → demo_gradle/plugins/plugin3/src/main/kotlin/org/pf4j/demo/kotlin/KotlinPlugin.kt View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.demo.kotlin
package org.pf4j.demo.kotlin


import org.apache.commons.lang3.StringUtils import org.apache.commons.lang3.StringUtils
import org.slf4j.LoggerFactory import org.slf4j.LoggerFactory
import ro.fortsoft.pf4j.Extension
import ro.fortsoft.pf4j.Plugin
import ro.fortsoft.pf4j.PluginWrapper
import ro.fortsoft.pf4j.demo.api.Greeting
import org.pf4j.Extension
import org.pf4j.Plugin
import org.pf4j.PluginWrapper
import org.pf4j.demo.api.Greeting


/** /**
* A sample plugin written in Kotlin * A sample plugin written in Kotlin

+ 0
- 1
demo_gradle/settings.gradle View File

include 'plugins/plugin1' include 'plugins/plugin1'
include 'plugins/plugin2' include 'plugins/plugin2'
include 'plugins/plugin3' include 'plugins/plugin3'


+ 1
- 1
pf4j/pom.xml View File

<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"> <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> <parent>
<groupId>ro.fortsoft.pf4j</groupId>
<groupId>org.pf4j</groupId>
<artifactId>pf4j-parent</artifactId> <artifactId>pf4j-parent</artifactId>
<version>1.4.0-SNAPSHOT</version> <version>1.4.0-SNAPSHOT</version>
</parent> </parent>

pf4j/src/main/java/ro/fortsoft/pf4j/AbstractExtensionFinder.java → pf4j/src/main/java/org/pf4j/AbstractExtensionFinder.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.pf4j.util.ClassUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import ro.fortsoft.pf4j.util.ClassUtils;


import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;

pf4j/src/main/java/ro/fortsoft/pf4j/AbstractPluginManager.java → pf4j/src/main/java/org/pf4j/AbstractPluginManager.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import ro.fortsoft.pf4j.util.StringUtils;
import org.pf4j.util.StringUtils;


import java.io.Closeable; import java.io.Closeable;
import java.io.IOException; import java.io.IOException;

pf4j/src/main/java/ro/fortsoft/pf4j/BasePluginRepository.java → pf4j/src/main/java/org/pf4j/BasePluginRepository.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import ro.fortsoft.pf4j.util.FileUtils;
import org.pf4j.util.FileUtils;


import java.io.File; import java.io.File;
import java.io.FileFilter; import java.io.FileFilter;

pf4j/src/main/java/ro/fortsoft/pf4j/CompoundPluginRepository.java → pf4j/src/main/java/org/pf4j/CompoundPluginRepository.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import java.nio.file.Path; import java.nio.file.Path;
import java.util.ArrayList; import java.util.ArrayList;

pf4j/src/main/java/ro/fortsoft/pf4j/DefaultExtensionFactory.java → pf4j/src/main/java/org/pf4j/DefaultExtensionFactory.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

pf4j/src/main/java/ro/fortsoft/pf4j/DefaultExtensionFinder.java → pf4j/src/main/java/org/pf4j/DefaultExtensionFinder.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;

pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginClasspath.java → pf4j/src/main/java/org/pf4j/DefaultPluginClasspath.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


/** /**
* The default values are {@code classes} and {@code lib}. * The default values are {@code classes} and {@code lib}.

pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginDescriptorFinder.java → pf4j/src/main/java/org/pf4j/DefaultPluginDescriptorFinder.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginFactory.java → pf4j/src/main/java/org/pf4j/DefaultPluginFactory.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginLoader.java → pf4j/src/main/java/org/pf4j/DefaultPluginLoader.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import ro.fortsoft.pf4j.util.FileUtils;
import org.pf4j.util.FileUtils;


import java.io.File; import java.io.File;
import java.nio.file.Path; import java.nio.file.Path;

pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginManager.java → pf4j/src/main/java/org/pf4j/DefaultPluginManager.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.pf4j.util.FileUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import ro.fortsoft.pf4j.util.FileUtils;


import java.io.File; import java.io.File;
import java.nio.file.Path; import java.nio.file.Path;

pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginRepository.java → pf4j/src/main/java/org/pf4j/DefaultPluginRepository.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.pf4j.util.AndFileFilter;
import org.pf4j.util.DirectoryFileFilter;
import org.pf4j.util.FileUtils;
import org.pf4j.util.HiddenFilter;
import org.pf4j.util.NotFileFilter;
import org.pf4j.util.OrFileFilter;
import org.pf4j.util.ZipFileFilter;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import ro.fortsoft.pf4j.util.AndFileFilter;
import ro.fortsoft.pf4j.util.DirectoryFileFilter;
import ro.fortsoft.pf4j.util.FileUtils;
import ro.fortsoft.pf4j.util.HiddenFilter;
import ro.fortsoft.pf4j.util.NameFileFilter;
import ro.fortsoft.pf4j.util.NotFileFilter;
import ro.fortsoft.pf4j.util.OrFileFilter;
import ro.fortsoft.pf4j.util.ZipFileFilter;
import org.pf4j.util.NameFileFilter;


import java.io.File; import java.io.File;
import java.io.FileFilter; import java.io.FileFilter;

pf4j/src/main/java/ro/fortsoft/pf4j/DefaultPluginStatusProvider.java → pf4j/src/main/java/org/pf4j/DefaultPluginStatusProvider.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.pf4j.util.FileUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import ro.fortsoft.pf4j.util.FileUtils;


import java.io.IOException; import java.io.IOException;
import java.nio.file.Path; import java.nio.file.Path;

pf4j/src/main/java/ro/fortsoft/pf4j/DefaultVersionManager.java → pf4j/src/main/java/org/pf4j/DefaultVersionManager.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import com.github.zafarkhaja.semver.Version; import com.github.zafarkhaja.semver.Version;



pf4j/src/main/java/ro/fortsoft/pf4j/DependencyResolver.java → pf4j/src/main/java/org/pf4j/DependencyResolver.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import ro.fortsoft.pf4j.util.DirectedGraph;
import org.pf4j.util.DirectedGraph;


import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;

pf4j/src/main/java/ro/fortsoft/pf4j/DevelopmentPluginClasspath.java → pf4j/src/main/java/org/pf4j/DevelopmentPluginClasspath.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


/** /**
* Overwrite classes directories to {@code target/classes} and lib directories to {@code target/lib}. * Overwrite classes directories to {@code target/classes} and lib directories to {@code target/lib}.

pf4j/src/main/java/ro/fortsoft/pf4j/Extension.java → pf4j/src/main/java/org/pf4j/Extension.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME; import static java.lang.annotation.RetentionPolicy.RUNTIME;

pf4j/src/main/java/ro/fortsoft/pf4j/ExtensionDescriptor.java → pf4j/src/main/java/org/pf4j/ExtensionDescriptor.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


/** /**
* @author Decebal Suiu * @author Decebal Suiu

pf4j/src/main/java/ro/fortsoft/pf4j/ExtensionFactory.java → pf4j/src/main/java/org/pf4j/ExtensionFactory.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


/** /**
* Creates an extension instance. * Creates an extension instance.

pf4j/src/main/java/ro/fortsoft/pf4j/ExtensionFinder.java → pf4j/src/main/java/org/pf4j/ExtensionFinder.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;

pf4j/src/main/java/ro/fortsoft/pf4j/ExtensionPoint.java → pf4j/src/main/java/org/pf4j/ExtensionPoint.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


/** /**
* @author Decebal Suiu * @author Decebal Suiu

pf4j/src/main/java/ro/fortsoft/pf4j/ExtensionWrapper.java → pf4j/src/main/java/org/pf4j/ExtensionWrapper.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


/** /**
* A wrapper over extension instance. * A wrapper over extension instance.

pf4j/src/main/java/ro/fortsoft/pf4j/JarPluginManager.java → pf4j/src/main/java/org/pf4j/JarPluginManager.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
import ro.fortsoft.pf4j.util.AndFileFilter;
import ro.fortsoft.pf4j.util.DirectoryFileFilter;
import ro.fortsoft.pf4j.util.HiddenFilter;
import ro.fortsoft.pf4j.util.JarFileFilter;
import ro.fortsoft.pf4j.util.NameFileFilter;
import ro.fortsoft.pf4j.util.NotFileFilter;
import ro.fortsoft.pf4j.util.OrFileFilter;
package org.pf4j;
import org.pf4j.util.AndFileFilter;
import org.pf4j.util.DirectoryFileFilter;
import org.pf4j.util.HiddenFilter;
import org.pf4j.util.JarFileFilter;
import org.pf4j.util.NotFileFilter;
import org.pf4j.util.OrFileFilter;
import org.pf4j.util.NameFileFilter;


import java.io.FileFilter; import java.io.FileFilter;
import java.io.IOException; import java.io.IOException;

pf4j/src/main/java/ro/fortsoft/pf4j/LegacyExtensionFinder.java → pf4j/src/main/java/org/pf4j/LegacyExtensionFinder.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import ro.fortsoft.pf4j.processor.LegacyExtensionStorage;
import org.pf4j.processor.LegacyExtensionStorage;


import java.io.IOException; import java.io.IOException;
import java.io.InputStreamReader; import java.io.InputStreamReader;

pf4j/src/main/java/ro/fortsoft/pf4j/ManifestPluginDescriptorFinder.java → pf4j/src/main/java/org/pf4j/ManifestPluginDescriptorFinder.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import ro.fortsoft.pf4j.util.StringUtils;
import org.pf4j.util.StringUtils;


import java.nio.file.Path; import java.nio.file.Path;
import java.util.jar.Attributes; import java.util.jar.Attributes;

pf4j/src/main/java/ro/fortsoft/pf4j/Plugin.java → pf4j/src/main/java/org/pf4j/Plugin.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

pf4j/src/main/java/ro/fortsoft/pf4j/PluginClassLoader.java → pf4j/src/main/java/org/pf4j/PluginClassLoader.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;


private static final Logger log = LoggerFactory.getLogger(PluginClassLoader.class); private static final Logger log = LoggerFactory.getLogger(PluginClassLoader.class);


private static final String PLUGIN_PACKAGE_PREFIX = "ro.fortsoft.pf4j.";
private static final String PLUGIN_PACKAGE_PREFIX = "org.pf4j.";


private PluginManager pluginManager; private PluginManager pluginManager;
private PluginDescriptor pluginDescriptor; private PluginDescriptor pluginDescriptor;

pf4j/src/main/java/ro/fortsoft/pf4j/PluginClasspath.java → pf4j/src/main/java/org/pf4j/PluginClasspath.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;

pf4j/src/main/java/ro/fortsoft/pf4j/PluginDependency.java → pf4j/src/main/java/org/pf4j/PluginDependency.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


/** /**
* @author Decebal Suiu * @author Decebal Suiu

pf4j/src/main/java/ro/fortsoft/pf4j/PluginDescriptor.java → pf4j/src/main/java/org/pf4j/PluginDescriptor.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;

pf4j/src/main/java/ro/fortsoft/pf4j/PluginDescriptorFinder.java → pf4j/src/main/java/org/pf4j/PluginDescriptorFinder.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import java.nio.file.Path; import java.nio.file.Path;



pf4j/src/main/java/ro/fortsoft/pf4j/PluginException.java → pf4j/src/main/java/org/pf4j/PluginException.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import ro.fortsoft.pf4j.util.StringUtils;
import org.pf4j.util.StringUtils;


/** /**
* An exception used to indicate that a plugin problem occurred. * An exception used to indicate that a plugin problem occurred.

pf4j/src/main/java/ro/fortsoft/pf4j/PluginFactory.java → pf4j/src/main/java/org/pf4j/PluginFactory.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


/** /**
* Creates a plugin instance. * Creates a plugin instance.

pf4j/src/main/java/ro/fortsoft/pf4j/PluginLoader.java → pf4j/src/main/java/org/pf4j/PluginLoader.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import java.nio.file.Path; import java.nio.file.Path;



pf4j/src/main/java/ro/fortsoft/pf4j/PluginManager.java → pf4j/src/main/java/org/pf4j/PluginManager.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import java.nio.file.Path; import java.nio.file.Path;
import java.util.List; import java.util.List;

pf4j/src/main/java/ro/fortsoft/pf4j/PluginRepository.java → pf4j/src/main/java/org/pf4j/PluginRepository.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import java.nio.file.Path; import java.nio.file.Path;
import java.util.List; import java.util.List;

pf4j/src/main/java/ro/fortsoft/pf4j/PluginState.java → pf4j/src/main/java/org/pf4j/PluginState.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


/** /**
* @author Decebal Suiu * @author Decebal Suiu

pf4j/src/main/java/ro/fortsoft/pf4j/PluginStateEvent.java → pf4j/src/main/java/org/pf4j/PluginStateEvent.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import java.util.EventObject; import java.util.EventObject;



pf4j/src/main/java/ro/fortsoft/pf4j/PluginStateListener.java → pf4j/src/main/java/org/pf4j/PluginStateListener.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import java.util.EventListener; import java.util.EventListener;



pf4j/src/main/java/ro/fortsoft/pf4j/PluginStatusProvider.java → pf4j/src/main/java/org/pf4j/PluginStatusProvider.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


/** /**
* @author Decebal Suiu * @author Decebal Suiu

pf4j/src/main/java/ro/fortsoft/pf4j/PluginWrapper.java → pf4j/src/main/java/org/pf4j/PluginWrapper.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import java.nio.file.Path; import java.nio.file.Path;



pf4j/src/main/java/ro/fortsoft/pf4j/PropertiesPluginDescriptorFinder.java → pf4j/src/main/java/org/pf4j/PropertiesPluginDescriptorFinder.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import ro.fortsoft.pf4j.util.StringUtils;
import org.pf4j.util.StringUtils;


import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;

pf4j/src/main/java/ro/fortsoft/pf4j/RuntimeMode.java → pf4j/src/main/java/org/pf4j/RuntimeMode.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;

pf4j/src/main/java/ro/fortsoft/pf4j/ServiceProviderExtensionFinder.java → pf4j/src/main/java/org/pf4j/ServiceProviderExtensionFinder.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


import org.pf4j.processor.ServiceProviderExtensionStorage;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import ro.fortsoft.pf4j.processor.ServiceProviderExtensionStorage;


import java.io.IOException; import java.io.IOException;
import java.io.Reader; import java.io.Reader;

pf4j/src/main/java/ro/fortsoft/pf4j/VersionManager.java → pf4j/src/main/java/org/pf4j/VersionManager.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j;
package org.pf4j;


/** /**
* Manager responsible for versions of plugins. * Manager responsible for versions of plugins.

pf4j/src/main/java/ro/fortsoft/pf4j/processor/ExtensionAnnotationProcessor.java → pf4j/src/main/java/org/pf4j/processor/ExtensionAnnotationProcessor.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.processor;
package org.pf4j.processor;


import ro.fortsoft.pf4j.Extension;
import ro.fortsoft.pf4j.ExtensionPoint;
import org.pf4j.Extension;
import org.pf4j.ExtensionPoint;


import javax.annotation.processing.AbstractProcessor; import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.ProcessingEnvironment; import javax.annotation.processing.ProcessingEnvironment;

pf4j/src/main/java/ro/fortsoft/pf4j/processor/ExtensionStorage.java → pf4j/src/main/java/org/pf4j/processor/ExtensionStorage.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.processor;
package org.pf4j.processor;


import javax.annotation.processing.Filer; import javax.annotation.processing.Filer;
import javax.lang.model.element.Element; import javax.lang.model.element.Element;

pf4j/src/main/java/ro/fortsoft/pf4j/processor/LegacyExtensionStorage.java → pf4j/src/main/java/org/pf4j/processor/LegacyExtensionStorage.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.processor;
package org.pf4j.processor;


import javax.annotation.processing.FilerException; import javax.annotation.processing.FilerException;
import javax.tools.FileObject; import javax.tools.FileObject;

pf4j/src/main/java/ro/fortsoft/pf4j/processor/ServiceProviderExtensionStorage.java → pf4j/src/main/java/org/pf4j/processor/ServiceProviderExtensionStorage.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.processor;
package org.pf4j.processor;


import javax.annotation.processing.FilerException; import javax.annotation.processing.FilerException;
import javax.tools.FileObject; import javax.tools.FileObject;

pf4j/src/main/java/ro/fortsoft/pf4j/util/AndFileFilter.java → pf4j/src/main/java/org/pf4j/util/AndFileFilter.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


import java.io.File; import java.io.File;
import java.io.FileFilter; import java.io.FileFilter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.Iterator;
import java.util.List; import java.util.List;


/** /**

pf4j/src/main/java/ro/fortsoft/pf4j/util/ClassUtils.java → pf4j/src/main/java/org/pf4j/util/ClassUtils.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
import java.util.ArrayList; import java.util.ArrayList;

pf4j/src/main/java/ro/fortsoft/pf4j/util/DirectedGraph.java → pf4j/src/main/java/org/pf4j/util/DirectedGraph.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;

pf4j/src/main/java/ro/fortsoft/pf4j/util/DirectoryFileFilter.java → pf4j/src/main/java/org/pf4j/util/DirectoryFileFilter.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


import java.io.File; import java.io.File;
import java.io.FileFilter; import java.io.FileFilter;

pf4j/src/main/java/ro/fortsoft/pf4j/util/ExtensionFileFilter.java → pf4j/src/main/java/org/pf4j/util/ExtensionFileFilter.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


import java.io.File; import java.io.File;
import java.io.FileFilter; import java.io.FileFilter;

pf4j/src/main/java/ro/fortsoft/pf4j/util/FileUtils.java → pf4j/src/main/java/org/pf4j/util/FileUtils.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;

pf4j/src/main/java/ro/fortsoft/pf4j/util/HiddenFilter.java → pf4j/src/main/java/org/pf4j/util/HiddenFilter.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


import java.io.File; import java.io.File;
import java.io.FileFilter; import java.io.FileFilter;

pf4j/src/main/java/ro/fortsoft/pf4j/util/JarFileFilter.java → pf4j/src/main/java/org/pf4j/util/JarFileFilter.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


/** /**
* File filter that accepts all files ending with .JAR. * File filter that accepts all files ending with .JAR.

pf4j/src/main/java/ro/fortsoft/pf4j/util/NameFileFilter.java → pf4j/src/main/java/org/pf4j/util/NameFileFilter.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


import java.io.File; import java.io.File;
import java.io.FileFilter; import java.io.FileFilter;

pf4j/src/main/java/ro/fortsoft/pf4j/util/NotFileFilter.java → pf4j/src/main/java/org/pf4j/util/NotFileFilter.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


import java.io.File; import java.io.File;
import java.io.FileFilter; import java.io.FileFilter;

pf4j/src/main/java/ro/fortsoft/pf4j/util/OrFileFilter.java → pf4j/src/main/java/org/pf4j/util/OrFileFilter.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


import java.io.File; import java.io.File;
import java.io.FileFilter; import java.io.FileFilter;

pf4j/src/main/java/ro/fortsoft/pf4j/util/StringUtils.java → pf4j/src/main/java/org/pf4j/util/StringUtils.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


/** /**
* @author Decebal Suiu * @author Decebal Suiu

pf4j/src/main/java/ro/fortsoft/pf4j/util/Unzip.java → pf4j/src/main/java/org/pf4j/util/Unzip.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;

pf4j/src/main/java/ro/fortsoft/pf4j/util/ZipFileFilter.java → pf4j/src/main/java/org/pf4j/util/ZipFileFilter.java View File

* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ro.fortsoft.pf4j.util;
package org.pf4j.util;


/** /**
* File filter that accepts all files ending with .ZIP. * File filter that accepts all files ending with .ZIP.

+ 0
- 0
pf4j/src/main/resources/META-INF/services/javax.annotation.processing.Processor View File


Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save