Skip to content

Commit e59fed9

Browse files
committed
Fixed remaining tests for AS7 Managed profile
1 parent 96ffd34 commit e59fed9

5 files changed

Lines changed: 599 additions & 14 deletions

File tree

‎annotations/pom.xml‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,31 +29,26 @@
2929
<dependency>
3030
<groupId>org.ocpsoft.prettyfaces</groupId>
3131
<artifactId>prettyfaces-core</artifactId>
32-
<version>${project.version}</version>
3332
</dependency>
3433

3534
<dependency>
3635
<groupId>org.ocpsoft.rewrite</groupId>
3736
<artifactId>rewrite-impl-servlet</artifactId>
38-
<version>${version.rewrite}</version>
3937
</dependency>
4038

4139
<dependency>
4240
<groupId>org.ocpsoft.rewrite</groupId>
4341
<artifactId>rewrite-config-annotations-impl</artifactId>
44-
<version>${version.rewrite}</version>
4542
</dependency>
4643

4744
<dependency>
4845
<groupId>org.ocpsoft.rewrite</groupId>
4946
<artifactId>rewrite-integration-faces</artifactId>
50-
<version>${version.rewrite}</version>
5147
</dependency>
5248

5349
<dependency>
5450
<groupId>org.ocpsoft.prettyfaces</groupId>
5551
<artifactId>prettyfaces-test-harness</artifactId>
56-
<version>${project.version}</version>
5752
<scope>test</scope>
5853
</dependency>
5954

‎pom.xml‎

Lines changed: 275 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
<version.arquillian.jetty>1.0.0.CR1</version.arquillian.jetty>
4444
<version.jetty>8.1.2.v20120308</version.jetty>
4545
<version.jbossas>7.1.1.Final</version.jbossas>
46+
<container.download.dir>${java.io.tmpdir}/rewrite-arquillian-containers</container.download.dir>
4647
</properties>
4748

4849
<repositories>
@@ -88,6 +89,44 @@
8889

8990
<dependencyManagement>
9091
<dependencies>
92+
93+
<dependency>
94+
<groupId>org.ocpsoft.prettyfaces</groupId>
95+
<artifactId>prettyfaces-core</artifactId>
96+
<version>${project.version}</version>
97+
</dependency>
98+
99+
<dependency>
100+
<groupId>org.ocpsoft.prettyfaces</groupId>
101+
<artifactId>prettyfaces-annotations</artifactId>
102+
<version>${project.version}</version>
103+
</dependency>
104+
105+
<dependency>
106+
<groupId>org.ocpsoft.prettyfaces</groupId>
107+
<artifactId>prettyfaces-test-harness</artifactId>
108+
<version>${project.version}</version>
109+
<scope>test</scope>
110+
</dependency>
111+
112+
<dependency>
113+
<groupId>org.ocpsoft.rewrite</groupId>
114+
<artifactId>rewrite-impl-servlet</artifactId>
115+
<version>${version.rewrite}</version>
116+
</dependency>
117+
118+
<dependency>
119+
<groupId>org.ocpsoft.rewrite</groupId>
120+
<artifactId>rewrite-config-annotations-impl</artifactId>
121+
<version>${version.rewrite}</version>
122+
</dependency>
123+
124+
<dependency>
125+
<groupId>org.ocpsoft.rewrite</groupId>
126+
<artifactId>rewrite-integration-faces</artifactId>
127+
<version>${version.rewrite}</version>
128+
</dependency>
129+
91130
<!-- We are overriding version of ShrinkWrap Maven Resolver from
92131
Arquillian BOM -->
93132
<dependency>
@@ -169,13 +208,15 @@
169208
<plugin>
170209
<groupId>org.apache.maven.plugins</groupId>
171210
<artifactId>maven-surefire-plugin</artifactId>
211+
<version>2.12</version>
172212
<configuration>
173213
<argLine>-Xms256m -Xmx512m</argLine>
174214
</configuration>
175215
</plugin>
176216
</plugins>
177217
</build>
178218

219+
179220
<profiles>
180221
<profile>
181222
<id>JETTY_EMBEDDED_8.X</id>
@@ -220,10 +261,36 @@
220261
<dependency>
221262
<groupId>org.ocpsoft.logging</groupId>
222263
<artifactId>logging-adapter-slf4j</artifactId>
223-
<version>${version.logging}</version>
224264
<scope>test</scope>
225265
</dependency>
226266

