You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mauro2java2011 <ma...@gmail.com> on 2015/09/05 15:24:53 UTC

how and what dependencies i have to add for tomee embedded a Maven PRofile ?

hi all. 
i have a example from the  http://arquillian.org/guides/getting_started_it/
<http://arquillian.org/guides/getting_started_it/>  

>From the example are present 3 profile:now i would to add a tomee embedded
profile for use with the example .

from the tomee reference card  https://tomee.apache.org/refcard/refcard.html
<https://tomee.apache.org/refcard/refcard.html>  
i read the dependencies :

*for the openejb embedded:*



<dependency>
  <groupId>org.apache.openejb</groupId>
  <artifactId>openejb-core</artifactId>
  <version>${openejb.version}</version>
</dependency>


<dependency>
  <groupId>org.apache.openejb</groupId>
  <artifactId>openejb-cxf</artifactId>
  <version>${openejb.version}</version>
</dependency>


<dependency>
  <groupId>org.apache.openejb</groupId>
  <artifactId>openejb-cxf-rs</artifactId>
  <version>${openejb.version}</version>
</dependency>


<dependency>
  <groupId>org.apache.openejb</groupId>
  <artifactId>arquillian-openejb-embedded-4</artifactId>
  <version>${openejb.version}</version>
</dependency>


...........................................

*TomEE dependencies*


<dependency>
  <groupId>org.apache.openejb</groupId>
  <artifactId>apache-tomee</artifactId>
  <version>${tomee.version}</version>
  <type>zip</type>
</dependency>


<dependency>
  <groupId>org.apache.openejb</groupId>
  <artifactId>arquillian-tomee-remote</artifactId>
  <version>${tomee.version}</version>
</dependency>
--------------------------------

*TomEE Embedded dependencies*


<dependency>
  <groupId>org.apache.openejb</groupId>
  <artifactId>tomee-embedded</artifactId>
  <version>${tomee.version}</version>
  <type>zip</type>
</dependency>


<dependency>
  <groupId>org.apache.openejb</groupId>
  <artifactId>arquillian-tomee-embedded</artifactId>
  <version>${tomee.version}</version>
</dependency>


<dependency>
  <groupId>org.apache.openejb</groupId>
  <artifactId>tomee-jaxrs</artifactId>
  <version>${tomee.version}</version>
</dependency>


<dependency>
  <groupId>org.apache.openejb</groupId>
  <artifactId>tomee-webservices</artifactId>
  <version>${tomee.version}</version>
</dependency>

----------------------------------------------
*
TomEE maven plugin configuration*
Note
	Configuration block is optional all attributes have defaul values.

<plugin>
 <groupId>org.apache.openejb.maven</groupId>
 <artifactId>tomee-maven-plugin</artifactId>
 <version>${tmp.version}</version>
 <configuration> 
  <tomeeVersion>1.5.0</tomeeVersion>
  <tomeeClassifier>plus</tomeeClassifier> 

  
  <debug>false</debug>
  <debugPort>5005</debugPort>

  
  <tomeeHttpPort>8080</tomeeHttpPort>

  
  <removeDefaultWebapps>true</removeDefaultWebapps>
  
  <removeTomeeWebapp>true</removeTomeeWebapp>

  
  <libs>
   <lib>mysql:mysql-connector-java:5.1.20</lib>
  </libs>

  
  <webapps>
   <webapp>org.superbiz:my-simple-webapp:1.0.0</webapp>
  </webapps>

  
  </configuration>
   
   <reloadOnUpdate>true</reloadOnUpdate>
   <synchronization>
    
    <extensions>
     <extension>.class<extension>
    </extensions>
    
    <updateOnlyExtensions>
     <updateOnlyExtension>.html<updateOnlyExtension>
     <updateOnlyExtension>.js<updateOnlyExtension>
     <updateOnlyExtension>.jcss<updateOnlyExtension>
    </updateOnlyExtensions>
   </synchronization>
   
  </configuration>
 </configuration>
</plugin>

-------------------------------

1)but the tomeemavenplugin dependencies are to add inside the profile tomee
embedded that iwould create?
2) how i set thte datasource with tomee embedded ? into arquillan.xml? and
how?

3) if i would use the ejb with persistence i have to add also the openjpa
persistence with scope provided?
4) if i would test jsf i have also to add the jsf dependenmcies with scope
provided int othe profile that i would create for tomee embedded?

i am confused and this page 
http://tomee.apache.org/arquillian-available-adapters.html
<http://tomee.apache.org/arquillian-available-adapters.html>   not help me .

