maven-ejb-plugin-2.2/0000755000175000017500000000000011241312325014445 5ustar twernertwernermaven-ejb-plugin-2.2/src/0000755000175000017500000000000011241312325015234 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/0000755000175000017500000000000011241312325015650 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/reactor/0000755000175000017500000000000011241312325017307 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/reactor/sub/0000755000175000017500000000000011241312325020100 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/reactor/sub/src/0000755000175000017500000000000011241312325020667 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/reactor/sub/src/main/0000755000175000017500000000000011241312325021613 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/reactor/sub/src/main/resources/0000755000175000017500000000000011241312325023625 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/reactor/sub/src/main/resources/META-INF/0000755000175000017500000000000011241312325024765 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/reactor/sub/src/main/resources/META-INF/ejb-jar.xml0000644000175000017500000000126211213020557027024 0ustar twernertwerner Hello org.apache.maven.it0017.HelloHome org.apache.maven.it0017.Hello org.apache.maven.it0017.HelloBean Stateless Container Hello * Required maven-ejb-plugin-2.2/src/it/reactor/sub/src/main/java/0000755000175000017500000000000011241312325022534 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/reactor/sub/src/main/java/org/0000755000175000017500000000000011241312325023323 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/reactor/sub/src/main/java/org/apache/0000755000175000017500000000000011241312325024544 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/reactor/sub/src/main/java/org/apache/maven/0000755000175000017500000000000011241312325025652 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/reactor/sub/src/main/java/org/apache/maven/Person.java0000644000175000017500000000034011213020557027762 0ustar twernertwernerpackage org.apache.maven; public class Person { private String name; public void setName( String name ) { this.name = name; } public String getName() { return name; } } maven-ejb-plugin-2.2/src/it/reactor/sub/pom.xml0000644000175000017500000000312711213020557021422 0ustar twernertwerner 4.0.0 org.apache.maven.its.ejb.reactor sub 1.0 ejb Maven Integration Test Test that the plugin resolves relative paths properly. UTF-8 org.apache.maven.plugins maven-ejb-plugin @project.version@ target/classes maven-ejb-plugin-2.2/src/it/reactor/verify.bsh0000644000175000017500000000124711213020557021317 0ustar twernertwernerimport java.io.*; import java.util.*; import java.util.jar.*; import java.util.regex.*; File jarFile = new File( basedir, "sub/target/sub-1.0.jar" ); System.out.println( "Checking for existence of " + jarFile ); if ( !jarFile.isFile() ) { throw new Exception( "Missing " + jarFile ); } JarFile jar = new JarFile( jarFile ); String[] includedEntries = { "META-INF/ejb-jar.xml", "org/apache/maven/Person.class", }; for ( String included : includedEntries ) { System.out.println( "Checking for existence of " + included ); if ( jar.getEntry( included ) == null ) { throw new Exception( "Missing " + included ); } } jar.close(); return true; maven-ejb-plugin-2.2/src/it/reactor/pom.xml0000644000175000017500000000225111213020557020626 0ustar twernertwerner 4.0.0 org.apache.maven.its.ejb.reactor aggregator 1.0 pom Maven Integration Test Test that the plugin resolves relative paths properly. sub maven-ejb-plugin-2.2/src/it/settings.xml0000644000175000017500000000375011123433276020247 0ustar twernertwerner it-repo true local.central @localRepositoryUrl@ true true apache.snapshots Apache Snapshot Repository http://people.apache.org/repo/m2-snapshot-repository false true local.central @localRepositoryUrl@ true true maven-ejb-plugin-2.2/src/it/default/0000755000175000017500000000000011241312325017274 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/default/verify.bsh0000644000175000017500000000155311063506470021312 0ustar twernertwernerimport java.io.*; import java.util.*; import java.util.jar.*; import java.util.regex.*; try { File jarFile = new File( basedir, "target/maven-it-it0017-1.0.jar" ); System.out.println( "Checking for existence of " + jarFile ); if ( !jarFile.isFile() ) { System.out.println( "FAILURE!" ); return false; } JarFile jar = new JarFile( jarFile ); String[] includedEntries = { "META-INF/ejb-jar.xml", "org/apache/maven/it0017/Person.class", }; for ( String included : includedEntries ) { System.out.println( "Checking for existence of " + included ); if ( jar.getEntry( included ) == null ) { System.out.println( "FAILURE!" ); return false; } } jar.close(); } catch( Throwable t ) { t.printStackTrace(); return false; } return true; maven-ejb-plugin-2.2/src/it/default/src/0000755000175000017500000000000011241312325020063 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/default/src/main/0000755000175000017500000000000011241312325021007 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/default/src/main/resources/0000755000175000017500000000000011241312325023021 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/default/src/main/resources/META-INF/0000755000175000017500000000000011241312325024161 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/default/src/main/resources/META-INF/ejb-jar.xml0000644000175000017500000000126211063506470026226 0ustar twernertwerner Hello org.apache.maven.it0017.HelloHome org.apache.maven.it0017.Hello org.apache.maven.it0017.HelloBean Stateless Container Hello * Required maven-ejb-plugin-2.2/src/it/default/src/main/java/0000755000175000017500000000000011241312325021730 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/default/src/main/java/org/0000755000175000017500000000000011241312325022517 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/default/src/main/java/org/apache/0000755000175000017500000000000011241312325023740 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/default/src/main/java/org/apache/maven/0000755000175000017500000000000011241312325025046 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/default/src/main/java/org/apache/maven/it0017/0000755000175000017500000000000011241312325025772 5ustar twernertwernermaven-ejb-plugin-2.2/src/it/default/src/main/java/org/apache/maven/it0017/Person.java0000644000175000017500000000034711063506470030117 0ustar twernertwernerpackage org.apache.maven.it0017; public class Person { private String name; public void setName( String name ) { this.name = name; } public String getName() { return name; } } maven-ejb-plugin-2.2/src/it/default/pom.xml0000644000175000017500000000301211213020557020607 0ustar twernertwerner 4.0.0 org.apache.maven.its.ejb.default maven-it-it0017 1.0 ejb Maven Integration Test :: it0017 Test an EJB generation UTF-8 org.apache.maven.plugins maven-ejb-plugin @project.version@ true maven-ejb-plugin-2.2/src/site/0000755000175000017500000000000011241312325016200 5ustar twernertwernermaven-ejb-plugin-2.2/src/site/site.xml0000644000175000017500000000275511225632626017712 0ustar twernertwerner maven-ejb-plugin-2.2/src/site/fml/0000755000175000017500000000000011241312325016756 5ustar twernertwernermaven-ejb-plugin-2.2/src/site/fml/faq.fml0000644000175000017500000000416511225632626020246 0ustar twernertwerner How can I specify a Class-Path: entry in the manifest of an EJB JAR?

You just have to configure it: ... org.apache.maven.plugins maven-ejb-plugin ... true ... ...

How does the classifier affect artifacts in my EJB project?

When used, the copy of the artifact in your project will have the classifier appended to its filename. This can be used to differentiate multiple artifacts.

