- add profiles for different container - change to JDK 7 - add RunConfig for WildFly - Precondition for WildFly: Installed WildFly and JDK 7 - MS JEE-Testapp-04
Hafid Haddouti

Hafid Haddouti commited on 2014-04-27 22:36:05
Zeige 10 geänderte Dateien mit 170 Einfügungen und 30 Löschungen.


Change-Id: I14b343d42eb51b7f7c5d1247dbe7c8b45ca2645b
... ...
@@ -6,21 +6,22 @@
6 6
 			<attribute name="maven.pomderived" value="true"/>
7 7
 		</attributes>
8 8
 	</classpathentry>
9
+	<classpathentry including="**/*.java" kind="src" path="src/test/resources"/>
9 10
 	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
10 11
 		<attributes>
11 12
 			<attribute name="optional" value="true"/>
12 13
 			<attribute name="maven.pomderived" value="true"/>
13 14
 		</attributes>
14 15
 	</classpathentry>
15
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
16
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
16 17
 		<attributes>
17 18
 			<attribute name="maven.pomderived" value="true"/>
19
+			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
18 20
 		</attributes>
19 21
 	</classpathentry>
20
-	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
22
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
21 23
 		<attributes>
22 24
 			<attribute name="maven.pomderived" value="true"/>
23
-			<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
24 25
 		</attributes>
25 26
 	</classpathentry>
26 27
 	<classpathentry kind="output" path="target/classes"/>
... ...
@@ -1,4 +1,5 @@
1 1
 eclipse.preferences.version=1
2 2
 encoding//src/main/java=UTF-8
3 3
 encoding//src/test/java=UTF-8
4
+encoding//src/test/resources=UTF-8
4 5
 encoding/<project>=UTF-8
... ...
@@ -1,8 +1,12 @@
1 1
 eclipse.preferences.version=1
2 2
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
4
-org.eclipse.jdt.core.compiler.compliance=1.6
3
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
4
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5
+org.eclipse.jdt.core.compiler.compliance=1.7
6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
8
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
5 9
 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
6 10
 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
7 11
 org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
8
-org.eclipse.jdt.core.compiler.source=1.6
12
+org.eclipse.jdt.core.compiler.source=1.7
... ...
@@ -1,4 +1,4 @@
1
-activeProfiles=
1
+activeProfiles=arquillian-glassfish-embedded
2 2
 eclipse.preferences.version=1
3 3
 resolveWorkspaceProjects=true
4 4
 version=1
... ...
@@ -1,5 +1,4 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<project-modules id="moduleCoreId" project-version="1.5.0">
1
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
3 2
     <wb-module deploy-name="testapp-jee6">
4 3
         <wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/>
5 4
         <wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/>
... ...
@@ -1,9 +1,9 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <faceted-project>
3 3
   <fixed facet="wst.jsdt.web"/>
4
-  <installed facet="java" version="1.6"/>
5 4
   <installed facet="jst.web" version="3.0"/>
6 5
   <installed facet="jst.jaxrs" version="1.1"/>
7 6
   <installed facet="jst.jsf" version="2.0"/>
8 7
   <installed facet="wst.jsdt.web" version="1.0"/>
8
+  <installed facet="java" version="1.7"/>
9 9
 </faceted-project>
... ...
@@ -4,7 +4,7 @@
4 4
 
5 5
 	<groupId>com.haddouti.pg</groupId>
6 6
 	<artifactId>testapp-jee6</artifactId>
7
-	<version>0.0.1-SNAPSHOT</version>
7
+	<version>0.0.4-SNAPSHOT</version>
8 8
 	<packaging>war</packaging>
9 9
 
10 10
 	<name>testapp-jee6</name>
... ...
@@ -43,8 +43,8 @@
43 43
 				<artifactId>maven-compiler-plugin</artifactId>
44 44
 				<version>2.3.2</version>
45 45
 				<configuration>
46
-					<source>1.6</source>
47
-					<target>1.6</target>
46
+					<source>1.7</source>
47
+					<target>1.7</target>
48 48
 					<compilerArguments>
49 49
 						<endorseddirs>${endorsed.dir}</endorseddirs>
50 50
 					</compilerArguments>