I would understand how add a maven profile for test ejb that  work with
database in memory with the tomee embedded . I have to add at a existent
project that already present 3 contoiner: weld jee glassfsih embedded and
jboss 7.1 managed (that not work).

 my pom it is:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.arquillian.example</groupId>
    <artifactId>arquillian-tutorial</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>arquillian-tutorial</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    
    
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jboss.arquillian</groupId>
                <artifactId>arquillian-bom</artifactId>
                <version>1.1.9.Final</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>
    
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.17</version>
            </plugin>
        </plugins>
    </build>
    
        
        

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    
    <profiles>
        <profile>
            <id>arquillian-weld-ee-embedded</id>
             <activation>
        <activeByDefault>true</activeByDefault>
    </activation>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.spec</groupId>
                    <artifactId>jboss-javaee-6.0</artifactId>
                    <version>1.0.0.Final</version>
                    <type>pom</type>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                    <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
                    <version>1.0.0.CR3</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.weld</groupId>
                    <artifactId>weld-core</artifactId>
                    <version>1.1.5.Final</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-simple</artifactId>
                    <version>1.6.4</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
    
        <profile>
            <id>arquillian-glassfish-embedded</id>
            <dependencies>
                <dependency>
                    <groupId>org.jboss.arquillian.container</groupId>
                   
<artifactId>arquillian-glassfish-embedded-3.1</artifactId>
                    <version>1.0.0.CR3</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.glassfish.main.extras</groupId>
                    <artifactId>glassfish-embedded-all</artifactId>
                    <version>3.1.2</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
        </profile>
        
        <profile>
            
            <id>arquillian-jbossas-managed</id>
          <build>
    <plugins>
        <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
                <execution>
                    <id>unpack</id>
                    <phase>process-test-classes</phase>
                    <goals>
                        <goal>unpack</goal>
                    </goals>
                    <configuration>
                        <artifactItems>
                            <artifactItem>
                                <groupId>org.jboss.as</groupId>
                                <artifactId>jboss-as-dist</artifactId>
                                <version>7.1.1.Final</version>
                                <type>zip</type>
                                <overWrite>false</overWrite>
                                <outputDirectory>target</outputDirectory>
                            </artifactItem>
                        </artifactItems>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build> 

            <dependencies>
                
                <dependency>
                    <groupId>org.jboss.spec</groupId>
                    <artifactId>jboss-javaee-6.0</artifactId>
                    <version>1.0.0.Final</version>
                    <type>pom</type>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.as</groupId>
                   
<artifactId>jboss-as-arquillian-container-managed</artifactId>
                    <version>7.1.1.Final</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>org.jboss.arquillian.protocol</groupId>
                    <artifactId>arquillian-protocol-servlet</artifactId>
                    <scope>test</scope>
                </dependency>
                
            </dependencies>
        </profile>
    </profiles>
    
    
</project>









--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/how-and-what-dependencies-i-have-to-add-for-tomee-embedded-a-Maven-PRofile-tp4676132.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: how and what dependencies i have to add for tomee embedded a Maven PRofile ?

Posted by agumbrecht <ag...@tomitribe.com>.
Hi mauro2java2011,

Have a whole bunch of examples here:
https://github.com/AndyGee/JAX/tree/master/arquillian

Just change the deps a little to use embedded.

Andy.



-----
    -- 
    Andy Gumbrecht

    http://www.tomitribe.com
    agumbrecht@tomitribe.com
    https://twitter.com/AndyGeeDe

    TomEE treibt Tomitribe ! | http://tomee.apache.org
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/how-and-what-dependencies-i-have-to-add-for-tomee-embedded-a-Maven-PRofile-tp4676132p4676144.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: how and what dependencies i have to add for tomee embedded a Maven PRofile ?

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

