Author: dennisl Date: Sun Nov 19 06:25:28 2006 New Revision: 476825 URL: http://svn.apache.org/viewvc?view=rev&rev=476825 Log: [MEJB-17] review plugin documentation Submitted by: Pete Marvin King
o Applied with modifications. Added: maven/plugins/trunk/maven-ejb-plugin/src/site/apt/examples/ maven/plugins/trunk/maven-ejb-plugin/src/site/apt/examples/ejb-client-dependency.apt (with props) maven/plugins/trunk/maven-ejb-plugin/src/site/apt/examples/generating-ejb-client.apt (with props) maven/plugins/trunk/maven-ejb-plugin/src/site/apt/index.apt (with props) maven/plugins/trunk/maven-ejb-plugin/src/site/apt/usage.apt (with props) Removed: maven/plugins/trunk/maven-ejb-plugin/src/site/apt/howto.apt maven/plugins/trunk/maven-ejb-plugin/src/site/apt/introduction.apt Modified: maven/plugins/trunk/maven-ejb-plugin/pom.xml maven/plugins/trunk/maven-ejb-plugin/src/site/site.xml (contents, props changed) Modified: maven/plugins/trunk/maven-ejb-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/pom.xml?view=diff&rev=476825&r1=476824&r2=476825 ============================================================================== --- maven/plugins/trunk/maven-ejb-plugin/pom.xml (original) +++ maven/plugins/trunk/maven-ejb-plugin/pom.xml Sun Nov 19 06:25:28 2006 @@ -11,6 +11,9 @@ <packaging>maven-plugin</packaging> <name>Maven EJB Plugin</name> <version>2.1-SNAPSHOT</version> + <prerequisites> + <maven>2.0.4</maven> + </prerequisites> <issueManagement> <system>JIRA</system> <url>http://jira.codehaus.org/browse/MEJB</url> Added: maven/plugins/trunk/maven-ejb-plugin/src/site/apt/examples/ejb-client-dependency.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/site/apt/examples/ejb-client-dependency.apt?view=auto&rev=476825 ============================================================================== --- maven/plugins/trunk/maven-ejb-plugin/src/site/apt/examples/ejb-client-dependency.apt (added) +++ maven/plugins/trunk/maven-ejb-plugin/src/site/apt/examples/ejb-client-dependency.apt Sun Nov 19 06:25:28 2006 @@ -0,0 +1,55 @@ + ------ + Using the ejb-client as a dependency + ------ + Pete Marvin King + ------ + 15 July 2006 + ------ + +Using the ejb-client as a dependency + + The ejb client is capable of generating another artifact aside from the primary one which is ejb. To choose the ejb client + as the dependency just specify the type as <<<ejb-client>>>. + +* Normal way of adding an ejb dependency + + The following dependency declaration would include the primary ejb artifact <<<ejb-project-1.0-SNAPSHOT.jar>>> in your + project's package. + ++------------+ + [...] + <dependencies> + <dependency> + <groupId>com.example</groupId> + <artifactId>ejb-project</artifactId> + <version>1.0-SNAPSHOT</version> + <type>ejb</type> + </dependency> + </dependencies> + [...] ++------------+ + +* Using the ejb-client + + Using this dependency declaration would instead use the ejb-client artifact <<<ejb-project-1.0-SNAPSHOT-client.jar>>> + in your project's package. + ++------------+ + [...] + <dependencies> + <dependency> + <groupId>com.example</groupId> + <artifactId>ejb-project</artifactId> + <version>1.0-SNAPSHOT</version> + <type>ejb-client</type> + </dependency> + </dependencies> + [...] ++------------+ + + + For more details on generating the ejb client check the {{{generating-ejb-client.html}ejb-client guide}}. + + + + Propchange: maven/plugins/trunk/maven-ejb-plugin/src/site/apt/examples/ejb-client-dependency.apt ------------------------------------------------------------------------------ svn:eol-style = native Added: maven/plugins/trunk/maven-ejb-plugin/src/site/apt/examples/generating-ejb-client.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/site/apt/examples/generating-ejb-client.apt?view=auto&rev=476825 ============================================================================== --- maven/plugins/trunk/maven-ejb-plugin/src/site/apt/examples/generating-ejb-client.apt (added) +++ maven/plugins/trunk/maven-ejb-plugin/src/site/apt/examples/generating-ejb-client.apt Sun Nov 19 06:25:28 2006 @@ -0,0 +1,86 @@ + ------ + Generating an ejb client + ------ + Stephane Nicoll + <[EMAIL PROTECTED]> + Pete Marvin King + ------ + 15 July 2006 + ------ + +Generating an ejb client + + Normally a thick-client application would only need the stubs and utility classes of the ejb project. + The ejb plugin is capable of generating an ejb jar for client use. + + To generate the ejb-client jar, you need to set <<<generateClient>>> to <<<true>>> in the plugin's configuration: + ++--------+ + [...] + <build> + [...] + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ejb-plugin</artifactId> + <configuration> + <!-- this is false by default --> + <generateClient>true</generateClient> + </configuration> + </plugin> + </plugins> + [...] + </build> + [...] ++---------+ + +* Client inclusions and exclusions + + The content of the ejb-client archive can also be customized using inclusions and exclusions. + +** Default Exclusions: + + *<<<\*\*/\*Bean.class>>> + + *<<<\*\*/\*CMP.class>>> + + *<<<\*\*/\*Session.class>>> + + *<<<\*\*/package.html>>> + + [] + + To customize this, use <<<clientExcludes>>> and <<<clientIncludes>>> element: + ++--------+ + [...] + <build> + [...] + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ejb-plugin</artifactId> + <configuration> + <clientIncludes> + <!-- this will include all files and directories under com/foo/bar --> + <clientInclude>com/foo/bar/**</clientInclude> + <!-- this will include all files and directories under com/foo/acme --> + <clientInclude>com/foo/acme/**</clientInclude> + <!-- this will include all files under com/example --> + <clientInclude>com/example/*</clientInclude> + </clientIncludes> + <clientExcludes> + <!-- this will exclude all files under com/example --> + <clientExclude>com/example/*</clientExclude> + <!-- this will exclude all files and directories with the name sparrow under com/jack --> + <clientExclude>com/jack/**/sparrow</clientExclude> + </clientExcludes> + </configuration> + </plugin> + </plugins> + [...] + </build> + [...] ++---------+ + + <<Be careful when mixing excludes and includes, excludes will have a higher priority than includes.>> Propchange: maven/plugins/trunk/maven-ejb-plugin/src/site/apt/examples/generating-ejb-client.apt ------------------------------------------------------------------------------ svn:eol-style = native Added: maven/plugins/trunk/maven-ejb-plugin/src/site/apt/index.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/site/apt/index.apt?view=auto&rev=476825 ============================================================================== --- maven/plugins/trunk/maven-ejb-plugin/src/site/apt/index.apt (added) +++ maven/plugins/trunk/maven-ejb-plugin/src/site/apt/index.apt Sun Nov 19 06:25:28 2006 @@ -0,0 +1,38 @@ + ------ + Introduction + ------ + Stephane Nicoll + <[EMAIL PROTECTED]> + Pete Marvin King + ------ + 15 July 2006 + ------ + +Maven EJB Plugin + + This plugin generates J2EE Enterprise Javabean (EJB) file as well as the associated client jar. + +* Goals Overview + + {{{ejb-mojo.html}ejb:ejb}} - used by maven for projects with ejb package type. + +* Usage + + Instructions on how to use the Maven EJB Plugin can be found {{{usage.html}here}}. + +* Examples + + To provide you with better understanding on some usages of the Maven EJB Plugin, + you can take a look into the following examples: + + * {{{examples/generating-ejb-client.html}Generating an ejb client}} + + * {{{examples/ejb-client-dependency.html}Using the ejb-client as a dependency}} + + [] + +* Related Links + + * {{{http://maven.apache.org/guides/mini/guide-manifest.html}Guide to manifest customization}} + + [] Propchange: maven/plugins/trunk/maven-ejb-plugin/src/site/apt/index.apt ------------------------------------------------------------------------------ svn:eol-style = native Added: maven/plugins/trunk/maven-ejb-plugin/src/site/apt/usage.apt URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/site/apt/usage.apt?view=auto&rev=476825 ============================================================================== --- maven/plugins/trunk/maven-ejb-plugin/src/site/apt/usage.apt (added) +++ maven/plugins/trunk/maven-ejb-plugin/src/site/apt/usage.apt Sun Nov 19 06:25:28 2006 @@ -0,0 +1,55 @@ + ------ + Usage + ------ + Stephane Nicoll + <[EMAIL PROTECTED]> + Pete Marvin King + ------ + 15 July 2006 + ------ + +Usage + + The EJB plugin is used to package an EJB module. There are two ways to use the ejb plugin: + + * if the packaging type defined in the <<<pom.xml>>> is <<<ejb>>>, the <<<package>>> lifecycle phase can be used + ++--------------+ + mvn package ++--------------+ + + * or using the <<<ejb:ejb>>> goal + ++--------------+ + mvn ejb:ejb ++--------------+ + + [] + + The plugin doesn't do any ejb specific processing during the generation of the jar except for validating the existence + of an ejb deployment descriptor if the ejb version is 2.0+, but it provides the following customization: + + * The ejb version to use + + * {{{examples/generating-ejb-client.html}Generating and customizing an ejb-client}} + + <<The dependencies will not be package with the ejb jar.>> + +* Specifying the ejb version to use + + In EJB3, the ejb-jar.xml deployment descriptor is not mandatory anymore. By default + the plugin assumes version 2.1. To use another version, configure the plugin as follows: + ++-------- + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-ejb-plugin</artifactId> + <configuration> + <ejbVersion>3.0</ejbVersion> + </configuration> + </plugin> + </plugins> + </build> ++--------- Propchange: maven/plugins/trunk/maven-ejb-plugin/src/site/apt/usage.apt ------------------------------------------------------------------------------ svn:eol-style = native Modified: maven/plugins/trunk/maven-ejb-plugin/src/site/site.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-ejb-plugin/src/site/site.xml?view=diff&rev=476825&r1=476824&r2=476825 ============================================================================== --- maven/plugins/trunk/maven-ejb-plugin/src/site/site.xml (original) +++ maven/plugins/trunk/maven-ejb-plugin/src/site/site.xml Sun Nov 19 06:25:28 2006 @@ -2,7 +2,7 @@ <!-- /* - * Copyright 2001-2005 The Apache Software Foundation. + * Copyright 2001-2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,8 +24,12 @@ <item name="Introduction" href="index.html"/> <item name="Goals" href="plugin-info.html"/> <item name="Usage" href="usage.html"/> - <item name="FAQ" href="faq.html"/> + <!-- item name="FAQ" href="faq.html"/ --> </menu> - <!-- TODO: examples --> + <menu name="Examples"> + <item name="Using the ejb client as a dependency" href="examples/ejb-client-dependency.html"/> + <item name="Generating an ejb jar client" href="examples/generating-ejb-client.html" /> + </menu> + ${reports} </body> </project> Propchange: maven/plugins/trunk/maven-ejb-plugin/src/site/site.xml ------------------------------------------------------------------------------ svn:eol-style = native