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