... ...
@@ -54,7 +54,7 @@
54 54
 			<!-- Updating the Surefire plugin to resolve a bug with clearing the context -->
55 55
 			<plugin>
56 56
 				<artifactId>maven-surefire-plugin</artifactId>
57
-				<version>2.12</version>
57
+				<version>2.17</version>
58 58
 			</plugin>
59 59
 
60 60
 			<plugin>
... ...
@@ -68,9 +68,12 @@
68 68
 		</plugins>
69 69
 	</build>
70 70
 
71
-
71
+	<profiles>
72
+		<profile>
73
+			<id>arquillian-weld-embedded</id>
72 74
 			<dependencies>
73
-		<!-- JEE Spec 
75
+
76
+				<!-- JEE Spec -->
74 77
 				<dependency>
75 78
 					<groupId>org.jboss.spec</groupId>
76 79
 					<artifactId>jboss-javaee-6.0</artifactId>
... ...
@@ -78,27 +81,31 @@
78 81
 					<type>pom</type>
79 82
 					<scope>provided</scope>
80 83
 				</dependency>
81
-		-->
82 84
 
83
-		<!-- Testing: JUnit, Arquillian -->
85
+				<!-- Arquillian Container: Weld EE container -->
84 86
 				<dependency>
85
-			<groupId>junit</groupId>
86
-			<artifactId>junit</artifactId>
87
+					<groupId>org.jboss.arquillian.container</groupId>
88
+					<artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
89
+					<version>1.0.0.CR3</version>
87 90
 					<scope>test</scope>
88 91
 				</dependency>
89 92
 				<dependency>
90
-			<groupId>org.jboss.arquillian.junit</groupId>
91
-			<artifactId>arquillian-junit-container</artifactId>
93
+					<groupId>org.jboss.weld</groupId>
94
+					<artifactId>weld-core</artifactId>
95
+					<version>1.1.5.Final</version>
92 96
 					<scope>test</scope>
93 97
 				</dependency>
94
-
95
-		<!-- Arquillian Container: Weld EE container <dependency> <groupId>org.jboss.arquillian.container</groupId> 
96
-			<artifactId>arquillian-weld-ee-embedded-1.1</artifactId> <version>1.0.0.CR3</version> 
97
-			<scope>test</scope> </dependency> <dependency> <groupId>org.jboss.weld</groupId> 
98
-			<artifactId>weld-core</artifactId> <version>1.1.5.Final</version> <scope>test</scope> 
99
-			</dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> 
100
-			<version>1.6.4</version> <scope>test</scope> </dependency> -->
101
-
98
+				<dependency>
99
+					<groupId>org.slf4j</groupId>
100
+					<artifactId>slf4j-simple</artifactId>
101
+					<version>1.6.4</version>
102
+					<scope>test</scope>
103
+				</dependency>
104
+			</dependencies>
105
+		</profile>
106
+		<profile>
107
+			<id>arquillian-glassfish-embedded</id>
108
+			<dependencies>
102 109
 				<!-- ArquillianContainer: Glassfish embedded -->
103 110
 				<dependency>
104 111
 					<groupId>org.jboss.arquillian.container</groupId>
... ...
@@ -112,7 +119,54 @@
112 119
 					<version>3.1.2</version>
113 120
 					<scope>provided</scope>
114 121
 				</dependency>
122
+			</dependencies>
123
+		</profile>
124
+		<profile>
125
+			<id>arquillian-wildfly-embedded</id>
115 126
 