267+
<!-- Weld servlet, EL and JSP required for testing CDI injections -->
268+
<!-- Don't use 'org.jboss.weld.servlet:weld-servlet' as it has
269+
an incompatible slf4j version shaded in -->
270+
<dependency>
271+
<groupId>org.jboss.weld.servlet</groupId>
272+
<artifactId>weld-servlet-core</artifactId>
273+
<version>1.1.4.Final</version>
274+
<scope>test</scope>
275+
</dependency>
276+
<dependency>
277+
<groupId>org.jboss.weld</groupId>
278+
<artifactId>weld-core</artifactId>
279+
<version>1.1.4.Final</version>
280+
<scope>test</scope>
281+
</dependency>
282+
283+
<dependency>
284+
<groupId>javax.enterprise</groupId>
285+
<artifactId>cdi-api</artifactId>
286+
<scope>test</scope>
287+
</dependency>
288+
<dependency>
289+
<groupId>org.glassfish</groupId>
290+
<artifactId>javax.faces</artifactId>
291+
<version>2.1.7</version>
292+
<scope>test</scope>
293+
</dependency>
227294
<dependency>
228295
<groupId>org.glassfish.web</groupId>
229296
<artifactId>el-impl</artifactId>
@@ -243,6 +310,16 @@
243310
<id>JBOSS_AS_MANAGED_7.X</id>
244311
<build>
245312
<plugins>
313+
<plugin>
314+
<groupId>org.apache.maven.plugins</groupId>
315+
<artifactId>maven-surefire-plugin</artifactId>
316+
<version>2.12</version>
317+
<configuration>
318+
<systemPropertyVariables>
319+
<arquillian.launch>jbossas_managed</arquillian.launch>
320+
</systemPropertyVariables>
321+
</configuration>
322+
</plugin>
246323
<plugin>
247324
<artifactId>maven-dependency-plugin</artifactId>
248325
<extensions>false</extensions>
@@ -261,13 +338,32 @@
261338
<version>${version.jbossas}</version>
262339
<type>zip</type>
263340
<overWrite>false</overWrite>
264-
<outputDirectory>../target</outputDirectory>
341+
<outputDirectory>${project.build.directory}/container</outputDirectory>
265342
</artifactItem>
266343
</artifactItems>
267344
</configuration>
268345
</execution>
269346
</executions>
270347
</plugin>
348+
<plugin>
349+
<artifactId>maven-antrun-plugin</artifactId>
350+
<version>1.7</version>
351+
<executions>
352+
<execution>
353+
<phase>process-test-classes</phase>
354+
<configuration>
355+
<target>
356+
<copy
357+
file="${user.dir}/test-harness/src/main/resources/jbossas-managed-standalone.xml"
358+
todir="${project.build.directory}/container/jboss-as-${version.jbossas}/standalone/configuration" />
359+
</target>
360+
</configuration>
361+
<goals>
362+
<goal>run</goal>
363+
</goals>
364+
</execution>
365+
</executions>
366+
</plugin>
271367
</plugins>
272368
</build>
273369
<dependencies>
@@ -305,6 +401,183 @@
305401
</dependency>
306402
</dependencies>
307403
</profile>
404+
405+
<profile>
406+
<id>GLASSFISH_MANAGED_3.1</id>
407+
<build>
408+
<plugins>
409+
<plugin>
410+
<artifactId>maven-antrun-plugin</artifactId>
411+
<version>1.7</version>
412+
<executions>
413+
<execution>
414+
<phase>generate-test-resources</phase>
415+
<goals>
416+
<goal>run</goal>
417+
</goals>
418+
<configuration>
419+
<target>
420+
<mkdir dir="${container.download.dir}" />
421+
<get dest="${container.download.dir}"
422+
verbose="true" skipexisting="true"
423+
src="http://download.java.net/glassfish/${version.glassfish}/release/glassfish-${version.glassfish}-web.zip" />
424+
<unzip
425+
src="${container.download.dir}/glassfish-${version.glassfish}-web.zip"
426+
dest="${project.build.directory}/container" />
427+
</target>
428+
</configuration>
429+
</execution>
430+
</executions>
431+
</plugin>
432+
<plugin>
433+
<groupId>org.apache.maven.plugins</groupId>
434+
<artifactId>maven-surefire-plugin</artifactId>
435+
<configuration>
436+
<systemProperties>
437+
<arquillian.launch>glassfish_managed</arquillian.launch>
438+
</systemProperties>
439+
</configuration>
440+
</plugin>
441+
</plugins>
442+
</build>
443+
<dependencies>
444+
<dependency>
445+
<groupId>org.jboss.arquillian.container</groupId>
446+
<artifactId>arquillian-glassfish-managed-3.1</artifactId>
447+
<version>${version.arquillian.glassfish}</version>
448+
<scope>test</scope>
449+
</dependency>
450+
<dependency>
451+
<groupId>org.jboss.spec</groupId>
452+
<artifactId>jboss-javaee-6.0</artifactId>
453+
<version>${version.jboss.spec}</version>
454+
<type>pom</type>
455+
<scope>provided</scope>
456+
</dependency>
457+
</dependencies>
458+
</profile>
459+
460+
<profile>
461+
<id>GLASSFISH_REMOTE_3.1</id>
462+
<dependencies>
463+
<dependency>
464+
<groupId>org.jboss.arquillian.container</groupId>
465+
<artifactId>arquillian-glassfish-remote-3.1</artifactId>
466+
<version>${version.arquillian.glassfish}</version>
467+
<scope>test</scope>
468+
</dependency>
469+
<dependency>
470+
<groupId>org.jboss.spec</groupId>
471+
<artifactId>jboss-javaee-6.0</artifactId>
472+
<version>${version.jboss.spec}</version>
473+
<type>pom</type>
474+
<scope>provided</scope>
475+
</dependency>
476+
</dependencies>
477+
</profile>
478+
479+
<profile>
480+
<id>TOMCAT_MANAGED_7_WELD</id>
481+
<build>
482+
<plugins>
483+
<plugin>
484+
<artifactId>maven-antrun-plugin</artifactId>
485+
<version>1.7</version>
486+
<executions>
487+
<execution>
488+
<phase>generate-test-resources</phase>
489+
<goals>
490+
<goal>run</goal>
491+
</goals>
492+
<configuration>
493+
<target>
494+
<mkdir dir="${container.download.dir}" />
495+
<get dest="${container.download.dir}"
496+
verbose="true" skipexisting="true"
497+
src="http://archive.apache.org/dist/tomcat/tomcat-7/v${version.tomcat}/bin/apache-tomcat-${version.tomcat}.zip" />
498+
<unzip
499+
src="${container.download.dir}/apache-tomcat-${version.tomcat}.zip"
500+
dest="${project.build.directory}/container" />
501+
<move
502+
file="${project.build.directory}/container/apache-tomcat-${version.tomcat}"
503+
tofile="${project.build.directory}/container/apache-tomcat-7" />
504+
<echo
505+
file="${project.build.directory}/container/apache-tomcat-7/conf/tomcat-users.xml">
506+
<![CDATA[
507+
<?xml version="1.0" encoding="UTF-8"?>
508+
<tomcat-users>
509+
<role rolename="manager-script"/>
510+
<user username="arquillian" password="arquillian" roles="manager-script"/>
511+
</tomcat-users>
512+
]]>
513+
</echo>
514+
</target>
515+
</configuration>
516+
</execution>
517+
</executions>
518+
</plugin>
519+
<plugin>
520+
<groupId>org.apache.maven.plugins</groupId>
521+
<artifactId>maven-surefire-plugin</artifactId>
522+
<configuration>
523+
<systemProperties>
524+
<arquillian.launch>tomcat_managed</arquillian.launch>
525+
<rewrite.test.cdi>weld</rewrite.test.cdi>
526+
</systemProperties>
527+
</configuration>
528+
</plugin>
529+
</plugins>
530+
</build>
531+
<dependencies>
532+
<dependency>
533+
<groupId>org.jboss.arquillian.container</groupId>
534+
<artifactId>arquillian-tomcat-managed-7</artifactId>
535+
<version>${version.arquillian.tomcat}</version>
536+
<scope>test</scope>
537+
</dependency>
538+
</dependencies>
539+
<repositories>
540+
<!-- We current need this because we have to use the SNAPSHOTS
541+
for the Tomcat container adapter -->
542+
<repository>
543+
<id>arquillian-snapshots</id>
544+
<url>https://repository-arquillian.forge.cloudbees.com/snapshot/</url>
545+
<releases>
546+
<enabled>false</enabled>
547+
</releases>
548+
<snapshots>
549+
<enabled>true</enabled>
550+
</snapshots>
551+
</repository>
552+
</repositories>
553+
</profile>
554+
555+
<profile>
556+
<id>TOMCAT_MANAGED_7_OWB</id>
557+
<build>
558+
<plugins>
559+
<plugin>
560+
<groupId>org.apache.maven.plugins</groupId>
561+
<artifactId>maven-surefire-plugin</artifactId>
562+
<configuration>
563+
<systemProperties>
564+
<arquillian.launch>tomcat_managed</arquillian.launch>
565+
<rewrite.test.cdi>owb</rewrite.test.cdi>
566+
</systemProperties>
567+
</configuration>
568+
</plugin>
569+
</plugins>
570+
</build>
571+
<dependencies>
572+
<dependency>
573+
<groupId>org.jboss.arquillian.container</groupId>
574+
<artifactId>arquillian-tomcat-managed-7</artifactId>
575+
<version>${version.arquillian.tomcat}</version>
576+
<scope>test</scope>
577+
</dependency>
578+
</dependencies>
579+
</profile>
580+
308581
</profiles>
309582

310583
<reporting>

‎shiro/pom.xml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
<dependency>
3030
<groupId>org.ocpsoft.prettyfaces</groupId>
3131
<artifactId>prettyfaces-annotations</artifactId>
32-
<version>${project.version}</version>
3332
</dependency>
3433

3534
<dependency>
@@ -49,7 +48,6 @@
4948
<dependency>
5049
<groupId>org.ocpsoft.prettyfaces</groupId>
5150
<artifactId>prettyfaces-test-harness</artifactId>
52-
<version>${project.version}</version>
5351
<scope>test</scope>
5452
</dependency>
5553

0 commit comments

Comments
 (0)