Le 5 sept. 2015 06:31, "mauro2java2011" <ma...@gmail.com> a écrit :
>
> hi all.
> i have a example from the
http://arquillian.org/guides/getting_started_it/
> <http://arquillian.org/guides/getting_started_it/>
>
> From the example are present 3 profile:now i would to add a tomee embedded
> profile for use with the example .
>
> from the tomee reference card
https://tomee.apache.org/refcard/refcard.html
> <https://tomee.apache.org/refcard/refcard.html>
> i read the dependencies :
>
> *for the openejb embedded:*
>
>
>
> <dependency>
>   <groupId>org.apache.openejb</groupId>
>   <artifactId>openejb-core</artifactId>
>   <version>${openejb.version}</version>
> </dependency>
>
>
> <dependency>
>   <groupId>org.apache.openejb</groupId>
>   <artifactId>openejb-cxf</artifactId>
>   <version>${openejb.version}</version>
> </dependency>
>
>
> <dependency>
>   <groupId>org.apache.openejb</groupId>
>   <artifactId>openejb-cxf-rs</artifactId>
>   <version>${openejb.version}</version>
> </dependency>
>
>
> <dependency>
>   <groupId>org.apache.openejb</groupId>
>   <artifactId>arquillian-openejb-embedded-4</artifactId>
>   <version>${openejb.version}</version>
> </dependency>
>
>
> ...........................................
>
> *TomEE dependencies*
>
>
> <dependency>
>   <groupId>org.apache.openejb</groupId>
>   <artifactId>apache-tomee</artifactId>
>   <version>${tomee.version}</version>
>   <type>zip</type>
> </dependency>
>
>
> <dependency>
>   <groupId>org.apache.openejb</groupId>
>   <artifactId>arquillian-tomee-remote</artifactId>
>   <version>${tomee.version}</version>
> </dependency>
> --------------------------------
>
> *TomEE Embedded dependencies*
>
>
> <dependency>
>   <groupId>org.apache.openejb</groupId>
>   <artifactId>tomee-embedded</artifactId>
>   <version>${tomee.version}</version>
>   <type>zip</type>
> </dependency>
>
>
> <dependency>
>   <groupId>org.apache.openejb</groupId>
>   <artifactId>arquillian-tomee-embedded</artifactId>
>   <version>${tomee.version}</version>
> </dependency>
>
>
> <dependency>
>   <groupId>org.apache.openejb</groupId>
>   <artifactId>tomee-jaxrs</artifactId>
>   <version>${tomee.version}</version>
> </dependency>
>
>
> <dependency>
>   <groupId>org.apache.openejb</groupId>
>   <artifactId>tomee-webservices</artifactId>
>   <version>${tomee.version}</version>
> </dependency>
>
> ----------------------------------------------
> *
> TomEE maven plugin configuration*
> Note
>         Configuration block is optional all attributes have defaul values.
>
> <plugin>
>  <groupId>org.apache.openejb.maven</groupId>
>  <artifactId>tomee-maven-plugin</artifactId>
>  <version>${tmp.version}</version>
>  <configuration>
>   <tomeeVersion>1.5.0</tomeeVersion>
>   <tomeeClassifier>plus</tomeeClassifier>
>
>
>   <debug>false</debug>
>   <debugPort>5005</debugPort>
>
>
>   <tomeeHttpPort>8080</tomeeHttpPort>
>
>
>   <removeDefaultWebapps>true</removeDefaultWebapps>
>
>   <removeTomeeWebapp>true</removeTomeeWebapp>
>
>
>   <libs>
>    <lib>mysql:mysql-connector-java:5.1.20</lib>
>   </libs>
>
>
>   <webapps>
>    <webapp>org.superbiz:my-simple-webapp:1.0.0</webapp>
>   </webapps>
>
>
>   </configuration>
>
>    <reloadOnUpdate>true</reloadOnUpdate>
>    <synchronization>
>
>     <extensions>
>      <extension>.class<extension>
>     </extensions>
>
>     <updateOnlyExtensions>
>      <updateOnlyExtension>.html<updateOnlyExtension>
>      <updateOnlyExtension>.js<updateOnlyExtension>
>      <updateOnlyExtension>.jcss<updateOnlyExtension>
>     </updateOnlyExtensions>
>    </synchronization>
>
>   </configuration>
>  </configuration>
> </plugin>
>
> -------------------------------
>
> 1)but the tomeemavenplugin dependencies are to add inside the profile
tomee
> embedded that iwould create?

There is no link so you can

> 2) how i set thte datasource with tomee embedded ? into arquillan.xml? and
> how?

Properties property is supported by all adapters and can create datasources

>
> 3) if i would use the ejb with persistence i have to add also the openjpa
> persistence with scope provided?

No

> 4) if i would test jsf i have also to add the jsf dependenmcies with scope
> provided int othe profile that i would create for tomee embedded?
>

Yes