127
+			<dependencies>
128
+				<!-- JEE Spec -->
129
+				<dependency>
130
+					<groupId>org.jboss.spec</groupId>
131
+					<artifactId>jboss-javaee-6.0</artifactId>
132
+					<version>1.0.0.Final</version>
133
+					<type>pom</type>
134
+					<scope>provided</scope>
135
+				</dependency>
136
+
137
+				<!-- Arquillian Container: WildFly 8 Embedded 
138
+				Pay attention, that this container expects an installed WildFly,
139
+				referenced in the arquillian.xml
140
+				-->
141
+				<dependency>
142
+					<groupId>org.wildfly</groupId>
143
+					<artifactId>wildfly-arquillian-container-embedded</artifactId>
144
+					<version>8.1.0.CR1</version>
145
+					<scope>test</scope>
146
+				</dependency>
147
+				<dependency>
148
+					<groupId>org.wildfly</groupId>
149
+					<artifactId>wildfly-embedded</artifactId>
150
+					<version>8.1.0.CR1</version>
151
+					<scope>test</scope>
152
+				</dependency>
153
+			</dependencies>
154
+		</profile>
155
+	</profiles>
156
+
157
+	<dependencies>
158
+
159
+		<!-- Testing: JUnit, Arquillian -->
160
+		<dependency>
161
+			<groupId>junit</groupId>
162
+			<artifactId>junit</artifactId>
163
+			<scope>test</scope>
164
+		</dependency>
165
+		<dependency>
166
+			<groupId>org.jboss.arquillian.junit</groupId>
167
+			<artifactId>arquillian-junit-container</artifactId>
168
+			<scope>test</scope>
169
+		</dependency>
116 170
 	</dependencies>
117 171
 
118 172
 </project>
... ...
@@ -0,0 +1,18 @@
1
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
3
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
4
+<listEntry value="/testapp-jee6/src/test/java/com/haddouti/pg/jee6/OneServiceJarTest.java"/>
5
+</listAttribute>
6
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
7
+<listEntry value="1"/>
8
+</listAttribute>
9
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
10
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
11
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
12
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
13
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
14
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.haddouti.pg.jee6.OneServiceJarTest"/>
15
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="testapp-jee6"/>
16
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
17
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Djava.util.logging.manager=org.jboss.logmanager.LogManager"/>
18
+</launchConfiguration>
... ...
@@ -0,0 +1,13 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<arquillian xmlns="http://jboss.org/schema/arquillian"
3
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
+    xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
5
+
6
+    <container qualifier="jboss" default="true">
7
+        <configuration>
8
+        	<!-- CHANGE this to your WidlFly installation -->
9
+            <property name="jbossHome">C:\Users\lab\Documents\Data\DevEnv\Server\wildfly-8.0.0.Final</property>
10
+            <property name="modulePath">C:\Users\lab\Documents\Data\DevEnv\Server\wildfly-8.0.0.Final\modules</property>
11
+        </configuration>
12
+    </container>
13
+</arquillian>
0 14
\ No newline at end of file
... ...
@@ -0,0 +1,50 @@
1
+#
2
+# JBoss, Home of Professional Open Source.
3
+# Copyright 2010, Red Hat, Inc., and individual contributors
4
+# as indicated by the @author tags. See the copyright.txt file in the
5
+# distribution for a full listing of individual contributors.
6
+#
7
+# This is free software; you can redistribute it and/or modify it
8
+# under the terms of the GNU Lesser General Public License as
9
+# published by the Free Software Foundation; either version 2.1 of
10
+# the License, or (at your option) any later version.
11
+#
12
+# This software is distributed in the hope that it will be useful,
13
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
+# Lesser General Public License for more details.
16
+#
17
+# You should have received a copy of the GNU Lesser General Public
18
+# License along with this software; if not, write to the Free
19
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20
+# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21
+#
22
+
23
+# Additional logger names to configure (root logger is always configured)
24
+#loggers=org.jboss.whatever,org.jboss.foo
25
+
26
+# Root logger level
27
+logger.level=DEBUG
28
+
29
+# Root logger handlers
30
+logger.handlers=FILE, CONSOLE
31
+
32
+# Console handler configuration
33
+handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler
34
+handler.CONSOLE.properties=autoFlush
35
+handler.CONSOLE.level=INFO
36
+handler.CONSOLE.autoFlush=true
37
+handler.CONSOLE.formatter=PATTERN
38
+
39
+# File handler configuration
40
+handler.FILE=org.jboss.logmanager.handlers.FileHandler
41
+handler.FILE.level=DEBUG
42
+handler.FILE.properties=autoFlush,fileName
43
+handler.FILE.autoFlush=true
44
+handler.FILE.fileName=./target/test.log
45
+handler.FILE.formatter=PATTERN
46
+
47
+# Formatter pattern configuration
48
+formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter
49
+formatter.PATTERN.properties=pattern
50
+formatter.PATTERN.pattern=%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n
0 51
\ No newline at end of file
1 52