Commit 27c4840dac329fd0eaa41c865fdc6ac93a40b215
1 parent
4d82e935
Exists in
master
Ajuste no profile para ativação dos testes com o Glassfish Embedded
Showing
6 changed files
with
167 additions
and
36 deletions
Show diff stats
impl/extension/jdbc/src/test/java/test/Tests.java
| ... | ... | @@ -67,7 +67,7 @@ public final class Tests { |
| 67 | 67 | |
| 68 | 68 | private static WebArchive createDeployment() { |
| 69 | 69 | File[] libs = Maven.resolver().offline().loadPomFromFile("pom.xml", "arquillian-test") |
| 70 | - .importCompileAndRuntimeDependencies().resolve().withTransitivity().asFile(); | |
| 70 | + .importCompileAndRuntimeDependencies().importTestDependencies().resolve().withTransitivity().asFile(); | |
| 71 | 71 | |
| 72 | 72 | return ShrinkWrap |
| 73 | 73 | .create(WebArchive.class) | ... | ... |
impl/extension/jdbc/src/test/resources/arquillian.xml
| ... | ... | @@ -43,11 +43,18 @@ |
| 43 | 43 | <property name="deploymentExportPath">target/deployments</property> |
| 44 | 44 | </engine> |
| 45 | 45 | |
| 46 | + <!-- | |
| 46 | 47 | <container qualifier="jbossas-managed" default="true"> |
| 47 | 48 | <protocol type="Servlet 3.0" /> |
| 48 | 49 | <configuration> |
| 49 | 50 | <property name="jbossHome">target/jboss-as-${jboss.as.version}</property> |
| 50 | 51 | </configuration> |
| 51 | 52 | </container> |
| 53 | + --> | |
| 52 | 54 | |
| 55 | + <container qualifier="glassfish-embedded" default="true"> | |
| 56 | + <configuration> | |
| 57 | + <property name="resourcesXml">src/test/resources/glassfish-resources.xml</property> | |
| 58 | + </configuration> | |
| 59 | + </container> | |
| 53 | 60 | </arquillian> |
| 54 | 61 | \ No newline at end of file | ... | ... |
impl/extension/jdbc/src/test/resources/glassfish-resources.xml
0 → 100644
| ... | ... | @@ -0,0 +1,48 @@ |
| 1 | +<!-- | |
| 2 | + Demoiselle Framework | |
| 3 | + Copyright (C) 2010 SERPRO | |
| 4 | + ============================================================================ | |
| 5 | + This file is part of Demoiselle Framework. | |
| 6 | + | |
| 7 | + Demoiselle Framework is free software; you can redistribute it and/or | |
| 8 | + modify it under the terms of the GNU Lesser General Public License version 3 | |
| 9 | + as published by the Free Software Foundation. | |
| 10 | + | |
| 11 | + This program is distributed in the hope that it will be useful, | |
| 12 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 14 | + GNU General Public License for more details. | |
| 15 | + | |
| 16 | + You should have received a copy of the GNU Lesser General Public License version 3 | |
| 17 | + along with this program; if not, see <http://www.gnu.org/licenses /> | |
| 18 | + or write to the Free Software Foundation, Inc., 51 Franklin Street, | |
| 19 | + Fifth Floor, Boston, MA 02110-1301, USA. | |
| 20 | + ============================================================================ | |
| 21 | + Este arquivo é parte do Framework Demoiselle. | |
| 22 | + | |
| 23 | + O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | |
| 24 | + modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | |
| 25 | + do Software Livre (FSF). | |
| 26 | + | |
| 27 | + Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | |
| 28 | + GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | |
| 29 | + APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | |
| 30 | + para maiores detalhes. | |
| 31 | + | |
| 32 | + Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | |
| 33 | + "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses /> | |
| 34 | + ou escreva para a Fundação do Software Livre (FSF) Inc., | |
| 35 | + 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | |
| 36 | +--> | |
| 37 | +<!DOCTYPE resources PUBLIC | |
| 38 | + "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" | |
| 39 | + "http://glassfish.org/dtds/glassfish-resources_1_5.dtd"> | |
| 40 | +<resources> | |
| 41 | + <jdbc-resource pool-name="ArquillianEmbeddedDerbyPool" jndi-name="jboss/datasources/ExampleDS" /> | |
| 42 | + | |
| 43 | + <jdbc-connection-pool name="ArquillianEmbeddedDerbyPool" res-type="javax.sql.DataSource" datasource-classname="org.apache.derby.jdbc.EmbeddedDataSource" | |
| 44 | + is-isolation-level-guaranteed="false"> | |
| 45 | + <property name="databaseName" value="target/databases/derby" /> | |
| 46 | + <property name="createDatabase" value="create" /> | |
| 47 | + </jdbc-connection-pool> | |
| 48 | +</resources> | |
| 0 | 49 | \ No newline at end of file | ... | ... |
impl/extension/jpa/src/test/resources/arquillian.xml
| ... | ... | @@ -43,11 +43,18 @@ |
| 43 | 43 | <property name="deploymentExportPath">target/deployments</property> |
| 44 | 44 | </engine> |
| 45 | 45 | |
| 46 | + <!-- | |
| 46 | 47 | <container qualifier="jbossas-managed" default="true"> |
| 47 | 48 | <protocol type="Servlet 3.0" /> |
| 48 | 49 | <configuration> |
| 49 | 50 | <property name="jbossHome">target/jboss-as-${jboss.as.version}</property> |
| 50 | 51 | </configuration> |
| 51 | 52 | </container> |
| 53 | + --> | |
| 52 | 54 | |
| 55 | + <container qualifier="glassfish-embedded" default="true"> | |
| 56 | + <configuration> | |
| 57 | + <property name="resourcesXml">src/test/resources/glassfish-resources.xml</property> | |
| 58 | + </configuration> | |
| 59 | + </container> | |
| 53 | 60 | </arquillian> | ... | ... |
impl/extension/jpa/src/test/resources/glassfish-resources.xml
0 → 100644
| ... | ... | @@ -0,0 +1,48 @@ |
| 1 | +<!-- | |
| 2 | + Demoiselle Framework | |
| 3 | + Copyright (C) 2010 SERPRO | |
| 4 | + ============================================================================ | |
| 5 | + This file is part of Demoiselle Framework. | |
| 6 | + | |
| 7 | + Demoiselle Framework is free software; you can redistribute it and/or | |
| 8 | + modify it under the terms of the GNU Lesser General Public License version 3 | |
| 9 | + as published by the Free Software Foundation. | |
| 10 | + | |
| 11 | + This program is distributed in the hope that it will be useful, | |
| 12 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 14 | + GNU General Public License for more details. | |
| 15 | + | |
| 16 | + You should have received a copy of the GNU Lesser General Public License version 3 | |
| 17 | + along with this program; if not, see <http://www.gnu.org/licenses /> | |
| 18 | + or write to the Free Software Foundation, Inc., 51 Franklin Street, | |
| 19 | + Fifth Floor, Boston, MA 02110-1301, USA. | |
| 20 | + ============================================================================ | |
| 21 | + Este arquivo é parte do Framework Demoiselle. | |
| 22 | + | |
| 23 | + O Framework Demoiselle é um software livre; você pode redistribuí-lo e/ou | |
| 24 | + modificá-lo dentro dos termos da GNU LGPL versão 3 como publicada pela Fundação | |
| 25 | + do Software Livre (FSF). | |
| 26 | + | |
| 27 | + Este programa é distribuído na esperança que possa ser útil, mas SEM NENHUMA | |
| 28 | + GARANTIA; sem uma garantia implícita de ADEQUAÇÃO a qualquer MERCADO ou | |
| 29 | + APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU/LGPL em português | |
| 30 | + para maiores detalhes. | |
| 31 | + | |
| 32 | + Você deve ter recebido uma cópia da GNU LGPL versão 3, sob o título | |
| 33 | + "LICENCA.txt", junto com esse programa. Se não, acesse <http://www.gnu.org/licenses /> | |
| 34 | + ou escreva para a Fundação do Software Livre (FSF) Inc., | |
| 35 | + 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA. | |
| 36 | +--> | |
| 37 | +<!DOCTYPE resources PUBLIC | |
| 38 | + "-//GlassFish.org//DTD GlassFish Application Server 3.1 Resource Definitions//EN" | |
| 39 | + "http://glassfish.org/dtds/glassfish-resources_1_5.dtd"> | |
| 40 | +<resources> | |
| 41 | + <jdbc-resource pool-name="ArquillianEmbeddedDerbyPool" jndi-name="jboss/datasources/ExampleDS" /> | |
| 42 | + | |
| 43 | + <jdbc-connection-pool name="ArquillianEmbeddedDerbyPool" res-type="javax.sql.DataSource" datasource-classname="org.apache.derby.jdbc.EmbeddedDataSource" | |
| 44 | + is-isolation-level-guaranteed="false"> | |
| 45 | + <property name="databaseName" value="target/databases/derby" /> | |
| 46 | + <property name="createDatabase" value="create" /> | |
| 47 | + </jdbc-connection-pool> | |
| 48 | +</resources> | |
| 0 | 49 | \ No newline at end of file | ... | ... |
parent/extension/pom.xml
| ... | ... | @@ -107,25 +107,6 @@ |
| 107 | 107 | <groupId>org.apache.maven.plugins</groupId> |
| 108 | 108 | <artifactId>maven-surefire-plugin</artifactId> |
| 109 | 109 | </plugin> |
| 110 | - <plugin> | |
| 111 | - <groupId>org.jacoco</groupId> | |
| 112 | - <artifactId>jacoco-maven-plugin</artifactId> | |
| 113 | - <version>${jacoco.version}</version> | |
| 114 | - <executions> | |
| 115 | - <execution> | |
| 116 | - <goals> | |
| 117 | - <goal>prepare-agent</goal> | |
| 118 | - </goals> | |
| 119 | - </execution> | |
| 120 | - <execution> | |
| 121 | - <id>report</id> | |
| 122 | - <phase>prepare-package</phase> | |
| 123 | - <goals> | |
| 124 | - <goal>report</goal> | |
| 125 | - </goals> | |
| 126 | - </execution> | |
| 127 | - </executions> | |
| 128 | - </plugin> | |
| 129 | 110 | </plugins> |
| 130 | 111 | </build> |
| 131 | 112 | |
| ... | ... | @@ -151,18 +132,6 @@ |
| 151 | 132 | <artifactId>shrinkwrap-resolver-impl-maven</artifactId> |
| 152 | 133 | <scope>test</scope> |
| 153 | 134 | </dependency> |
| 154 | - <dependency> | |
| 155 | - <groupId>org.jboss.arquillian.extension</groupId> | |
| 156 | - <artifactId>arquillian-jacoco</artifactId> | |
| 157 | - <version>${arquillian.jacoco.version}</version> | |
| 158 | - <scope>test</scope> | |
| 159 | - </dependency> | |
| 160 | - <dependency> | |
| 161 | - <groupId>org.jacoco</groupId> | |
| 162 | - <artifactId>org.jacoco.core</artifactId> | |
| 163 | - <version>${jacoco.version}</version> | |
| 164 | - <scope>test</scope> | |
| 165 | - </dependency> | |
| 166 | 135 | </dependencies> |
| 167 | 136 | |
| 168 | 137 | <repositories> |
| ... | ... | @@ -219,10 +188,29 @@ |
| 219 | 188 | </dependencies> |
| 220 | 189 | </profile> |
| 221 | 190 | <profile> |
| 191 | + <id>arquillian-glassfish-embedded</id> | |
| 192 | + <dependencies> | |
| 193 | + <dependency> | |
| 194 | + <groupId>org.jboss.arquillian.container</groupId> | |
| 195 | + <artifactId>arquillian-glassfish-embedded-3.1</artifactId> | |
| 196 | + <version>${arquillian.container.glassfish.version}</version> | |
| 197 | + <scope>test</scope> | |
| 198 | + </dependency> | |
| 199 | + <dependency> | |
| 200 | + <groupId>org.glassfish.main.extras</groupId> | |
| 201 | + <artifactId>glassfish-embedded-all</artifactId> | |
| 202 | + <version>${glassfish.embedded.version}</version> | |
| 203 | + <scope>test</scope> | |
| 204 | + </dependency> | |
| 205 | + </dependencies> | |
| 206 | + </profile> | |
| 207 | + <profile> | |
| 222 | 208 | <id>arquillian-jbossas7-managed</id> |
| 209 | + <!-- | |
| 223 | 210 | <activation> |
| 224 | 211 | <activeByDefault>true</activeByDefault> |
| 225 | 212 | </activation> |
| 213 | + --> | |
| 226 | 214 | <build> |
| 227 | 215 | <testResources> |
| 228 | 216 | <testResource> |
| ... | ... | @@ -255,6 +243,25 @@ |
| 255 | 243 | </execution> |
| 256 | 244 | </executions> |
| 257 | 245 | </plugin> |
| 246 | + <plugin> | |
| 247 | + <groupId>org.jacoco</groupId> | |
| 248 | + <artifactId>jacoco-maven-plugin</artifactId> | |
| 249 | + <version>${jacoco.version}</version> | |
| 250 | + <executions> | |
| 251 | + <execution> | |
| 252 | + <goals> | |
| 253 | + <goal>prepare-agent</goal> | |
| 254 | + </goals> | |
| 255 | + </execution> | |
| 256 | + <execution> | |
| 257 | + <id>report</id> | |
| 258 | + <phase>prepare-package</phase> | |
| 259 | + <goals> | |
| 260 | + <goal>report</goal> | |
| 261 | + </goals> | |
| 262 | + </execution> | |
| 263 | + </executions> | |
| 264 | + </plugin> | |
| 258 | 265 | </plugins> |
| 259 | 266 | </build> |
| 260 | 267 | <dependencies> |
| ... | ... | @@ -269,17 +276,31 @@ |
| 269 | 276 | <artifactId>arquillian-protocol-servlet</artifactId> |
| 270 | 277 | <scope>test</scope> |
| 271 | 278 | </dependency> |
| 272 | - </dependencies> | |
| 273 | 279 | |
| 274 | - <properties> | |
| 275 | - <jboss.as.version>7.1.1.Final</jboss.as.version> | |
| 276 | - </properties> | |
| 280 | + <dependency> | |
| 281 | + <groupId>org.jboss.arquillian.extension</groupId> | |
| 282 | + <artifactId>arquillian-jacoco</artifactId> | |
| 283 | + <version>${arquillian.jacoco.version}</version> | |
| 284 | + <scope>test</scope> | |
| 285 | + </dependency> | |
| 286 | + <dependency> | |
| 287 | + <groupId>org.jacoco</groupId> | |
| 288 | + <artifactId>org.jacoco.core</artifactId> | |
| 289 | + <version>${jacoco.version}</version> | |
| 290 | + <scope>test</scope> | |
| 291 | + </dependency> | |
| 292 | + </dependencies> | |
| 277 | 293 | </profile> |
| 278 | 294 | </profiles> |
| 279 | 295 | |
| 280 | 296 | <properties> |
| 281 | 297 | <arquillian.bom.version>1.1.1.Final</arquillian.bom.version> |
| 282 | 298 | <arquillian.jacoco.version>1.0.0.Alpha5</arquillian.jacoco.version> |
| 299 | + <arquillian.container.glassfish.version>1.0.0.CR4</arquillian.container.glassfish.version> | |
| 300 | + <jboss.as.version>7.1.1.Final</jboss.as.version> | |
| 301 | + | |
| 302 | + <glassfish.embedded.version>3.1.2.2</glassfish.embedded.version> | |
| 303 | + | |
| 283 | 304 | <jacoco.version>0.6.0.201210061924</jacoco.version> |
| 284 | 305 | </properties> |
| 285 | 306 | </project> | ... | ... |