> i am confused and this page
> http://tomee.apache.org/arquillian-available-adapters.html
> <http://tomee.apache.org/arquillian-available-adapters.html>   not help
me .
>
> I would understand how add a maven profile for test ejb that  work with
> database in memory with the tomee embedded . I have to add at a existent
> project that already present 3 contoiner: weld jee glassfsih embedded and
> jboss 7.1 managed (that not work).
>
>  my pom it is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
>     <modelVersion>4.0.0</modelVersion>
>
>     <groupId>org.arquillian.example</groupId>
>     <artifactId>arquillian-tutorial</artifactId>
>     <version>1.0-SNAPSHOT</version>
>     <packaging>jar</packaging>
>
>     <name>arquillian-tutorial</name>
>     <url>http://maven.apache.org</url>
>
>     <properties>
>         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>     </properties>
>
>
>     <dependencyManagement>
>         <dependencies>
>             <dependency>
>                 <groupId>org.jboss.arquillian</groupId>
>                 <artifactId>arquillian-bom</artifactId>
>                 <version>1.1.9.Final</version>
>                 <scope>import</scope>
>                 <type>pom</type>
>             </dependency>
>         </dependencies>
>     </dependencyManagement>
>
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>org.apache.maven.plugins</groupId>
>                 <artifactId>maven-compiler-plugin</artifactId>
>                 <version>2.3.2</version>
>                 <configuration>
>                     <source>1.6</source>
>                     <target>1.6</target>
>                 </configuration>
>             </plugin>
>             <plugin>
>                 <artifactId>maven-surefire-plugin</artifactId>
>                 <version>2.17</version>
>             </plugin>
>         </plugins>
>     </build>
>
>
>
>
>     <dependencies>
>         <dependency>
>             <groupId>junit</groupId>
>             <artifactId>junit</artifactId>
>             <version>4.8.1</version>
>             <scope>test</scope>
>         </dependency>
>         <dependency>
>             <groupId>org.jboss.arquillian.junit</groupId>
>             <artifactId>arquillian-junit-container</artifactId>
>             <scope>test</scope>
>         </dependency>
>     </dependencies>
>
>     <profiles>
>         <profile>
>             <id>arquillian-weld-ee-embedded</id>
>              <activation>
>         <activeByDefault>true</activeByDefault>
>     </activation>
>             <dependencies>
>                 <dependency>
>                     <groupId>org.jboss.spec</groupId>
>                     <artifactId>jboss-javaee-6.0</artifactId>
>                     <version>1.0.0.Final</version>
>                     <type>pom</type>
>                     <scope>provided</scope>
>                 </dependency>
>                 <dependency>
>                     <groupId>org.jboss.arquillian.container</groupId>
>
<artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
>                     <version>1.0.0.CR3</version>
>                     <scope>test</scope>
>                 </dependency>
>                 <dependency>
>                     <groupId>org.jboss.weld</groupId>
>                     <artifactId>weld-core</artifactId>
>                     <version>1.1.5.Final</version>
>                     <scope>test</scope>
>                 </dependency>
>                 <dependency>
>                     <groupId>org.slf4j</groupId>
>                     <artifactId>slf4j-simple</artifactId>
>                     <version>1.6.4</version>
>                     <scope>test</scope>
>                 </dependency>
>             </dependencies>
>         </profile>
>
>         <profile>
>             <id>arquillian-glassfish-embedded</id>
>             <dependencies>
>                 <dependency>
>                     <groupId>org.jboss.arquillian.container</groupId>
>
> <artifactId>arquillian-glassfish-embedded-3.1</artifactId>
>                     <version>1.0.0.CR3</version>
>                     <scope>test</scope>
>                 </dependency>
>                 <dependency>
>                     <groupId>org.glassfish.main.extras</groupId>
>                     <artifactId>glassfish-embedded-all</artifactId>
>                     <version>3.1.2</version>
>                     <scope>provided</scope>
>                 </dependency>
>             </dependencies>
>         </profile>
>
>         <profile>
>
>             <id>arquillian-jbossas-managed</id>
>           <build>
>     <plugins>
>         <plugin>
>             <artifactId>maven-dependency-plugin</artifactId>
>             <executions>
>                 <execution>
>                     <id>unpack</id>
>                     <phase>process-test-classes</phase>
>                     <goals>
>                         <goal>unpack</goal>
>                     </goals>
>                     <configuration>
>                         <artifactItems>
>                             <artifactItem>
>                                 <groupId>org.jboss.as</groupId>
>                                 <artifactId>jboss-as-dist</artifactId>
>                                 <version>7.1.1.Final</version>
>                                 <type>zip</type>
>                                 <overWrite>false</overWrite>
>                                 <outputDirectory>target</outputDirectory>
>                             </artifactItem>
>                         </artifactItems>
>                     </configuration>
>                 </execution>
>             </executions>
>         </plugin>
>     </plugins>
> </build>
>
>             <dependencies>
>
>                 <dependency>
>                     <groupId>org.jboss.spec</groupId>
>                     <artifactId>jboss-javaee-6.0</artifactId>
>                     <version>1.0.0.Final</version>
>                     <type>pom</type>
>                     <scope>provided</scope>
>                 </dependency>
>                 <dependency>
>                     <groupId>org.jboss.as</groupId>
>
> <artifactId>jboss-as-arquillian-container-managed</artifactId>
>                     <version>7.1.1.Final</version>
>                     <scope>test</scope>
>                 </dependency>
>                 <dependency>
>                     <groupId>org.jboss.arquillian.protocol</groupId>
>                     <artifactId>arquillian-protocol-servlet</artifactId>
>                     <scope>test</scope>
>                 </dependency>
>
>             </dependencies>
>         </profile>
>     </profiles>
>
>
> </project>
>
>
>
>
>
>
>
>
>
> --
> View this message in context:
http://tomee-openejb.979440.n4.nabble.com/how-and-what-dependencies-i-have-to-add-for-tomee-embedded-a-Maven-PRofile-tp4676132.html
> Sent from the TomEE Users mailing list archive at Nabble.com.