View Javadoc
1   package org.apache.maven.plugin.ear.it;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *  http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.io.File;
23  import java.io.FileInputStream;
24  import java.util.Properties;
25  import java.util.jar.JarFile;
26  import java.util.jar.Manifest;
27  
28  import org.apache.maven.it.util.IOUtil;
29  import org.codehaus.plexus.util.FileUtils;
30  import org.codehaus.plexus.util.ReaderFactory;
31  
32  /**
33   * @author <a href="snicoll@apache.org">Stephane Nicoll</a>
34   * @version $Id: EarMojoIT.java 1648055 2014-12-27 14:59:45Z khmarbaise $
35   * @noinspection JavaDoc
36   */
37  public class EarMojoIT
38      extends AbstractEarPluginIT
39  {
40  
41      /**
42       * Builds an EAR with a single EJB and no configuration.
43       */
44      public void testProject001()
45          throws Exception
46      {
47          doTestProject( "project-001", new String[] { "ejb-sample-one-1.0.jar" } );
48      }
49  
50      /**
51       * Builds an EAR with a customized artifact location and a customized artifact name.
52       */
53      public void testProject002()
54          throws Exception
55      {
56          doTestProject( "project-002", new String[] { "APP-INF/lib/ejb-sample-one-1.0.jar", "ejb-sample-two.jar" } );
57      }
58  
59      /**
60       * Builds an EAR with a default bundle directory for <tt>java</tt> modules.
61       */
62      public void testProject003()
63          throws Exception
64      {
65          doTestProject( "project-003", new String[] { "ejb-sample-one-1.0.jar", "APP-INF/lib/jar-sample-one-1.0.jar",
66              "APP-INF/lib/jar-sample-two-1.0.jar" } );
67      }
68  
69      /**
70       * Builds an EAR with a default bundle directory for _java_ modules and a custom location overriding the default.
71       */
72      public void testProject004()
73          throws Exception
74      {
75          doTestProject( "project-004", new String[] { "ejb-sample-one-1.0.jar", "jar-sample-one-1.0.jar",
76              "APP-INF/lib/jar-sample-two-1.0.jar" } );
77      }
78  
79      /**
80       * Builds an EAR with a custom URI.
81       */
82      public void testProject005()
83          throws Exception
84      {
85          doTestProject( "project-005", new String[] { "ejb-sample-one-1.0.jar", "libs/another-name.jar" } );
86      }
87  
88      /**
89       * Builds an EAR with an excluded module.
90       */
91      public void testProject006()
92          throws Exception
93      {
94          doTestProject( "project-006", new String[] { "ejb-sample-one-1.0.jar", "jar-sample-two-1.0.jar" } );
95      }
96  
97      /**
98       * Builds an EAR with a classified artifact and no extra configuration.
99       */
100     public void testProject007()
101         throws Exception
102     {
103         doTestProject( "project-007", new String[] { "ejb-sample-one-1.0-classified.jar" } );
104     }
105 
106     /**
107      * Builds an EAR with deployment descriptor configuration for J2EE 1.3.
108      */
109     public void testProject008()
110         throws Exception
111     {
112         doTestProject( "project-008", new String[] { "ejb-sample-one-1.0.jar" } );
113     }
114 
115     /**
116      * Builds an EAR with deployment descriptor configuration for J2EE 1.4.
117      */
118     public void testProject009()
119         throws Exception
120     {
121         doTestProject( "project-009", new String[] { "ejb-sample-one-1.0.jar" } );
122     }
123 
124     /**
125      * Builds an EAR with deployment descriptor configuration for Java EE 5.
126      */
127     public void testProject010()
128         throws Exception
129     {
130         doTestProject( "project-010", new String[] { "ejb-sample-one-1.0.jar" } );
131     }
132 
133     /**
134      * Builds an EAR and make sure that deployment descriptor default settings are applied.
135      */
136     public void testProject011()
137         throws Exception
138     {
139         doTestProject( "project-011", new String[] { "ejb-sample-one-1.0.jar" } );
140     }
141 
142     /**
143      * Builds an EAR and make sure that EAR resources are bundled within the EAR.
144      */
145     public void testProject012()
146         throws Exception
147     {
148         doTestProject( "project-012", new String[] { "README.txt", "LICENSE.txt", "ejb-sample-one-1.0.jar" } );
149     }
150 
151     /**
152      * Builds an EAR and make sure that EAR resources in a customized resources directory are bundled within the EAR.
153      */
154     public void testProject013()
155         throws Exception
156     {
157         doTestProject( "project-013", new String[] { "README.txt", "LICENSE.txt", "ejb-sample-one-1.0.jar" } );
158     }
159 
160     /**
161      * Builds an EAR and make sure that EAR resources are bundled within the EAR using includes and excludes.
162      */
163     public void testProject014()
164         throws Exception
165     {
166         doTestProject( "project-014", new String[] { "LICENSE.txt", "ejb-sample-one-1.0.jar" } );
167     }
168 
169     /**
170      * Builds an EAR and make sure that default manifest is taken into account.
171      */
172     public void testProject015()
173         throws Exception
174     {
175         final File baseDir = doTestProject( "project-015", new String[] { "ejb-sample-one-1.0.jar" } );
176         final File expectedManifest = new File( baseDir, "src/main/application/META-INF/MANIFEST.MF" );
177         final File actualManifest = new File( getEarDirectory( baseDir, "project-015" ), "META-INF/MANIFEST.MF" );
178         assertTrue( "Manifest was not copied", actualManifest.exists() );
179         assertTrue( FileUtils.contentEquals( expectedManifest, actualManifest ) );
180     }
181 
182     /**
183      * Builds an EAR and make sure that custom manifest is taken into account.
184      */
185     public void testProject016()
186         throws Exception
187     {
188         final File baseDir = doTestProject( "project-016", new String[] { "ejb-sample-one-1.0.jar" } );
189 
190         final File targetFolder = new File( baseDir, "target" );
191         final File createdEarFile = new File( targetFolder, "maven-ear-plugin-test-project-016-99.0.ear" );
192 
193         final File sourceManifestFile = new File( baseDir, "src/main/ear/MANIFEST.MF" );
194 
195         JarFile jarFile = new JarFile( createdEarFile );
196         Manifest manifestFromCreatedEARFile = jarFile.getManifest();
197         jarFile.close();
198 
199         Manifest sourceManifest = new Manifest( new FileInputStream( sourceManifestFile ) );
200 
201         assertTrue( "There are differences in the manifest.", sourceManifest.equals( manifestFromCreatedEARFile ) );
202     }
203 
204     /**
205      * Builds an EAR and make sure that custom application.xml is taken into account.
206      */
207     public void testProject017()
208         throws Exception
209     {
210         doTestProject( "project-017", new String[] { "ejb-sample-one-1.0.jar" } );
211     }
212 
213     /**
214      * Builds an EAR with a custom final name.
215      */
216     public void testProject018()
217         throws Exception
218     {
219         final File baseDir = executeMojo( "project-018", new Properties() );
220         final File expectedFile = new File( baseDir, "target/my-custom-file.ear" );
221         assertTrue( "EAR archive not found", expectedFile.exists() );
222     }
223 
224     /**
225      * Builds an EAR with unpacked archives using the unpackTypes.
226      */
227     public void testProject019()
228         throws Exception
229     {
230         doTestProject( "project-019", new String[] { "ejb-sample-one-1.0.jar", "sar-sample-one-1.0.sar",
231             "jar-sample-one-1.0.jar" }, new boolean[] { false, true, true } );
232     }
233 
234     /**
235      * Builds an EAR with unpacked archives using the unpack module attribute.
236      */
237     public void testProject020()
238         throws Exception
239     {
240         doTestProject( "project-020", new String[] { "ejb-sample-one-1.0.jar", "sar-sample-one-1.0.sar",
241             "jar-sample-one-1.0.jar" }, new boolean[] { true, false, false } );
242     }
243 
244     /**
245      * Builds an EAR with unpacked archives using both unpackTypes and the unpack module attribute.
246      */
247     public void testProject021()
248         throws Exception
249     {
250         doTestProject( "project-021", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar",
251             "sar-sample-one-1.0.sar", "jar-sample-one-1.0.jar", "jar-sample-two-1.0.jar" }, new boolean[] { false,
252             true, false, false, true } );
253     }
254 
255     /**
256      * Builds an EAR with a classifier.
257      */
258     public void testProject022()
259         throws Exception
260     {
261         final File baseDir = executeMojo( "project-022", new Properties() );
262         final File expectedFile = new File( baseDir, "target/maven-ear-plugin-test-project-022-99.0-myclassifier.ear" );
263         assertTrue( "EAR archive not found", expectedFile.exists() );
264     }
265 
266     /**
267      * Builds an EAR and make sure that a single classified dependency is detected without specifying the classifier.
268      */
269     public void testProject023()
270         throws Exception
271     {
272         doTestProject( "project-023", new String[] { "ejb-sample-one-1.0-classified.jar", "ejb-sample-two-1.0.jar" },
273                        new boolean[] { true, false } );
274     }
275 
276     /**
277      * Builds an EAR and make sure that a single classified dependency is detected when specifying the classifier.
278      */
279     public void testProject024()
280         throws Exception
281     {
282         doTestProject( "project-024", new String[] { "ejb-sample-one-1.0-classified.jar", "ejb-sample-two-1.0.jar" },
283                        new boolean[] { true, false } );
284     }
285 
286     /**
287      * Builds an EAR and make sure that a classified dependency with mutiple candidates is detected when specifying the
288      * classifier.
289      */
290     public void testProject025()
291         throws Exception
292     {
293         doTestProject( "project-025", new String[] { "ejb-sample-one-1.0-classified.jar", "ejb-sample-one-1.0.jar" },
294                        new boolean[] { true, false } );
295     }
296 
297     /**
298      * Builds an EAR and make sure that the build fails if a unclassifed module configuration with mutiple candidates is
299      * specified.
300      */
301     public void testProject026()
302         throws Exception
303     {
304         final File baseDir = executeMojo( "project-026", new Properties(), false );
305         // Stupido, checks that the ear archive is not there
306         assertFalse( "Execution should have failed", getEarArchive( baseDir, "project-026" ).exists() );
307     }
308 
309     /**
310      * Builds an EAR and make sure that provided dependencies are not included in the EAR.
311      */
312     public void testProject027()
313         throws Exception
314     {
315         doTestProject( "project-027", new String[] { "ejb-sample-one-1.0.jar" } );
316     }
317 
318     /**
319      * Builds an EAR and make sure that test dependencies are not included in the EAR.
320      */
321     public void testProject028()
322         throws Exception
323     {
324         doTestProject( "project-028", new String[] { "ejb-sample-one-1.0.jar" } );
325     }
326 
327     /**
328      * Builds an EAR and make sure that system dependencies are not included in the EAR.
329      */
330     public void testProject029()
331         throws Exception
332     {
333         doTestProject( "project-029", new String[] { "ejb-sample-one-1.0.jar" } );
334     }
335 
336     /**
337      * Builds an EAR and make sure that ejb-client dependencies are detected and not added by default in the generated
338      * application.xml.
339      */
340     public void testProject030()
341         throws Exception
342     {
343         doTestProject( "project-030", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0-client.jar" } );
344     }
345 
346     /**
347      * Builds an EAR with a Jboss 4 configuration specifying the security domain and the unauthenticated-principal to
348      * use.
349      */
350     public void testProject031()
351         throws Exception
352     {
353         doTestProject( "project-031", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
354     }
355 
356     /**
357      * Builds an EAR with a Jboss 3.2 configuration specifying the jmx-name to use.
358      */
359     public void testProject032()
360         throws Exception
361     {
362         doTestProject( "project-032", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
363     }
364 
365     /**
366      * Builds an EAR with a Jboss 4 configuration and Jboss specific modules.
367      */
368     public void testProject033()
369         throws Exception
370     {
371         doTestProject( "project-033", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar",
372             "sar-sample-one-1.0.sar", "har-sample-one-1.0.har" } );
373     }
374 
375     /**
376      * Builds an EAR with custom security settings.
377      */
378     public void testProject034()
379         throws Exception
380     {
381         doTestProject( "project-034", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
382     }
383 
384     /**
385      * Builds an EAR with a full filename mapping and make sure that custom locations are not overridden.
386      */
387     public void testProject035()
388         throws Exception
389     {
390         doTestProject( "project-035", new String[] { "foo/eartest-ejb-sample-one-1.0.jar",
391             "eartest-ejb-sample-two-1.0.jar", "libs/eartest-jar-sample-one-1.0.jar",
392             "libs/eartest-jar-sample-two-1.0.jar", "sar-sample-one.sar" } );
393     }
394 
395     /**
396      * Builds an EAR with a full filename mapping and make sure that groupIds with dots are replaced by dashes in
397      * filenames.
398      */
399     public void testProject036()
400         throws Exception
401     {
402         doTestProject( "project-036", new String[] { "foo/eartest-ejb-sample-one-1.0.jar",
403             "eartest-ejb-sample-two-1.0.jar", "com-foo-bar-ejb-sample-one-1.0.jar",
404             "com-foo-bar-ejb-sample-two-1.0.jar", "libs/eartest-jar-sample-one-1.0.jar",
405             "libs/eartest-jar-sample-two-1.0.jar", "sar-sample-one.sar" } );
406     }
407 
408     /**
409      * Builds an EAR and make sure that ejb-client dependencies are detected and added in the generated application.xml
410      * if includeInApplicationXml is set.
411      */
412     public void testProject037()
413         throws Exception
414     {
415         doTestProject( "project-037", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0-client.jar" } );
416     }
417 
418     /**
419      * Builds an EAR and make sure that a non-classified dependency with mutiple candidates is detected when specifying
420      * the mainArtifactId as classifier.
421      */
422     public void testProject038()
423         throws Exception
424     {
425         doTestProject( "project-038", new String[] { "ejb-sample-one-1.0-classified.jar", "ejb-sample-one-1.0.jar" },
426                        new boolean[] { false, true } );
427     }
428 
429     /**
430      * Builds an EAR with a Jboss 4 configuration specifying specifying the loader repository to use.
431      */
432     public void testProject039()
433         throws Exception
434     {
435         doTestProject( "project-039", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
436     }
437 
438     /**
439      * Builds an EAR with deployment descriptor configuration for Java EE 5 and an alternative deployment descriptor.
440      */
441     public void testProject040()
442         throws Exception
443     {
444         doTestProject( "project-040", new String[] { "ejb-sample-one-1.0.jar" } );
445     }
446 
447     /**
448      * Builds an EAR with a Jboss 4.2 configuration specifying the module order to use.
449      */
450     public void testProject041()
451         throws Exception
452     {
453         doTestProject( "project-041", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
454     }
455 
456     /**
457      * Builds an EAR with a Jboss 4.2 configuration specifying a datasource to add.
458      */
459     public void testProject042()
460         throws Exception
461     {
462         doTestProject( "project-042", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
463     }
464 
465     /**
466      * Builds an EAR with a custom descriptor location (generatedDescriptorLocation setting).
467      */
468     public void testProject043()
469         throws Exception
470     {
471         final File baseDir = doTestProject( "project-043", new String[] { "ejb-sample-one-1.0.jar" } );
472         final File expectedApplicationXml = new File( baseDir, "target/custom-descriptor-dir/application.xml" );
473         assertTrue( "Application.xml file not found", expectedApplicationXml.exists() );
474         assertFalse( "Application.xml file should not be empty", expectedApplicationXml.length() == 0 );
475     }
476 
477     /**
478      * Builds an EAR with a custom library-directory.
479      */
480     public void testProject044()
481         throws Exception
482     {
483         doTestProject( "project-044", new String[] { "ejb-sample-one-1.0.jar", "myLibs/jar-sample-one-1.0.jar" } );
484     }
485 
486     /**
487      * Builds an EAR and filter the content of the sources directory.
488      */
489     public void testProject045()
490         throws Exception
491     {
492         final File baseDir = doTestProject( "project-045", new String[] { "README.txt", "ejb-sample-one-1.0.jar" } );
493         final File actualReadme = new File( getEarDirectory( baseDir, "project-045" ), "README.txt" );
494         final String content = IOUtil.toString( ReaderFactory.newReader( actualReadme, "UTF-8" ) );
495         assertTrue( "application name and version was not filtered properly", content.contains( "my-app 99.0" ) );
496         assertTrue( "Escaping did not work properly", content.contains( "will not be filtered ${application.name}." ) );
497     }
498 
499     /**
500      * Builds an EAR and filter the content of the sources directory using a custom filter file.
501      */
502     public void testProject046()
503         throws Exception
504     {
505         final File baseDir = doTestProject( "project-046", new String[] { "README.txt", "ejb-sample-one-1.0.jar" } );
506         final File actualReadme = new File( getEarDirectory( baseDir, "project-046" ), "README.txt" );
507         final String content = IOUtil.toString( ReaderFactory.newReader( actualReadme, "UTF-8" ) );
508         assertTrue( "application name and version was not filtered properly", content.contains( "my-app 99.0" ) );
509         assertTrue( "application build was not filtered properly", content.contains( "(Build 2)" ) );
510         assertTrue( "Unknown property should not have been filtered",
511                     content.contains( "will not be filtered ${application.unknown}." ) );
512     }
513 
514     /**
515      * Builds an EAR and filter the content with a list of extensions.
516      */
517     public void testProject047()
518         throws Exception
519     {
520         final File baseDir = doTestProject( "project-047", new String[] { "README.txt", "ejb-sample-one-1.0.jar" } );
521         final File actualReadme = new File( getEarDirectory( baseDir, "project-047" ), "README.txt" );
522         final String content = IOUtil.toString( ReaderFactory.newReader( actualReadme, "UTF-8" ) );
523         assertTrue( "application name and version should not have been filtered", !content.contains( "my-app 99.0" ) );
524         assertTrue( "original properties not found", content.contains( "${application.name} ${project.version}" ) );
525     }
526 
527     /**
528      * Builds an EAR with a Jboss 5 configuration containing library directory.
529      */
530     public void testProject048()
531         throws Exception
532     {
533         doTestProject( "project-048", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
534     }
535 
536     /**
537      * Builds an EAR with a Jboss 4.2 configuration containing a library directory.
538      */
539     public void testProject049()
540         throws Exception
541     {
542         doTestProject( "project-049", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
543     }
544 
545     /**
546      * Builds an EAR with a Jboss 5 configuration containing a loader repository configuration definition.
547      */
548     public void testProject050()
549         throws Exception
550     {
551         doTestProject( "project-050", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
552     }
553 
554     /**
555      * Builds an EAR with a Jboss 5 configuration containing a loader repository class definition.
556      */
557     public void testProject051()
558         throws Exception
559     {
560         doTestProject( "project-051", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
561     }
562 
563     /**
564      * Builds an EAR with a Jboss 5 configuration containing a configuration parser class definition.
565      */
566     public void testProject052()
567         throws Exception
568     {
569         doTestProject( "project-052", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
570     }
571 
572     /**
573      * Builds an EAR with a Jboss 5 configuration containing only the loader repo configuration
574      */
575     public void testProject053()
576         throws Exception
577     {
578         doTestProject( "project-053", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
579     }
580 
581     /**
582      * Builds an EAR with deployment descriptor configuration for Java EE 5 and no application.xml
583      */
584     public void testProject054()
585         throws Exception
586     {
587         doTestProject( "project-054", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
588     }
589 
590     /**
591      * Builds an EAR with jar dependencies added in application.xml.
592      */
593     public void testProject055()
594         throws Exception
595     {
596         doTestProject( "project-055", new String[] { "jar-sample-one-1.0.jar", "jar-sample-two-1.0.jar",
597             "jar-sample-three-with-deps-1.0.jar" } );
598     }
599 
600     /**
601      * Builds an EAR with deployment descriptor configuration for J2EE 1.4 and an alternative deployment descriptor.
602      */
603     public void testProject056()
604         throws Exception
605     {
606         doTestProject( "project-056", new String[] { "ejb-sample-one-1.0.jar" } );
607     }
608 
609     /**
610      * Builds an EAR with a complete JBoss 4.2 configuration and validate it matches the DTD (MEAR-104).
611      */
612     public void testProject057()
613         throws Exception
614     {
615         doTestProject( "project-057", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
616     }
617 
618     /**
619      * Builds an EAR with deployment descriptor configuration for Java EE 6.
620      */
621     public void testProject058()
622         throws Exception
623     {
624         doTestProject( "project-058", new String[] { "ejb-sample-one-1.0.jar" } );
625     }
626 
627     /**
628      * Builds an EAR with no display name entry at all.
629      */
630     public void testProject059()
631         throws Exception
632     {
633         doTestProject( "project-059", new String[] { "ejb-sample-one-1.0.jar" } );
634     }
635 
636     /**
637      * Builds an EAR with ejb-client packaged for J2EE 1.3 (MEAR-85)
638      * 
639      * @throws Exception
640      */
641     public void testProject060()
642         throws Exception
643     {
644         doTestProject( "project-060", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0-client.jar" } );
645     }
646 
647     /**
648      * Builds an EAR with ejb-client packaged for J2EE 1.4 (MEAR-85)
649      * 
650      * @throws Exception
651      */
652     public void testProject061()
653         throws Exception
654     {
655         doTestProject( "project-061", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0-client.jar" } );
656     }
657 
658     /**
659      * Builds an EAR with ejb-client packaged for JavaEE 5 (MEAR-85)
660      * 
661      * @throws Exception
662      */
663     public void testProject062()
664         throws Exception
665     {
666         doTestProject( "project-062", new String[] { "ejb-sample-one-1.0.jar", "lib/ejb-sample-two-1.0-client.jar" } );
667     }
668 
669     /**
670      * Builds an EAR with ejb-client packaged for JavaEE 6 (MEAR-85)
671      * 
672      * @throws Exception
673      */
674     public void testProject063()
675         throws Exception
676     {
677         doTestProject( "project-063", new String[] { "lib/ejb-sample-two-1.0-client.jar" } );
678     }
679 
680     /**
681      * Builds an EAR with ejb-client packaged for JavaEE 5 and still put it in the root (MEAR-85)
682      * 
683      * @throws Exception
684      */
685     public void testProject064()
686         throws Exception
687     {
688         doTestProject( "project-064", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0-client.jar" } );
689     }
690 
691     /**
692      * Builds an EAR with a custom moduleId.
693      */
694     public void testProject065()
695         throws Exception
696     {
697         doTestProject( "project-065", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
698     }
699 
700     /**
701      * Builds an EAR with generateModuleId enabled.
702      */
703     public void testProject066()
704         throws Exception
705     {
706         doTestProject( "project-066", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
707     }
708 
709     /**
710      * Builds an EAR with generateModuleId enabled and a custom module.
711      */
712     public void testProject067()
713         throws Exception
714     {
715         doTestProject( "project-067", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
716     }
717 
718     /**
719      * Builds an EAR with the no-version file name mapping.
720      */
721     public void testProject068()
722         throws Exception
723     {
724         doTestProject( "project-068", new String[] { "ejb-sample-one.jar", "ejb-sample-two.jar" } );
725     }
726 
727     /**
728      * Builds an EAR with a custom library-directory and JavaEE 6.
729      */
730     public void testProject069()
731         throws Exception
732     {
733         doTestProject( "project-069", new String[] { "ejb-sample-one-1.0.jar", "myLibs/jar-sample-one-1.0.jar" } );
734     }
735 
736     /**
737      * Builds an EAR with application-name and initialize-in-order tags.
738      */
739     public void testProject070()
740         throws Exception
741     {
742         doTestProject( "project-070", new String[] { "ejb-sample-one-1.0.jar", "jar-sample-one-1.0.jar" } );
743     }
744 
745     /**
746      * Builds an EAR with application-name and initialize-in-order tags for unsupported version.
747      */
748     public void testProject071()
749         throws Exception
750     {
751         doTestProject( "project-071", new String[] { "ejb-sample-one-1.0.jar", "jar-sample-one-1.0.jar" } );
752     }
753 
754     /**
755      * Builds an EAR with an application client module (app-client).
756      */
757     public void testProject072()
758         throws Exception
759     {
760         doTestProject( "project-072", new String[] { "ejb-sample-one-1.0.jar", "app-client-sample-one-1.0.jar" } );
761     }
762 
763     /**
764      * Builds an EAR with an application client module (app-client) and a default bundle directory for _java_ modules.
765      */
766     public void testProject073()
767         throws Exception
768     {
769         doTestProject( "project-073", new String[] { "ejb-sample-one-1.0.jar", "app-client-sample-one-1.0.jar",
770             "APP-INF/lib/jar-sample-one-1.0.jar", "APP-INF/lib/jar-sample-two-1.0.jar" } );
771     }
772 
773     /**
774      * Builds an EAR with custom env entries settings and J2EE 1.3. Not supported by the specification so this should be
775      * ignored.
776      */
777     public void testProject074()
778         throws Exception
779     {
780         doTestProject( "project-074", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
781     }
782 
783     /**
784      * Builds an EAR with custom env entries settings and J2EE 1.4. Not supported by the specification so this should be
785      * ignored.
786      */
787     public void testProject075()
788         throws Exception
789     {
790         doTestProject( "project-075", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
791     }
792 
793     /**
794      * Builds an EAR with custom env entries settings and JavaEE 5. Not supported by the specification so this should be
795      * ignored.
796      */
797     public void testProject076()
798         throws Exception
799     {
800         doTestProject( "project-076", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
801     }
802 
803     /**
804      * Builds an EAR with custom env entries settings and JavaEE 6.
805      */
806     public void testProject077()
807         throws Exception
808     {
809         doTestProject( "project-077", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
810     }
811 
812     /**
813      * Builds an EAR with the no version for ejb file name mapping.
814      */
815     public void testProject078()
816         throws Exception
817     {
818         doTestProject( "project-078", new String[] { "ejb-sample-one.jar", "war-sample-one-1.0.war",
819             "jar-sample-two-1.0.jar" } );
820     }
821 
822     /**
823      * Builds an EAR with the 'default' library directory mode. Uses the value of the defaultLibBundleDir.
824      */
825     public void testProject079()
826         throws Exception
827     {
828         doTestProject( "project-079", new String[] { "ejb-sample-one-1.0.jar", "myLibs/jar-sample-one-1.0.jar" } );
829     }
830 
831     /**
832      * Builds an EAR with the 'empty' library directory mode. Generate an empty library-directory element.
833      */
834     public void testProject080()
835         throws Exception
836     {
837         doTestProject( "project-080", new String[] { "ejb-sample-one-1.0.jar", "myLibs/jar-sample-one-1.0.jar" } );
838     }
839 
840     /**
841      * Builds an EAR with the 'none' library directory mode. Does not generate an library-directory element.
842      */
843     public void testProject081()
844         throws Exception
845     {
846         doTestProject( "project-081", new String[] { "ejb-sample-one-1.0.jar", "myLibs/jar-sample-one-1.0.jar" } );
847     }
848 
849     /**
850      * Builds an EAR with deployment descriptor configuration for JavaEE 7.
851      */
852     public void testProject082()
853         throws Exception
854     {
855         doTestProject( "project-082", new String[] { "ejb-sample-one-1.0.jar" } );
856     }
857 
858     /**
859      * Builds an EAR with a library directory and custom env entries. The library-directory element must come first
860      * (MEAR-158).
861      */
862     public void testProject083()
863         throws Exception
864     {
865         doTestProject( "project-083", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
866     }
867 
868     /**
869      * Support of an application id (MEAR-174).
870      */
871     public void testProject084()
872         throws Exception
873     {
874         doTestProject( "project-084", new String[] { "ejb-sample-one-1.0.jar" } );
875     }
876     
877     /**
878      * Builds an EAR with custom ejbRef entries settings and JavaEE 6.
879      */
880     public void testProject085()
881         throws Exception
882     {
883         doTestProject( "project-085", new String[] { "ejb-sample-one-1.0.jar", "ejb-sample-two-1.0.jar" } );
884     }
885 
886 
887 }