From 1ee0e1a7b316b6bce7477fa1803b9f618264032f Mon Sep 17 00:00:00 2001 From: vmassol Date: Tue, 8 Apr 2003 14:39:53 +0000 Subject: [PATCH] First implementation of a JBoss plugin. The primary feature is to create a custom JBoss server configuration and to start/stop Jboss using that configuration. Check the goals and properties xdocs for details. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@113286 13f79535-47bb-0310-9956-ffa450edef68 --- jboss/.cvsignore | 6 + jboss/plugin.jelly | 166 ++++++++++++++++++ jboss/plugin.properties | 46 +++++ jboss/project.xml | 43 +++++ jboss/sample/.cvsignore | 3 + .../application/test-application.properties | 2 + .../jboss/conf/test-jboss-conf.properties | 2 + .../deploy/test-jboss-deploy-service.xml | 9 + .../application/test-application2.properties | 2 + .../jboss/conf/test-jboss-conf2.properties | 2 + .../deploy/test-jboss-deploy2-service.xml | 9 + jboss/sample/maven.xml | 20 +++ jboss/sample/project.properties | 10 ++ jboss/sample/project.xml | 61 +++++++ .../src/application/META-INF/application.xml | 9 + jboss/xdocs/.cvsignore | 1 + jboss/xdocs/changes.xml | 18 ++ jboss/xdocs/goals.xml | 31 ++++ jboss/xdocs/navigation.xml | 16 ++ jboss/xdocs/properties.xml | 71 ++++++++ 20 files changed, 527 insertions(+) create mode 100644 jboss/.cvsignore create mode 100644 jboss/plugin.jelly create mode 100644 jboss/plugin.properties create mode 100644 jboss/project.xml create mode 100644 jboss/sample/.cvsignore create mode 100644 jboss/sample/conf/development/application/test-application.properties create mode 100644 jboss/sample/conf/development/jboss/conf/test-jboss-conf.properties create mode 100644 jboss/sample/conf/development/jboss/deploy/test-jboss-deploy-service.xml create mode 100644 jboss/sample/conf/production/application/test-application2.properties create mode 100644 jboss/sample/conf/production/jboss/conf/test-jboss-conf2.properties create mode 100644 jboss/sample/conf/production/jboss/deploy/test-jboss-deploy2-service.xml create mode 100644 jboss/sample/maven.xml create mode 100644 jboss/sample/project.properties create mode 100644 jboss/sample/project.xml create mode 100644 jboss/sample/src/application/META-INF/application.xml create mode 100644 jboss/xdocs/.cvsignore create mode 100644 jboss/xdocs/changes.xml create mode 100644 jboss/xdocs/goals.xml create mode 100644 jboss/xdocs/navigation.xml create mode 100644 jboss/xdocs/properties.xml diff --git a/jboss/.cvsignore b/jboss/.cvsignore new file mode 100644 index 00000000..f7c90c3b --- /dev/null +++ b/jboss/.cvsignore @@ -0,0 +1,6 @@ +target +maven.log +velocity.log +build.properties +.classpath +.project diff --git a/jboss/plugin.jelly b/jboss/plugin.jelly new file mode 100644 index 00000000..8c605b3f --- /dev/null +++ b/jboss/plugin.jelly @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + You need to set the maven.jboss.home property + + + Using JBoss from ${maven.jboss.home} ... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/jboss/plugin.properties b/jboss/plugin.properties new file mode 100644 index 00000000..5af36a90 --- /dev/null +++ b/jboss/plugin.properties @@ -0,0 +1,46 @@ +# Location of JBoss home (i.e. where JBoss is installed on your local drive +# maven.jboss.home = C:/jboss-3.0.4 + +# (optional) Location of where the application-specific JBoss conf files are +# located +# maven.jboss.conf.dir = conf/jboss/conf + +# (optional) Location of where the application-specific JBoss deploy files are +# located +# maven.jboss.deploy.dir = conf/jboss/deploy + +# (optional) Location of application configuration files. These files will +# be copied to the JBoss conf/ server configuration directory (and will thus +# be in the server classpath). +# maven.jboss.appconf.dir = conf/application + +# Name of the specific JBoss server configuration we are creating +maven.jboss.conf.name = custom + +# Location where the specific JBoss server configuration is created +maven.jboss.build.dir = ${maven.build.dir} + +# Location where to get the JBoss jars from +maven.jboss.default.lib.dir = ${maven.jboss.home}/server/default/lib + +# Jars to include/exclude during the copy from maven.jboss.lib.dir +# to our new server configuration +maven.jboss.default.lib.includes = **/*.jar +maven.jboss.default.lib.excludes = + +# Location where to get the JBoss default conf files from +maven.jboss.default.conf.dir = ${maven.jboss.home}/server/default/conf + +# Deploy files to include/exclude during the copy from maven.jboss.conf.dir +# to our new server configuration +maven.jboss.default.conf.includes = **/* +maven.jboss.default.conf.excludes = + +# Location where to get the JBoss default deploy files from +maven.jboss.default.deploy.dir = ${maven.jboss.home}/server/default/deploy + +# Deploy files to include/exclude during the copy from maven.jboss.deploy.dir +# to our new server configuration +maven.jboss.default.deploy.includes = **/* +maven.jboss.default.deploy.excludes = + diff --git a/jboss/project.xml b/jboss/project.xml new file mode 100644 index 00000000..36ea0aaf --- /dev/null +++ b/jboss/project.xml @@ -0,0 +1,43 @@ + + + + ${basedir}/../project.xml + 3 + maven-jboss-plugin + Maven JBoss Plug-in + 1.0-SNAPSHOT + Plugin for JBoss. + JBoss plugin + http://maven.apache.org/reference/plugins/jboss/ + + /www/maven.apache.org/reference/plugins/jboss/ + + + scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven/src/plugins-build/jboss/ + http://cvs.apache.org/viewcvs/maven/src/plugins-build/jboss/ + + + + + 1.0 + 1.0 + HEAD + + + + + + Vincent Massol + vmassol + vmassol@pivolis.com + Pivolis + + Java Developer + + + + + + + + diff --git a/jboss/sample/.cvsignore b/jboss/sample/.cvsignore new file mode 100644 index 00000000..fdd15f5b --- /dev/null +++ b/jboss/sample/.cvsignore @@ -0,0 +1,3 @@ +target +maven.log +build.properties diff --git a/jboss/sample/conf/development/application/test-application.properties b/jboss/sample/conf/development/application/test-application.properties new file mode 100644 index 00000000..6bafb40a --- /dev/null +++ b/jboss/sample/conf/development/application/test-application.properties @@ -0,0 +1,2 @@ +test file. To be verify that the jboss plugin will correctly copy it in +the generated JBoss server configuration. \ No newline at end of file diff --git a/jboss/sample/conf/development/jboss/conf/test-jboss-conf.properties b/jboss/sample/conf/development/jboss/conf/test-jboss-conf.properties new file mode 100644 index 00000000..6bafb40a --- /dev/null +++ b/jboss/sample/conf/development/jboss/conf/test-jboss-conf.properties @@ -0,0 +1,2 @@ +test file. To be verify that the jboss plugin will correctly copy it in +the generated JBoss server configuration. \ No newline at end of file diff --git a/jboss/sample/conf/development/jboss/deploy/test-jboss-deploy-service.xml b/jboss/sample/conf/development/jboss/deploy/test-jboss-deploy-service.xml new file mode 100644 index 00000000..40e6de1f --- /dev/null +++ b/jboss/sample/conf/development/jboss/deploy/test-jboss-deploy-service.xml @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/jboss/sample/conf/production/application/test-application2.properties b/jboss/sample/conf/production/application/test-application2.properties new file mode 100644 index 00000000..6bafb40a --- /dev/null +++ b/jboss/sample/conf/production/application/test-application2.properties @@ -0,0 +1,2 @@ +test file. To be verify that the jboss plugin will correctly copy it in +the generated JBoss server configuration. \ No newline at end of file diff --git a/jboss/sample/conf/production/jboss/conf/test-jboss-conf2.properties b/jboss/sample/conf/production/jboss/conf/test-jboss-conf2.properties new file mode 100644 index 00000000..6bafb40a --- /dev/null +++ b/jboss/sample/conf/production/jboss/conf/test-jboss-conf2.properties @@ -0,0 +1,2 @@ +test file. To be verify that the jboss plugin will correctly copy it in +the generated JBoss server configuration. \ No newline at end of file diff --git a/jboss/sample/conf/production/jboss/deploy/test-jboss-deploy2-service.xml b/jboss/sample/conf/production/jboss/deploy/test-jboss-deploy2-service.xml new file mode 100644 index 00000000..40e6de1f --- /dev/null +++ b/jboss/sample/conf/production/jboss/deploy/test-jboss-deploy2-service.xml @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/jboss/sample/maven.xml b/jboss/sample/maven.xml new file mode 100644 index 00000000..f7d40a72 --- /dev/null +++ b/jboss/sample/maven.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + diff --git a/jboss/sample/project.properties b/jboss/sample/project.properties new file mode 100644 index 00000000..3db87f88 --- /dev/null +++ b/jboss/sample/project.properties @@ -0,0 +1,10 @@ +maven.jboss.conf.name = my +maven.jboss.appconf.dir = target/appconf +maven.jboss.conf.dir = target/jboss/conf +maven.jboss.deploy.dir = target/jboss/deploy + +env.name = development + +# Note: Needs to define maven.jboss.home. +# Ex: maven.jboss.home = C:/Apps/jboss-3.0.4 +# The best place to define it is in a build.properties file diff --git a/jboss/sample/project.xml b/jboss/sample/project.xml new file mode 100644 index 00000000..e35258d1 --- /dev/null +++ b/jboss/sample/project.xml @@ -0,0 +1,61 @@ + + + + + 3 + + + maven-jboss-sample + + + JBoss plugin Sample + + + 1.0-SNAPSHOT + + + + Apache Software Foundation + http://jakarta.apache.org/ + + + + 2002 + + + org.apache.maven.jboss.sample + + + A sample project using the Jboss plugin for Maven + + + http://maven.apache.org/ + + + + scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven + http://cvs.apache.org/viewcvs/maven/ + + + + + + + + + + + + + + src/java + + + \ No newline at end of file diff --git a/jboss/sample/src/application/META-INF/application.xml b/jboss/sample/src/application/META-INF/application.xml new file mode 100644 index 00000000..209d5e11 --- /dev/null +++ b/jboss/sample/src/application/META-INF/application.xml @@ -0,0 +1,9 @@ + + + + + + Sample + diff --git a/jboss/xdocs/.cvsignore b/jboss/xdocs/.cvsignore new file mode 100644 index 00000000..cb6131bb --- /dev/null +++ b/jboss/xdocs/.cvsignore @@ -0,0 +1 @@ +stylesheets diff --git a/jboss/xdocs/changes.xml b/jboss/xdocs/changes.xml new file mode 100644 index 00000000..cb904f58 --- /dev/null +++ b/jboss/xdocs/changes.xml @@ -0,0 +1,18 @@ + + + + Changes + Vincent Massol + + + + + + + Plugin creation. + + + + + + diff --git a/jboss/xdocs/goals.xml b/jboss/xdocs/goals.xml new file mode 100644 index 00000000..6c29f3ff --- /dev/null +++ b/jboss/xdocs/goals.xml @@ -0,0 +1,31 @@ + + + + + Maven JBoss Plug-in Goals + Vincent Massol + + + + + jboss:package + + Creates a JBoss server configuration directory structure, packaging + the application EAR in it. + + + + jboss:start + + Starts JBoss using our specific server configuration. + + + + jboss:stop + + Stops JBoss. + + + + + \ No newline at end of file diff --git a/jboss/xdocs/navigation.xml b/jboss/xdocs/navigation.xml new file mode 100644 index 00000000..e35b8a5f --- /dev/null +++ b/jboss/xdocs/navigation.xml @@ -0,0 +1,16 @@ + + + + Maven JBoss Plugin + + + + + + + + + + + + diff --git a/jboss/xdocs/properties.xml b/jboss/xdocs/properties.xml new file mode 100644 index 00000000..c9878925 --- /dev/null +++ b/jboss/xdocs/properties.xml @@ -0,0 +1,71 @@ + + + + + JBoss Properties + Vincent Massol + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropertyOptional?Description
maven.jboss.homeNo +

+ Location of JBoss home (i.e. where JBoss is installed on your + local drive. Example: c:/jboss-3.0.4. +

+
maven.jboss.conf.dirYes +

+ Location of where the application-specific JBoss conf files are + located. Example: conf/jboss/conf. +

+
maven.jboss.deploy.dirYes +

+ Location of where the application-specific JBoss deploy files are + located. Example: conf/jboss/deploy. +

+
maven.jboss.appconf.dirYes +

+ Location of application configuration files. These files will + be copied to the JBoss conf/ server configuration directory (and + will thus be in the server classpath). Example: + conf/application. +

+
maven.jboss.conf.nameYes +

+ Name of the specific JBoss server configuration we are creating. + Default value is custom. +

+
+
+ +
\ No newline at end of file