From: Decebal Suiu Date: Wed, 25 Sep 2013 13:56:52 +0000 (+0300) Subject: add missing files after refactoring plugins location X-Git-Tag: release-0.5~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=00acfeba25fd413c7510ba882a3a24d4c2a0b2af;p=pf4j.git add missing files after refactoring plugins location --- diff --git a/demo/plugins/plugin1/plugin.properties b/demo/plugins/plugin1/plugin.properties new file mode 100644 index 0000000..4f95d99 --- /dev/null +++ b/demo/plugins/plugin1/plugin.properties @@ -0,0 +1,5 @@ +plugin.id=welcome-plugin +plugin.class=ro.fortsoft.pf4j.demo.welcome.WelcomePlugin +plugin.version=0.0.1 +plugin.provider=Decebal Suiu +plugin.dependencies= diff --git a/demo/plugins/plugin1/pom.xml b/demo/plugins/plugin1/pom.xml new file mode 100644 index 0000000..5880fb9 --- /dev/null +++ b/demo/plugins/plugin1/pom.xml @@ -0,0 +1,131 @@ + + + + + ro.fortsoft.pf4j.demo + pf4j-demo-plugins + 0.5-SNAPSHOT + + + 4.0.0 + pf4j-demo-plugin1 + 0.5-SNAPSHOT + jar + Demo Plugin #1 + + + welcome-plugin + ro.fortsoft.pf4j.demo.welcome.WelcomePlugin + 0.0.1 + Decebal Suiu + + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + 1.6 + + + unzip jar file + package + + + + + + + run + + + + + + + maven-assembly-plugin + 2.3 + + + + src/main/assembly/assembly.xml + + + false + + + + make-assembly + package + + attached + + + + + + + org.apache.maven.plugins + maven-jar-plugin + 2.4 + + + + ${plugin.id} + ${plugin.class} + ${plugin.version} + ${plugin.provider} + ${plugin.dependencies} + + + + + + + maven-deploy-plugin + + true + + + + + + + + ro.fortsoft.pf4j + pf4j + ${project.version} + provided + + + + ro.fortsoft.pf4j.demo + pf4j-demo-api + ${project.version} + provided + + + + diff --git a/demo/plugins/plugin1/src/main/assembly/assembly.xml b/demo/plugins/plugin1/src/main/assembly/assembly.xml new file mode 100644 index 0000000..3fdc464 --- /dev/null +++ b/demo/plugins/plugin1/src/main/assembly/assembly.xml @@ -0,0 +1,37 @@ + + + plugin + + zip + + false + + + false + runtime + lib + + *:jar:* + + + + + + + target/plugin-classes + classes + + + diff --git a/demo/plugins/plugin1/src/main/java/ro/fortsoft/pf4j/demo/welcome/WelcomePlugin.java b/demo/plugins/plugin1/src/main/java/ro/fortsoft/pf4j/demo/welcome/WelcomePlugin.java new file mode 100644 index 0000000..d10d3dd --- /dev/null +++ b/demo/plugins/plugin1/src/main/java/ro/fortsoft/pf4j/demo/welcome/WelcomePlugin.java @@ -0,0 +1,46 @@ +/* + * Copyright 2012 Decebal Suiu + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with + * the License. You may obtain a copy of the License in the LICENSE file, or at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ +package ro.fortsoft.pf4j.demo.welcome; + +import ro.fortsoft.pf4j.Extension; +import ro.fortsoft.pf4j.Plugin; +import ro.fortsoft.pf4j.PluginWrapper; +import ro.fortsoft.pf4j.demo.api.Greeting; + +/** + * @author Decebal Suiu + */ +public class WelcomePlugin extends Plugin { + + public WelcomePlugin(PluginWrapper wrapper) { + super(wrapper); + } + + public void start() { + System.out.println("WelcomePlugin.start()"); + } + + public void stop() { + System.out.println("WelcomePlugin.stop()"); + } + + @Extension + public static class WelcomeGreeting implements Greeting { + + public String getGreeting() { + return "Welcome"; + } + + } + +}