maven-ejb-plugin-2.2/src/site/apt/0000755000175000017500000000000011241312325016764 5ustar twernertwernermaven-ejb-plugin-2.2/src/site/apt/examples/0000755000175000017500000000000011241312325020602 5ustar twernertwernermaven-ejb-plugin-2.2/src/site/apt/examples/generating-ejb-client.apt0000644000175000017500000000644011166602137025462 0ustar twernertwerner ------ Generating an EJB client ------ Stephane Nicoll Pete Marvin King ------ 2009-04-07 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License 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. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html 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 <<>> to <<>> in the plugin's configuration: +--------+ [...] [...] org.apache.maven.plugins maven-ejb-plugin true [...] [...] +---------+ * 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 the <<>> and <<>> elements: +--------+ [...] [...] org.apache.maven.plugins maven-ejb-plugin com/foo/bar/** com/foo/acme/** com/example/* com/example/* com/jack/**/sparrow [...] [...] +---------+ <> Be careful when mixing excludes and includes, excludes will have a higher priority than includes. maven-ejb-plugin-2.2/src/site/apt/examples/ejb-client-dependency.apt0000644000175000017500000000434111166602137025453 0ustar twernertwerner ------ Using the ejb-client as a dependency ------ Pete Marvin King ------ 2009-04-07 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License 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. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html Using the ejb-client as a dependency The EJB Plugin 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 <<>> as <<>>. * Normal way of adding an EJB dependency The following dependency declaration would include the primary EJB artifact <<>> in your project's package. +------------+ [...] com.example ejb-project 1.0-SNAPSHOT ejb [...] +------------+ * Using the ejb-client Using the following dependency declaration would instead use the ejb-client artifact <<>> in your project's package. +------------+ [...] com.example ejb-project 1.0-SNAPSHOT ejb-client [...] +------------+ Read more about {{{generating-ejb-client.html}Generating the EJB client}}. maven-ejb-plugin-2.2/src/site/apt/usage.apt0000644000175000017500000000442011143776416020616 0ustar twernertwerner ------ Usage ------ Stephane Nicoll Pete Marvin King ------ 2008-07-07 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License 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. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html 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 <<>> is <<>>, the <<>> lifecycle phase can be used +--------------+ mvn package +--------------+ * or using the <<>> 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 <<>> deployment descriptor is not mandatory anymore. By default the plugin assumes version 2.1. To use another version, configure the plugin as follows: +-------- org.apache.maven.plugins maven-ejb-plugin 3.0 +--------- maven-ejb-plugin-2.2/src/site/apt/index.apt0000644000175000017500000000620611166602137020616 0ustar twernertwerner ------ Introduction ------ Stephane Nicoll Pete Marvin King ------ 2009-04-07 ------ ~~ Licensed to the Apache Software Foundation (ASF) under one ~~ or more contributor license agreements. See the NOTICE file ~~ distributed with this work for additional information ~~ regarding copyright ownership. The ASF licenses this file ~~ to you under the Apache License, Version 2.0 (the ~~ "License"); you may not use this file except in compliance ~~ with the License. You may obtain a copy of the License 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. ~~ NOTE: For help with the syntax of this file, see: ~~ http://maven.apache.org/doxia/references/apt-format.html 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 <<>> package type. * Usage General instructions on how to use the EJB Plugin can be found on the {{{usage.html}usage page}}. Some more specific use cases are described in the examples given below. Last but not least, users occasionally contribute additional examples, tips or errata to the {{{http://docs.codehaus.org/display/MAVENUSER/EJB+Plugin}plugin's wiki page}}. In case you still have questions regarding the plugin's usage, please have a look at the {{{faq.html}FAQ}} and feel free to contact the {{{mail-lists.html}user mailing list}}. The posts to the mailing list are archived and could already contain the answer to your question as part of an older thread. Hence, it is also worth browsing/searching the {{{mail-lists.html}mail archive}}. If you feel like the plugin is missing a feature or has a defect, you can fill a feature request or bug report in our {{{issue-tracking.html}issue tracker}}. When creating a new issue, please provide a comprehensive description of your concern. Especially for fixing bugs it is crucial that the developers can reproduce your problem. For this reason, entire debug logs, POMs or most preferably little demo projects attached to the issue are very much appreciated. Of course, patches are welcome, too. Contributors can check out the project from our {{{source-repository.html}source repository}} and will find supplementary information in the {{{http://maven.apache.org/guides/development/guide-helping.html}guide to helping with Maven}}. * 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}} [] maven-ejb-plugin-2.2/src/test/0000755000175000017500000000000011241312325016213 5ustar twernertwernermaven-ejb-plugin-2.2/src/test/resources/0000755000175000017500000000000011241312325020225 5ustar twernertwernermaven-ejb-plugin-2.2/src/test/resources/unit/0000755000175000017500000000000011241312325021204 5ustar twernertwernermaven-ejb-plugin-2.2/src/test/resources/unit/ejbmojotest/0000755000175000017500000000000011241312325023531 5ustar twernertwernermaven-ejb-plugin-2.2/src/test/resources/unit/ejbmojotest/plugin-config.xml0000644000175000017500000000173410537060237027032 0ustar twernertwerner ejb-plugin-test maven-ejb-plugin maven-ejb-plugin-2.2/src/test/java/0000755000175000017500000000000011241312325017134 5ustar twernertwernermaven-ejb-plugin-2.2/src/test/java/org/0000755000175000017500000000000011241312325017723 5ustar twernertwernermaven-ejb-plugin-2.2/src/test/java/org/apache/0000755000175000017500000000000011241312325021144 5ustar twernertwernermaven-ejb-plugin-2.2/src/test/java/org/apache/maven/0000755000175000017500000000000011241312325022252 5ustar twernertwernermaven-ejb-plugin-2.2/src/test/java/org/apache/maven/plugin/0000755000175000017500000000000011241312325023550 5ustar twernertwernermaven-ejb-plugin-2.2/src/test/java/org/apache/maven/plugin/ejb/0000755000175000017500000000000011241312325024310 5ustar twernertwernermaven-ejb-plugin-2.2/src/test/java/org/apache/maven/plugin/ejb/utils/0000755000175000017500000000000011241312325025450 5ustar twernertwernermaven-ejb-plugin-2.2/src/test/java/org/apache/maven/plugin/ejb/utils/JarContentChecker.java0000644000175000017500000001066411144041706031662 0ustar twernertwernerpackage org.apache.maven.plugin.ejb.utils; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License 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. */ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.Enumeration; import java.util.HashMap; import java.util.Iterator; import java.util.jar.JarFile; import java.util.zip.ZipEntry; /** * Jar Content Checker */ public class JarContentChecker { private final static String FOUND = "1"; private final static String NOT_FOUND = "0"; private HashMap fileMap; private HashMap directoryMap; private HashMap dataMap; public JarContentChecker() { fileMap = new HashMap(); directoryMap = new HashMap(); dataMap = new HashMap(); } public void addDirectory( File dir ) { directoryMap.put( dir, NOT_FOUND ); } public void addFile( File file ) { fileMap.put( file, NOT_FOUND ); } public void addFile( String file, String data ) { fileMap.put( file, NOT_FOUND ); dataMap.put( file, data ); } /** * checks whether the jar file contains the files for this checker, * files with the same file name but with different data will not * be considered. * * @param jarFile * @return boolean */ public boolean isOK( JarFile jarFile ) { boolean bRetVal = false; Enumeration zipentries = jarFile.entries(); ZipEntry entry; File entryFile; resetList(); while ( zipentries.hasMoreElements() ) { entry = (ZipEntry) zipentries.nextElement(); entryFile = new File( entry.getName() ); if ( entry.isDirectory() ) { // cross out all files found in the jar file // found files with incorrect content will not // be counted if ( directoryMap.containsKey( entryFile ) ) { directoryMap.put( entryFile, FOUND ); } } else if ( fileMap.containsKey( entryFile ) ) { try { if ( checkContent( entryFile, jarFile.getInputStream( entry ) ) ) { fileMap.put( entryFile, FOUND ); } } catch ( IOException ex ) { // TODO: handle exception } } } bRetVal = checkFinalResult(); return bRetVal; } private boolean checkContent( File file, InputStream istream ) { boolean bRetVal = true; if ( dataMap.containsKey( file ) ) { // TODO: do content checking here } return bRetVal; } private boolean checkFinalResult() { boolean bRetVal = true; Iterator keys = fileMap.keySet().iterator(); while ( keys.hasNext() && bRetVal ) { if ( fileMap.get( keys.next() ).equals( NOT_FOUND ) ) { bRetVal = false; } } keys = directoryMap.keySet().iterator(); while ( keys.hasNext() && bRetVal ) { if ( directoryMap.get( keys.next() ).equals( NOT_FOUND ) ) { bRetVal = false; } } return bRetVal; } private void resetList() { Iterator keys = fileMap.keySet().iterator(); while ( keys.hasNext() ) { fileMap.put( keys.next(), NOT_FOUND ); } keys = directoryMap.keySet().iterator(); while ( keys.hasNext() ) { directoryMap.put( keys.next(), NOT_FOUND ); } } } maven-ejb-plugin-2.2/src/test/java/org/apache/maven/plugin/ejb/stub/0000755000175000017500000000000011241312325025265 5ustar twernertwernermaven-ejb-plugin-2.2/src/test/java/org/apache/maven/plugin/ejb/stub/MavenProjectBuildStub.java0000644000175000017500000002142511213024366032353 0ustar twernertwernerpackage org.apache.maven.plugin.ejb.stub; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License 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. */ import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.apache.maven.model.Build; import org.codehaus.plexus.util.FileUtils; /** * Stub */ public class MavenProjectBuildStub extends MavenProjectBasicStub { public static final int RESOURCES_FILE = 1; public static final int ROOT_FILE = 2; public static final int OUTPUT_FILE = 3; public static final int SOURCE_FILE = 4; protected Build build; protected String srcDirectory; protected String targetDirectory; protected String buildDirectory; protected String outputDirectory; protected String testOutputDirectory; protected String resourcesDirectory; protected String testResourcesDirectory; protected String targetResourceDirectory; protected String targetTestResourcesDirectory; protected ArrayList targetClassesList; protected ArrayList sourceFileList; protected ArrayList resourcesFileList; protected ArrayList rootFileList; protected ArrayList directoryList; protected HashMap dataMap; public MavenProjectBuildStub( String key ) throws Exception { super( key ); build = new Build(); resourcesFileList = new ArrayList(); sourceFileList = new ArrayList(); rootFileList = new ArrayList(); directoryList = new ArrayList(); targetClassesList = new ArrayList(); dataMap = new HashMap(); setupBuild(); model.setBuild( build ); } public void addDirectory( String name ) { if ( isValidPath( name ) ) { directoryList.add( name ); } } public void setOutputDirectory( String dir ) { outputDirectory = buildDirectory + "/" + dir; build.setOutputDirectory( outputDirectory ); } public void addFile( String name, int type ) { if ( isValidPath( name ) ) { List list = getList( type ); list.add( name ); } } public void addFile( String name, String data, int type ) { File fileName = new File( name ); addFile( name, type ); dataMap.put( fileName.getName(), data ); } public String getOutputDirectory() { return outputDirectory; } public String getTestOutputDirectory() { return testOutputDirectory; } public String getResourcesDirectory() { return resourcesDirectory; } public String getTestResourcesDirectory() { return testResourcesDirectory; } public Build getBuild() { return build; } /** * returns true if the path is relative * and false if absolute * also returns false if it is relative to * the parent * * @param path * @return */ private boolean isValidPath( String path ) { boolean bRetVal = true; if ( path.startsWith( "c:" ) || path.startsWith( ".." ) || path.startsWith( "/" ) || path.startsWith( "\\" ) ) { bRetVal = false; } return bRetVal; } private void setupBuild() { // check getBasedir method for the exact path // we need to recreate the dir structure in // an isolated environment srcDirectory = testRootDir + "/src"; buildDirectory = testRootDir + "/target"; outputDirectory = buildDirectory + "/classes"; testOutputDirectory = buildDirectory + "/test-classes"; resourcesDirectory = srcDirectory + "/main/resources/"; testResourcesDirectory = srcDirectory + "/test/resources/"; build.setDirectory( buildDirectory ); build.setOutputDirectory( outputDirectory ); build.setTestOutputDirectory( testOutputDirectory ); } public void setupBuildEnvironment() throws Exception { // populate dummy resources and dummy test resources // setup src dir if ( !FileUtils.fileExists( resourcesDirectory ) ) { FileUtils.mkdir( resourcesDirectory ); } if ( !FileUtils.fileExists( testResourcesDirectory ) ) { FileUtils.mkdir( testResourcesDirectory ); } createDirectories( resourcesDirectory, testResourcesDirectory ); createFiles( resourcesDirectory, testResourcesDirectory ); setupRootFiles(); // setup target dir if ( !FileUtils.fileExists( outputDirectory ) ) { FileUtils.mkdir( outputDirectory ); } if ( !FileUtils.fileExists( testOutputDirectory ) ) { FileUtils.mkdir( testOutputDirectory ); } setupTargetFiles(); } private void createDirectories( String parent, String testparent ) { File currentDirectory; for ( int nIndex = 0; nIndex < directoryList.size(); nIndex++ ) { currentDirectory = new File( parent, "/" + (String) directoryList.get( nIndex ) ); if ( !currentDirectory.exists() ) { currentDirectory.mkdirs(); } // duplicate dir structure in test resources currentDirectory = new File( testparent, "/" + (String) directoryList.get( nIndex ) ); if ( !currentDirectory.exists() ) { currentDirectory.mkdirs(); } } } private List getList( int type ) { ArrayList retVal = null; switch ( type ) { case SOURCE_FILE : retVal = sourceFileList; break; case OUTPUT_FILE : retVal = targetClassesList; break; case RESOURCES_FILE : retVal = resourcesFileList; break; case ROOT_FILE : retVal = rootFileList; break; } return retVal; } private void createFiles( String parent, int type ) { File currentFile; ArrayList list = (ArrayList) getList( type ); // guard if ( list == null ) { return; } for ( int nIndex = 0; nIndex < list.size(); nIndex++ ) { currentFile = new File( parent, (String) list.get( nIndex ) ); // create the necessary parent directories // before we create the files if ( !currentFile.getParentFile().exists() ) { currentFile.getParentFile().mkdirs(); } if ( !currentFile.exists() ) { try { currentFile.createNewFile(); populateFile( currentFile, RESOURCES_FILE ); } catch ( IOException io ) { //TODO: handle exception } } } } private void setupRootFiles() { createFiles( testRootDir, ROOT_FILE ); } private void setupTargetFiles() { createFiles( getOutputDirectory(), OUTPUT_FILE ); } private void setupSourceFiles() { createFiles( srcDirectory, SOURCE_FILE ); } private void createFiles( String parent, String testparent ) { createFiles( parent, RESOURCES_FILE ); createFiles( testparent, RESOURCES_FILE ); } private void populateFile( File file, int type ) { FileOutputStream outputStream; String data = (String) dataMap.get( file.getName() ); if ( ( data != null ) && file.exists() ) { try { outputStream = new FileOutputStream( file ); outputStream.write( data.getBytes() ); outputStream.flush(); outputStream.close(); } catch ( IOException ex ) { // TODO: handle exception here } } } } maven-ejb-plugin-2.2/src/test/java/org/apache/maven/plugin/ejb/stub/ModelStub.java0000644000175000017500000000354211123544663030045 0ustar twernertwernerpackage org.apache.maven.plugin.ejb.stub; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License 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. */ import java.util.LinkedList; import java.util.List; import java.util.Properties; import org.apache.maven.model.Model; import org.apache.maven.model.Parent; /** * Stub */ public class ModelStub extends Model { public ModelStub() { } public String getVersion() { return "0.0-TEST"; } public String getModelVersion() { return "0.0-TEST"; } public String getName() { return "Test Model"; } public String getGroupId() { return "org.apache.maven.test"; } public String getPackaging() { return "jar"; } public Parent getParent() { //return new Parent(); return null; } public String getArtifactId() { return "maven-test-plugin"; } public Properties getProperties() { return new Properties(); } public List getPackages() { return new LinkedList(); } public List getProfiles() { return new LinkedList(); } } maven-ejb-plugin-2.2/src/test/java/org/apache/maven/plugin/ejb/stub/MavenProjectResourcesStub.java0000644000175000017500000000637011123544663033277 0ustar twernertwernerpackage org.apache.maven.plugin.ejb.stub; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License 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. */ import org.apache.maven.model.Resource; /** * Stub */ public class MavenProjectResourcesStub extends MavenProjectBuildStub { public MavenProjectResourcesStub( String id ) throws Exception { super( id ); setupResources(); setupTestResources(); } public void addInclude( String pattern ) { ( (Resource) build.getResources().get( 0 ) ).addInclude( pattern ); } public void addExclude( String pattern ) { ( (Resource) build.getResources().get( 0 ) ).addExclude( pattern ); } public void addTestInclude( String pattern ) { ( (Resource) build.getTestResources().get( 0 ) ).addInclude( pattern ); } public void addTestExclude( String pattern ) { ( (Resource) build.getTestResources().get( 0 ) ).addExclude( pattern ); } public void setTargetPath( String path ) { ( (Resource) build.getResources().get( 0 ) ).setTargetPath( path ); } public void setTestTargetPath( String path ) { ( (Resource) build.getTestResources().get( 0 ) ).setTargetPath( path ); } public void setDirectory( String dir ) { ( (Resource) build.getResources().get( 0 ) ).setDirectory( dir ); } public void setTestDirectory( String dir ) { ( (Resource) build.getTestResources().get( 0 ) ).setDirectory( dir ); } public void setResourceFiltering( int nIndex, boolean filter ) { if ( build.getResources().size() > nIndex ) { ( (Resource) build.getResources().get( nIndex ) ).setFiltering( filter ); } } private void setupResources() { Resource resource = new Resource(); // see MavenProjectBasicStub for details // of getBasedir // setup default resources resource.setDirectory( getBasedir().getPath() + "/src/main/resources" ); resource.setFiltering( false ); resource.setTargetPath( null ); build.addResource( resource ); } private void setupTestResources() { Resource resource = new Resource(); // see MavenProjectBasicStub for details // of getBasedir // setup default test resources resource.setDirectory( getBasedir().getPath() + "/src/test/resources" ); resource.setFiltering( false ); resource.setTargetPath( null ); build.addTestResource( resource ); } } maven-ejb-plugin-2.2/src/test/java/org/apache/maven/plugin/ejb/stub/MavenProjectBasicStub.java0000644000175000017500000001037311213024366032335 0ustar twernertwernerpackage org.apache.maven.plugin.ejb.stub; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License 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. */ import java.io.File; import java.util.HashSet; import java.util.LinkedList; import java.util.Properties; import org.apache.maven.artifact.Artifact; import org.apache.maven.model.Model; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.PlexusTestCase; import org.codehaus.plexus.util.FileUtils; /** * Stub */ public class MavenProjectBasicStub extends MavenProject { protected String identifier; protected String testRootDir; protected Properties properties; protected String description; protected ModelStub model; protected File file; protected ArtifactStub artifact; public MavenProjectBasicStub( String id ) throws Exception { // most values are hardcoded to have a controlled environment super( new ModelStub() ); model = (ModelStub) super.getModel(); properties = new Properties(); artifact = new ArtifactStub(); identifier = id; // set isolated root directory testRootDir = PlexusTestCase.getBasedir() + "/target/test-classes/unit/test-dir/" + identifier; if ( !FileUtils.fileExists( testRootDir ) ) { FileUtils.mkdir( testRootDir ); } artifact.populate( this ); // this is ugly but needed to ensure that the copy constructor // works correctly initializeParentFields(); } public String getName() { return "Test Project " + identifier; } public void setDescription( String desc ) { description = desc; } public Model getModel() { return model; } public String getDescription() { if ( description == null ) { return "this is a test project"; } else { return description; } } public File getBasedir() { // create an isolated environment // see setupTestEnvironment for details return new File( testRootDir ); } public Artifact getArtifact() { return artifact; } public String getGroupId() { return "org.apache.maven.plugin.test"; } public String getArtifactId() { return "maven-resource-plugin-test#" + identifier; } public String getPackaging() { return "ejb"; } public String getVersion() { return identifier; } public void addProperty( String key, String value ) { properties.put( key, value ); } public Properties getProperties() { return properties; } // to prevent the MavenProject copy constructor from blowing up private void initializeParentFields() { // the pom should be located in the isolated dummy root super.setFile( new File( getBasedir(), "pom.xml" ) ); super.setDependencyArtifacts( new HashSet() ); super.setArtifacts( new HashSet() ); super.setPluginArtifacts( new HashSet() ); super.setReportArtifacts( new HashSet() ); super.setExtensionArtifacts( new HashSet() ); super.setRemoteArtifactRepositories( new LinkedList() ); super.setPluginArtifactRepositories( new LinkedList() ); super.setCollectedProjects( new LinkedList() ); super.setActiveProfiles( new LinkedList() ); super.setOriginalModel( null ); super.setExecutionProject( this ); super.setArtifact( artifact ); } } maven-ejb-plugin-2.2/src/test/java/org/apache/maven/plugin/ejb/stub/ArtifactStub.java0000644000175000017500000001420411123544663030537 0ustar twernertwernerpackage org.apache.maven.plugin.ejb.stub; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License 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. */ import java.io.File; import java.util.Collection; import java.util.LinkedList; import java.util.List; import org.apache.maven.artifact.Artifact; import org.apache.maven.artifact.handler.ArtifactHandler; import org.apache.maven.artifact.handler.DefaultArtifactHandler; import org.apache.maven.artifact.metadata.ArtifactMetadata; import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.resolver.filter.ArtifactFilter; import org.apache.maven.artifact.versioning.ArtifactVersion; import org.apache.maven.artifact.versioning.OverConstrainedVersionException; import org.apache.maven.artifact.versioning.VersionRange; /** * Stub */ public class ArtifactStub implements Artifact { boolean hasClassifier; boolean resolved; boolean optional; boolean release; ArtifactHandler artifactHandler; File file; String baseVersion; String type; String classifier; String identifier; String dependencyConflictId; String downloadUrl; String selectedVersion; String artifactId; String groupId; String resolvedVersion; String scope; String version; VersionRange versionRange; public ArtifactStub() { type = "testtype"; scope = "testscope"; classifier = "testclassifier"; artifactHandler = new DefaultArtifactHandler(); } public void populate( MavenProjectBasicStub project ) { groupId = project.getGroupId(); artifactId = project.getArtifactId(); version = project.getVersion(); versionRange = VersionRange.createFromVersion( version ); } public boolean hasClassifier() { return true; } public String getBaseVersion() { return "Test Version"; } public void setBaseVersion( String version ) { baseVersion = version; } public void setFile( File _file ) { file = _file; } public File getFile() { return new File( "testfile" ); } public String getGroupId() { return groupId; } public String getArtifactId() { return artifactId; } public String getVersion() { return version; } public void setVersion( String _version ) { version = _version; } public String getScope() { return scope; } public String getType() { return type; } public String getClassifier() { return classifier; } public String getId() { return identifier; } public String getDependencyConflictId() { return dependencyConflictId; } public void addMetadata( ArtifactMetadata metadata ) { } public Collection getMetadataList() { return new LinkedList(); } public void setRepository( ArtifactRepository remoteRepository ) { } public ArtifactRepository getRepository() { return null; } public void updateVersion( String version, ArtifactRepository localRepository ) { } public String getDownloadUrl() { return downloadUrl; } public void setDownloadUrl( String _downloadUrl ) { downloadUrl = _downloadUrl; } public ArtifactFilter getDependencyFilter() { return null; } public void setDependencyFilter( ArtifactFilter artifactFilter ) { } public ArtifactHandler getArtifactHandler() { return artifactHandler; } public List getDependencyTrail() { return new LinkedList(); } public void setDependencyTrail( List dependencyTrail ) { } public void setScope( String _scope ) { scope = _scope; } public VersionRange getVersionRange() { return versionRange; } public void setVersionRange( VersionRange newRange ) { } public void selectVersion( String version ) { selectedVersion = version; } public void setGroupId( String _groupId ) { groupId = _groupId; } public void setArtifactId( String _artifactId ) { artifactId = _artifactId; } public boolean isSnapshot() { return true; } public void setResolved( boolean _resolved ) { resolved = _resolved; } public boolean isResolved() { return true; } public void setResolvedVersion( String version ) { resolvedVersion = version; } public void setArtifactHandler( ArtifactHandler handler ) { } public boolean isRelease() { return true; } public void setRelease( boolean _release ) { release = _release; } public List getAvailableVersions() { return new LinkedList(); } public void setAvailableVersions( List versions ) { } public boolean isOptional() { return true; } public void setOptional( boolean _optional ) { optional = _optional; } public ArtifactVersion getSelectedVersion() throws OverConstrainedVersionException { return null; } public boolean isSelectedVersionKnown() throws OverConstrainedVersionException { return true; } public int compareTo( Object object ) { return 0; } } maven-ejb-plugin-2.2/src/test/java/org/apache/maven/plugin/ejb/EjbMojoTest.java0000644000175000017500000006002611213020557027346 0ustar twernertwernerpackage org.apache.maven.plugin.ejb; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License 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. */ import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.ejb.stub.MavenProjectResourcesStub; import org.apache.maven.plugin.ejb.utils.JarContentChecker; import org.apache.maven.plugin.testing.AbstractMojoTestCase; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.util.FileUtils; import java.io.File; import java.io.IOException; import java.util.LinkedList; import java.util.jar.JarFile; /** * EJB plugin Test Case */ public class EjbMojoTest extends AbstractMojoTestCase { static final String DEFAULT_POM_PATH = "target/test-classes/unit/ejbmojotest/plugin-config.xml"; static final String DEFAULT_JAR_NAME = "testJar"; public void setUp() throws Exception { super.setUp(); } public void tearDown() throws Exception { } /** * check test environment * * @throws Exception if any exception occurs */ public void testTestEnvironment() throws Exception { // Perform lookup on the Mojo to make sure everything is ok lookupMojo(); } /** * Basic jar creation test. * * @throws Exception if any exception occurs */ public void testDefaultWithoutClientJar() throws Exception { final MavenProjectResourcesStub project = createTestProject( "default-noclient" ); final EjbMojo mojo = lookupMojoWithDefaultSettings( project ); setupDefaultProject( project ); setVariableValueToObject( mojo, "generateClient", Boolean.FALSE ); setVariableValueToObject( mojo, "ejbVersion", "2.1" ); mojo.execute(); assertJarCreation( project, true, false ); } /** * Classified jar creation test. * * @throws Exception if any exception occurs */ public void testClassifiedJarWithoutClientJar() throws Exception { final MavenProjectResourcesStub project = createTestProject( "classified-noclient" ); final EjbMojo mojo = lookupMojoWithDefaultSettings( project ); setupDefaultProject( project ); setVariableValueToObject( mojo, "generateClient", Boolean.FALSE ); setVariableValueToObject( mojo, "ejbVersion", "2.1" ); setVariableValueToObject( mojo, "classifier", "classified" ); mojo.execute(); assertJarCreation( project, true, false, "classified" ); } /** * Basic jar creation test with client jar. * * @throws Exception if any exception occurs */ public void testDefaultWithClientJar() throws Exception { final MavenProjectResourcesStub project = createTestProject( "default-client" ); final EjbMojo mojo = lookupMojoWithDefaultSettings( project ); setupDefaultProject( project ); setVariableValueToObject( mojo, "generateClient", Boolean.TRUE ); setVariableValueToObject( mojo, "ejbVersion", "2.1" ); mojo.execute(); assertJarCreation( project, true, true ); } /** * Classified jar creation test with client jar. * * @throws Exception if any exception occurs */ public void testClassifiedJarWithClientJar() throws Exception { final MavenProjectResourcesStub project = createTestProject( "classified-client" ); final EjbMojo mojo = lookupMojoWithDefaultSettings( project ); setupDefaultProject( project ); setVariableValueToObject( mojo, "generateClient", Boolean.TRUE ); setVariableValueToObject( mojo, "ejbVersion", "2.1" ); setVariableValueToObject( mojo, "classifier", "classified" ); mojo.execute(); assertJarCreation( project, true, true, "classified" ); } /** * Default ejb jar inclusion and exclusion test. * * @throws Exception if any exception occurs */ public void testDefaultInclusionsExclusions() throws Exception { final MavenProjectResourcesStub project = createTestProject( "includes-excludes-default" ); final EjbMojo mojo = lookupMojoWithDefaultSettings( project ); // put this on the target output dir project.addFile( "META-INF/ejb-jar.xml", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppBean.class", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppCMP.class", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppSession.class", MavenProjectResourcesStub.OUTPUT_FILE ); // put this on the root dir project.addFile( "pom.xml", MavenProjectResourcesStub.ROOT_FILE ); // start creating the environment project.setupBuildEnvironment(); setVariableValueToObject( mojo, "generateClient", Boolean.FALSE ); setVariableValueToObject( mojo, "ejbVersion", "2.1" ); mojo.execute(); assertJarCreation( project, true, false ); assertJarContent( project, new String[]{"META-INF/MANIFEST.MF", "META-INF/ejb-jar.xml", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.xml", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.properties", "org/sample/ejb/AppBean.class", "org/sample/ejb/AppCMP.class", "org/sample/ejb/AppSession.class"}, null ); } /** * Client jar default inclusion and exclusion test. * * @throws Exception if any exception occurs */ public void testClientJarDefaultInclusionsExclusions() throws Exception { final MavenProjectResourcesStub project = createTestProject( "includes-excludes-client" ); final EjbMojo mojo = lookupMojoWithDefaultSettings( project ); // put this on the target output dir project.addFile( "META-INF/ejb-jar.xml", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppBean.class", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppCMP.class", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppSession.class", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppStub.class", MavenProjectResourcesStub.OUTPUT_FILE ); // put this on the root dir project.addFile( "pom.xml", MavenProjectResourcesStub.ROOT_FILE ); // start creating the environment project.setupBuildEnvironment(); setVariableValueToObject( mojo, "generateClient", Boolean.TRUE ); setVariableValueToObject( mojo, "ejbVersion", "2.1" ); mojo.execute(); assertJarCreation( project, true, true ); assertClientJarContent( project, new String[]{"META-INF/MANIFEST.MF", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.xml", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.properties", "org/sample/ejb/AppStub.class"}, new String[]{"META-INF/ejb-jar.xml", "org/sample/ejb/AppBean.class", "org/sample/ejb/AppCMP.class", "org/sample/ejb/AppSession.class"} ); } /** * Client jar inclusion test. * * @throws Exception if any exception occurs */ public void testClientJarInclusions() throws Exception { final LinkedList inclusions = new LinkedList(); inclusions.add( "**/*Include.class" ); final MavenProjectResourcesStub project = createTestProject( "client-includes" ); final EjbMojo mojo = lookupMojoWithSettings( project, inclusions, new LinkedList(), null ); // put this on the target output dir project.addFile( "META-INF/ejb-jar.xml", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppInclude.class", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppExclude.class", MavenProjectResourcesStub.OUTPUT_FILE ); // put this on the root dir project.addFile( "pom.xml", MavenProjectResourcesStub.ROOT_FILE ); // start creating the environment project.setupBuildEnvironment(); setVariableValueToObject( mojo, "generateClient", Boolean.TRUE ); setVariableValueToObject( mojo, "ejbVersion", "2.1" ); mojo.execute(); assertJarCreation( project, true, true ); assertClientJarContent( project, new String[]{"META-INF/MANIFEST.MF", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.xml", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.properties", "org/sample/ejb/AppInclude.class"}, new String[]{"META-INF/ejb-jar.xml", "org/sample/ejb/AppExclude.class"} ); } /** * Client jar exclusions test. * * @throws Exception if any exception occurs */ public void testClientJarExclusions() throws Exception { final LinkedList exclusions = new LinkedList(); exclusions.add( "**/*Exclude.class" ); final MavenProjectResourcesStub project = createTestProject( "client-excludes" ); final EjbMojo mojo = lookupMojoWithSettings( project, new LinkedList(), exclusions, null ); // put this on the target output dir project.addFile( "META-INF/ejb-jar.xml", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppInclude.class", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppExclude.class", MavenProjectResourcesStub.OUTPUT_FILE ); // put this on the root dir project.addFile( "pom.xml", MavenProjectResourcesStub.ROOT_FILE ); // start creating the environment project.setupBuildEnvironment(); setVariableValueToObject( mojo, "generateClient", Boolean.TRUE ); setVariableValueToObject( mojo, "ejbVersion", "2.1" ); mojo.execute(); assertJarCreation( project, true, true ); assertClientJarContent( project, new String[]{"META-INF/MANIFEST.MF", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.xml", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.properties", "org/sample/ejb/AppInclude.class"}, new String[]{"META-INF/ejb-jar.xml", "org/sample/ejb/AppExclude.class"} ); } /** * Main jar exclusions test. * * @throws Exception if any exception occurs */ public void testMainJarExclusions() throws Exception { final LinkedList exclusions = new LinkedList(); exclusions.add( "**/*Exclude.class" ); final MavenProjectResourcesStub project = createTestProject( "main-excludes" ); final EjbMojo mojo = lookupMojoWithSettings( project, new LinkedList(), new LinkedList(), exclusions ); // put this on the target output dir project.addFile( "META-INF/ejb-jar.xml", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppInclude.class", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppExclude.class", MavenProjectResourcesStub.OUTPUT_FILE ); // put this on the root dir project.addFile( "pom.xml", MavenProjectResourcesStub.ROOT_FILE ); // start creating the environment project.setupBuildEnvironment(); setVariableValueToObject( mojo, "generateClient", Boolean.TRUE ); setVariableValueToObject( mojo, "ejbVersion", "2.1" ); mojo.execute(); assertJarCreation( project, true, true ); assertJarContent( project, new String[]{"META-INF/MANIFEST.MF", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.xml", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.properties", "org/sample/ejb/AppInclude.class"}, new String[]{"META-INF/ejb-jar.xml", "org/sample/ejb/AppExclude.class"} ); } /** * Client jar inclusion test with a sub-package. * * @throws Exception if any exception occurs */ public void testClientJarInclusionsWithSubPackage() throws Exception { final LinkedList inclusions = new LinkedList(); inclusions.add( "org/sample/ejb/*.class" ); final MavenProjectResourcesStub project = createTestProject( "client-includes-subpackage" ); final EjbMojo mojo = lookupMojoWithSettings( project, inclusions, new LinkedList(), null ); // put this on the target output dir project.addFile( "META-INF/ejb-jar.xml", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/App.class", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/impl/AppImpl.class", MavenProjectResourcesStub.OUTPUT_FILE ); // put this on the root dir project.addFile( "pom.xml", MavenProjectResourcesStub.ROOT_FILE ); // start creating the environment project.setupBuildEnvironment(); setVariableValueToObject( mojo, "generateClient", Boolean.TRUE ); setVariableValueToObject( mojo, "ejbVersion", "2.1" ); mojo.execute(); assertJarCreation( project, true, true ); assertClientJarContent( project, new String[]{"META-INF/MANIFEST.MF", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.xml", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.properties", "org/sample/ejb/App.class"}, new String[]{"META-INF/ejb-jar.xml", "org/sample/ejb/impl/AppImpl.class", "org/sample/ejb/impl"} ); } /** * Client jar exclusions test that leaves an empty package. * * @throws Exception if any exception occurs */ public void testClientJarExclusionsWithEmptyPackage() throws Exception { final LinkedList exclusions = new LinkedList(); exclusions.add( "org/sample/ejb/**" ); final MavenProjectResourcesStub project = createTestProject( "client-excludes-emptypackage" ); final EjbMojo mojo = lookupMojoWithSettings( project, new LinkedList(), exclusions, null ); // put this on the target output dir project.addFile( "META-INF/ejb-jar.xml", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb/AppOne.class", MavenProjectResourcesStub.OUTPUT_FILE ); project.addFile( "org/sample/ejb2/AppTwo.class", MavenProjectResourcesStub.OUTPUT_FILE ); // put this on the root dir project.addFile( "pom.xml", MavenProjectResourcesStub.ROOT_FILE ); // start creating the environment project.setupBuildEnvironment(); setVariableValueToObject( mojo, "generateClient", Boolean.TRUE ); setVariableValueToObject( mojo, "ejbVersion", "2.1" ); mojo.execute(); assertJarCreation( project, true, true ); // We check that the created jar does not contain the org/sample/ejb package empty assertClientJarContent( project, new String[]{"META-INF/MANIFEST.MF", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.xml", "META-INF/maven/org.apache.maven.test/maven-test-plugin/pom.properties", "org/sample/ejb2/AppTwo.class"}, new String[]{"META-INF/ejb-jar.xml", "org/sample/ejb/AppOne.class", "org/sample/ejb"} ); } /** * Tests if the mojo throws an exception when the EJB version is < 3.0 * and no deployment descriptor is present. The case with deployment descriptor * present is covered by previous tests. * * @throws Exception if any exception occurs */ public void testEjbComplianceVersionTwoDotOneWithoutDescriptor() throws Exception { final MavenProjectResourcesStub project = createTestProject( "compliance-nodescriptor-2.1" ); final EjbMojo mojo = lookupMojoWithDefaultSettings( project ); // put this on the root dir project.addFile( "pom.xml", MavenProjectResourcesStub.ROOT_FILE ); // start creating the environment project.setupBuildEnvironment(); setVariableValueToObject( mojo, "generateClient", Boolean.FALSE ); setVariableValueToObject( mojo, "ejbVersion", "2.1" ); try { mojo.execute(); fail( "Exception should be thrown: No deployment descriptor present." ); } catch ( MojoExecutionException e ) { // OK } } /** * Tests if the jar is created under EJB version 3.0 with * deployment descriptor present. * * @throws Exception if any exception occurs */ public void testEjbComplianceVersionThreeWithDescriptor() throws Exception { final MavenProjectResourcesStub project = createTestProject( "compliance-descriptor-3" ); final EjbMojo mojo = lookupMojoWithDefaultSettings( project ); // put this on the target dir project.addFile( "META-INF/ejb-jar.xml", MavenProjectResourcesStub.OUTPUT_FILE ); // put this on the root dir project.addFile( "pom.xml", MavenProjectResourcesStub.ROOT_FILE ); // start creating the environment project.setupBuildEnvironment(); setVariableValueToObject( mojo, "generateClient", Boolean.FALSE ); setVariableValueToObject( mojo, "ejbVersion", "3.0" ); mojo.execute(); assertJarCreation( project, true, false ); } /** * Tests if the jar is created under EJB version 3.0 without * deployment descriptor present. * * @throws Exception if any exception occurs */ public void testEjbCompliance_3_0_WithoutDescriptor() throws Exception { final MavenProjectResourcesStub project = createTestProject( "compliance-nodescriptor-3" ); final EjbMojo mojo = lookupMojoWithDefaultSettings( project ); // put this on the root dir project.addFile( "pom.xml", MavenProjectResourcesStub.ROOT_FILE ); // start creating the environment project.setupBuildEnvironment(); setVariableValueToObject( mojo, "generateClient", Boolean.FALSE ); setVariableValueToObject( mojo, "ejbVersion", "3.0" ); mojo.execute(); assertJarCreation( project, true, false ); } protected EjbMojo lookupMojo() throws Exception { File pomFile = new File( getBasedir(), DEFAULT_POM_PATH ); EjbMojo mojo = (EjbMojo) lookupMojo( "ejb", pomFile ); assertNotNull( mojo ); return mojo; } protected MavenProjectResourcesStub createTestProject( final String testName ) throws Exception { // this will automatically create the isolated // test environment return new MavenProjectResourcesStub( testName ); } protected void setupDefaultProject( final MavenProjectResourcesStub project ) throws Exception { // put this on the target dir project.addFile( "META-INF/ejb-jar.xml", MavenProjectResourcesStub.OUTPUT_FILE ); // put this on the root dir project.addFile( "pom.xml", MavenProjectResourcesStub.ROOT_FILE ); // start creating the environment project.setupBuildEnvironment(); } protected EjbMojo lookupMojoWithSettings( final MavenProject project, LinkedList clientIncludes, LinkedList clientExcludes, LinkedList excludes ) throws Exception { final EjbMojo mojo = lookupMojo(); setVariableValueToObject( mojo, "project", project ); setVariableValueToObject( mojo, "basedir", new File( project.getBuild().getDirectory() ) ); setVariableValueToObject( mojo, "outputDirectory", new File( project.getBuild().getOutputDirectory() ) ); setVariableValueToObject( mojo, "jarName", DEFAULT_JAR_NAME ); setVariableValueToObject( mojo, "clientExcludes", clientExcludes ); setVariableValueToObject( mojo, "clientIncludes", clientIncludes ); setVariableValueToObject( mojo, "excludes", excludes ); return mojo; } protected EjbMojo lookupMojoWithDefaultSettings( final MavenProject project ) throws Exception { return lookupMojoWithSettings( project, new LinkedList(), new LinkedList(), null ); } protected void assertJarCreation( final MavenProject project, boolean ejbJarCreated, boolean ejbClientJarCreated, String classifier ) { String checkedJarFile; String checkedClientJarFile; if ( classifier == null ) { checkedJarFile = project.getBuild().getDirectory() + "/" + DEFAULT_JAR_NAME + ".jar"; checkedClientJarFile = project.getBuild().getDirectory() + "/" + DEFAULT_JAR_NAME + "-client.jar"; } else { checkedJarFile = project.getBuild().getDirectory() + "/" + DEFAULT_JAR_NAME + "-" + classifier + ".jar"; checkedClientJarFile = project.getBuild().getDirectory() + "/" + DEFAULT_JAR_NAME + "-" + classifier + "-client.jar"; } assertEquals( "Invalid value for ejb-jar creation", ejbJarCreated, FileUtils.fileExists( checkedJarFile ) ); assertEquals( "Invalid value for ejb-jar client creation", ejbClientJarCreated, FileUtils.fileExists( checkedClientJarFile ) ); } protected void assertJarCreation( final MavenProject project, boolean ejbJarCreated, boolean ejbClientJarCreated ) { assertJarCreation( project, ejbJarCreated, ejbClientJarCreated, null ); } private void doAssertJarContent( final MavenProject project, final String fileName, final String[] expectedFiles, final String[] unexpectedFiles ) throws IOException { String checkedJarFile = project.getBuild().getDirectory() + "/" + fileName; if ( expectedFiles != null ) { final JarContentChecker inclusionChecker = new JarContentChecker(); // set expected jar contents for ( int i = 0; i < expectedFiles.length; i++ ) { String expectedFile = expectedFiles[i]; inclusionChecker.addFile( new File( expectedFile ) ); } assertTrue( inclusionChecker.isOK( new JarFile( checkedJarFile ) ) ); } if ( unexpectedFiles != null ) { final JarContentChecker exclusionChecker = new JarContentChecker(); for ( int i = 0; i < unexpectedFiles.length; i++ ) { String unexpectedFile = unexpectedFiles[i]; exclusionChecker.addFile( new File( unexpectedFile ) ); } assertFalse( exclusionChecker.isOK( new JarFile( checkedJarFile ) ) ); } } protected void assertJarContent( final MavenProject project, final String[] expectedFiles, final String[] unexpectedFiles ) throws IOException { doAssertJarContent( project, DEFAULT_JAR_NAME + ".jar", expectedFiles, unexpectedFiles ); } protected void assertClientJarContent( final MavenProject project, final String[] expectedFiles, final String[] unexpectedFiles ) throws IOException { doAssertJarContent( project, DEFAULT_JAR_NAME + "-client.jar", expectedFiles, unexpectedFiles ); } } maven-ejb-plugin-2.2/src/main/0000755000175000017500000000000011241312325016160 5ustar twernertwernermaven-ejb-plugin-2.2/src/main/java/0000755000175000017500000000000011241312325017101 5ustar twernertwernermaven-ejb-plugin-2.2/src/main/java/org/0000755000175000017500000000000011241312325017670 5ustar twernertwernermaven-ejb-plugin-2.2/src/main/java/org/apache/0000755000175000017500000000000011241312325021111 5ustar twernertwernermaven-ejb-plugin-2.2/src/main/java/org/apache/maven/0000755000175000017500000000000011241312325022217 5ustar twernertwernermaven-ejb-plugin-2.2/src/main/java/org/apache/maven/plugin/0000755000175000017500000000000011241312325023515 5ustar twernertwernermaven-ejb-plugin-2.2/src/main/java/org/apache/maven/plugin/ejb/0000755000175000017500000000000011241312325024255 5ustar twernertwernermaven-ejb-plugin-2.2/src/main/java/org/apache/maven/plugin/ejb/EjbMojo.java0000644000175000017500000002762011213020557026456 0ustar twernertwernerpackage org.apache.maven.plugin.ejb; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License 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. */ import org.apache.maven.archiver.MavenArchiveConfiguration; import org.apache.maven.archiver.MavenArchiver; import org.apache.maven.artifact.DependencyResolutionRequiredException; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.MavenProject; import org.apache.maven.project.MavenProjectHelper; import org.codehaus.plexus.archiver.ArchiverException; import org.codehaus.plexus.archiver.jar.JarArchiver; import org.codehaus.plexus.archiver.jar.ManifestException; import java.io.File; import java.io.IOException; import java.util.List; /** * Build an EJB (and optional client) from the current project. * * @author Emmanuel Venisse * @version $Id: EjbMojo.java 782452 2009-06-07 20:22:07Z bentmann $ * @goal ejb * @phase package */ public class EjbMojo extends AbstractMojo { private static final String EJB_JAR_XML = "META-INF/ejb-jar.xml"; // TODO: will null work instead? private static final String[] DEFAULT_INCLUDES = new String[]{"**/**"}; private static final String[] DEFAULT_EXCLUDES = new String[]{EJB_JAR_XML, "**/package.html"}; private static final String[] DEFAULT_CLIENT_EXCLUDES = new String[]{"**/*Bean.class", "**/*CMP.class", "**/*Session.class", "**/package.html"}; private static final String[] EMPTY_STRING_ARRAY = new String[0]; /** * The directory for the generated EJB. * * @parameter default-value="${project.build.directory}" * @required * @readonly */ private File basedir; /** * Directory that resources are copied to during the build. * * @parameter default-value="${project.build.outputDirectory}" expression="${outputDirectory}" * @required */ private File outputDirectory; /** * The name of the EJB file to generate. * * @parameter default-value="${project.build.finalName}" expression="${jarName}" * @required */ private String jarName; /** * Classifier to add to the artifact generated. If given, the artifact will * be an attachment instead. * * @parameter expression="${ejb.classifier}" */ private String classifier; /** * Whether the EJB client jar should be generated or not. * * @parameter default-value="false" expression="${ejb.generateClient}" */ private boolean generateClient; /** * The files and directories to exclude from the client jar. Usage: * *
     * <clientExcludes>
     *   <clientExclude>**/*Ejb.class</clientExclude>
     *   <clientExclude>**/*Bean.class</clientExclude>
     * </clientExcludes>
     * 
*
Attribute is used only if client jar is generated. *
Default exclusions: **/*Bean.class, **/*CMP.class, **/*Session.class, **/package.html * * @parameter */ private List clientExcludes; /** * The files and directories to include in the client jar. Usage: * *
     * <clientIncludes>
     *   <clientInclude>**/*</clientInclude>
     * </clientIncludes>
     * 
*
Attribute is used only if client jar is generated. *
Default value: **/** * * @parameter */ private List clientIncludes; /** * The files and directories to exclude from the main EJB jar. Usage: * *
     * <excludes>
     *   <exclude>**/*Ejb.class</exclude>
     *   <exclude>**/*Bean.class</exclude>
     * </excludes>
     * 
*
Default exclusions: META-INF/ejb-jar.xml, **/package.html * @parameter */ private List excludes; /** * The Maven project. * * @parameter expression="${project}" * @required * @readonly */ private MavenProject project; /** * The Jar archiver. * * @component role="org.codehaus.plexus.archiver.Archiver" roleHint="jar" */ private JarArchiver jarArchiver; /** * What EJB version should the EJB Plugin generate? Valid values are "2.x" or "3.x" * (where x is a digit). When ejbVersion is "3.x", the * ejb-jar.xml file is optional. *

* Usage: *

     * <ejbVersion>3.0</ejbVersion>
     * 
* * @parameter default-value="2.1" expression="${ejb.ejbVersion}" * @required * @since 2.1 */ private String ejbVersion; /** * The client Jar archiver. * * @component role="org.codehaus.plexus.archiver.Archiver" roleHint="jar" */ private JarArchiver clientJarArchiver; /** * The Maven project's helper. * * @component */ private MavenProjectHelper projectHelper; /** * The archive configuration to use. * See Maven Archiver Reference. * This version of the EJB Plugin uses Maven Archiver 2.4. * * @parameter */ private MavenArchiveConfiguration archive = new MavenArchiveConfiguration(); /** * Generates an EJB jar and optionally an ejb-client jar. * * @todo Add license files in META-INF directory. */ public void execute() throws MojoExecutionException { if ( getLog().isInfoEnabled() ) { getLog().info( "Building EJB " + jarName + " with EJB version " + ejbVersion ); } File jarFile = getEJBJarFile( basedir, jarName, classifier ); MavenArchiver archiver = new MavenArchiver(); archiver.setArchiver( jarArchiver ); archiver.setOutputFile( jarFile ); File deploymentDescriptor = new File( outputDirectory, EJB_JAR_XML ); /* test EJB version compliance */ if ( !ejbVersion.matches( "\\A[2-3]\\.[0-9]\\z" ) ) { throw new MojoExecutionException( "ejbVersion is not valid: " + ejbVersion + ". Must be 2.x or 3.x (where x is a digit)" ); } if ( ejbVersion.matches( "\\A2\\.[0-9]\\z" ) && !deploymentDescriptor.exists() ) { throw new MojoExecutionException( "Error assembling EJB: " + EJB_JAR_XML + " is required for ejbVersion 2.x" ); } try { String[] mainJarExcludes = DEFAULT_EXCLUDES; if ( excludes != null && !excludes.isEmpty() ) { mainJarExcludes = (String[]) excludes.toArray( EMPTY_STRING_ARRAY ); } archiver.getArchiver().addDirectory( outputDirectory, DEFAULT_INCLUDES, mainJarExcludes ); if ( deploymentDescriptor.exists() ) { archiver.getArchiver().addFile( deploymentDescriptor, EJB_JAR_XML ); } // create archive archiver.createArchive( project, archive ); } catch ( ArchiverException e ) { throw new MojoExecutionException( "There was a problem creating the EJB archive: " + e.getMessage(), e ); } catch ( ManifestException e ) { throw new MojoExecutionException( "There was a problem creating the EJB archive: " + e.getMessage(), e ); } catch ( IOException e ) { throw new MojoExecutionException( "There was a problem creating the EJB archive: " + e.getMessage(), e ); } catch ( DependencyResolutionRequiredException e ) { throw new MojoExecutionException( "There was a problem creating the EJB archive: " + e.getMessage(), e ); } // Handle the classifier if necessary if ( classifier != null ) { projectHelper.attachArtifact( project, "ejb", classifier, jarFile ); } else { project.getArtifact().setFile( jarFile ); } if ( generateClient ) { String clientJarName = jarName; if ( classifier != null ) { clientJarName += "-" + classifier; } getLog().info( "Building EJB client " + clientJarName + "-client" ); String[] excludes = DEFAULT_CLIENT_EXCLUDES; String[] includes = DEFAULT_INCLUDES; if ( clientIncludes != null && !clientIncludes.isEmpty() ) { includes = (String[]) clientIncludes.toArray( EMPTY_STRING_ARRAY ); } if ( clientExcludes != null && !clientExcludes.isEmpty() ) { excludes = (String[]) clientExcludes.toArray( EMPTY_STRING_ARRAY ); } File clientJarFile = new File( basedir, clientJarName + "-client.jar" ); MavenArchiver clientArchiver = new MavenArchiver(); clientArchiver.setArchiver( clientJarArchiver ); clientArchiver.setOutputFile( clientJarFile ); try { clientArchiver.getArchiver().addDirectory( outputDirectory, includes, excludes ); // create archive clientArchiver.createArchive( project, archive ); } catch ( ArchiverException e ) { throw new MojoExecutionException( "There was a problem creating the EJB client archive: " + e.getMessage(), e ); } catch ( ManifestException e ) { throw new MojoExecutionException( "There was a problem creating the EJB client archive: " + e.getMessage(), e ); } catch ( IOException e ) { throw new MojoExecutionException( "There was a problem creating the EJB client archive: " + e.getMessage(), e ); } catch ( DependencyResolutionRequiredException e ) { throw new MojoExecutionException( "There was a problem creating the EJB client archive: " + e.getMessage(), e ); } // TODO: shouldn't need classifer if ( classifier != null ) { projectHelper.attachArtifact( project, "ejb-client", classifier + "-client", clientJarFile ); } else { projectHelper.attachArtifact( project, "ejb-client", "client", clientJarFile ); } } } /** * Returns the EJB Jar file to generate, based on an optional classifier. * * @param basedir the output directory * @param finalName the name of the ear file * @param classifier an optional classifier * @return the EJB file to generate */ private static File getEJBJarFile( File basedir, String finalName, String classifier ) { if ( classifier == null ) { classifier = ""; } else if ( classifier.trim().length() > 0 && !classifier.startsWith( "-" ) ) { classifier = "-" + classifier; } return new File( basedir, finalName + classifier + ".jar" ); } } maven-ejb-plugin-2.2/src/main/assembly/0000755000175000017500000000000011241312325017777 5ustar twernertwernermaven-ejb-plugin-2.2/src/main/assembly/source-release.xml0000644000175000017500000000303611225632365023454 0ustar twernertwerner source-release tar.gz tar.bz2 zip ${project.basedir} / true **/*.iws **/*.ipr **/*.iml *.log target/** ${project.build.directory}/maven-shared-archive-resources/META-INF / maven-ejb-plugin-2.2/pom.xml0000644000175000017500000001417711225633534016006 0ustar twernertwerner 4.0.0 org.apache.maven.plugins maven-plugins 13 maven-ejb-plugin 2.2 maven-plugin Maven EJB Plugin Generates a J2EE Enterprise JavaBean (EJB) file as well as the associated client JAR. 2.0.6 scm:svn:http://svn.apache.org/repos/asf/maven/plugins/tags/maven-ejb-plugin-2.2 scm:svn:https://svn.apache.org/repos/asf/maven/plugins/tags/maven-ejb-plugin-2.2 http://svn.apache.org/viewvc/maven/plugins/tags/maven-ejb-plugin-2.2 JIRA http://jira.codehaus.org/browse/MEJB 2.0.6 org.apache.maven maven-plugin-api ${mavenVersion} org.apache.maven maven-project ${mavenVersion} org.apache.maven maven-artifact ${mavenVersion} org.apache.maven maven-archiver 2.4 org.codehaus.plexus plexus-component-api org.codehaus.plexus plexus-utils 1.5.8 org.codehaus.plexus plexus-archiver 1.0-alpha-11 org.codehaus.plexus plexus-component-api org.apache.maven.shared maven-plugin-testing-harness 1.1 test org.apache.maven.plugins maven-site-plugin 2.0 org.apache.maven.plugins maven-assembly-plugin 2.2-beta-4 run-its org.apache.maven.plugins maven-invoker-plugin 1.3 true src/it ${project.build.directory}/it */pom.xml setup verify ${project.build.directory}/local-repo src/it/settings.xml clean package integration-test install run release org.apache.maven.plugins maven-assembly-plugin single package src/main/assembly/source-release.xml gnu