Re: Re: Start Jonas locally with Maven and Cargo

Celinio <[email protected]> Tue, 22 Feb 2011 12:35:40 -0800 (PST)
Newsgroups gmane.comp.java.objectweb.jonas
Message-ID <[email protected]>
well,
i needed to change 
<container>

                                         
              <containerId>jonas5x</containerId>

                                         
              <type>installed</type>                       
                                                      

                                         
              <home>E:\appft2\jonas-full-5.1.5\bin</home>   
                                      

                                      </container>
to

<container>

                                         
              <containerId>jonas5x</containerId>

                                         
              <type>installed</type>                       
                                                      

                                         
              <home>E:\appft2\jonas-full-5.1.5\</home>   
                                      

                                      </container>

It works now.
Thanks.

--- On Tue, 2/22/11, S. Ali Tokmen <[email protected]> wrote:

From: S. Ali Tokmen <[email protected]>
Subject: [jonas] Re: Start Jonas locally with Maven and Cargo
To: [email protected]
Date: Tuesday, February 22, 2011, 10:47 AM



  

    
    
  Hello

    

    Please use as home E:\appft2\jonas-full-5.1.5\bin instead of
    E:\appft2\jonas-full-5.1.5\bin (it actually should correspond to a
    JONAS_ROOT).

    

    I would also recommend you to use a later version of CARGO.

    

    Thank you

    

    S. Ali Tokmen
http://ali.tokmen.com/

GSM (ch): +41 79 207 29 22 [Swisscom]
GSM (fr): +33 66 43 00 555 [Orange]
GSM (tr): +90 555 266 52 73 [Avea]

My AIM, ICQ, MSN Messenger and Yahoo IM
contact details are on http://contact.ali.tokmen.com
    

    On 22.02.2011 12:49, Celinio wrote:
    
      
        
          
            Hi,

              I am trying to fix my POM.xml file so that i can
              start/stop Jonas (and later deploy) with the Cargo plugin
              for Maven.

              

              So far, this is what i have come with in my POM.xml file :

              

              <profiles>

                      <profile>

                          <id>cargo</id>

                          <activation>

                          </activation>

                          <build>

                              <plugins>

                                  <plugin>

                                 
              <groupId>org.codehaus.cargo</groupId>

                                 
              <artifactId>cargo-maven2-plugin</artifactId>

                                  <version>1.0</version>

                                  <executions>

                                      <execution>

                                         
              <id>start-jonas</id>

                                         
              <phase>pre-integration-test</phase>

                                          <goals>

                                           
              <goal>start</goal>

                                          </goals>

                                        </execution>

                                        <execution>

                                         
              <id>stop-jonas</id>

                                         
              <phase>post-integration-test</phase>

                                          <goals>

                                           
              <goal>stop</goal>

                                          </goals>

                                        </execution>

                                  </executions>

              

                                  <configuration>

                                      <container>

                                         
              <containerId>jonas5x</containerId>

                                         
              <type>installed</type>                       
                                                      

                                         
              <home>E:\appft2\jonas-full-5.1.5\bin</home>   
                                      

                                      </container>

                                      <configuration>

                                         
              <type>existing</type>

                                         
              <home>E:\appft2\jonas-full-5.1.5\</home>

                                          <properties>

                                             
              <cargo.servlet.port>9000</cargo.servlet.port>

                                             
              <cargo.hostname>localhost</cargo.hostname>

                                             
              <cargo.protocol>http</cargo.protocol>

                                             
              <cargo.jonas.server.name>jonas</cargo.jonas.server.name>

                                             
              <cargo.jonas.domain.name>jonas</cargo.jonas.domain.name>

                                          </properties>

                                      </configuration>           
                          

                                      <deployer>

                                          <deployables>

                                              <deployable>

                                                 
              <groupId>${project.groupId}</groupId>

                                                 
              <artifactId>${project.artifactId}</artifactId>

                                                 
              <type>${project.packaging}</type>

                                                 
              <classifier>${config.classifier}</classifier>

                                              </deployable>

                                          </deployables>

                                      </deployer>                
                      

                                  </configuration>

                              </plugin>

                              </plugins>

                          </build>

                      </profile>

                  </profiles>    

              

              This is giving me the following error :

              

              [INFO]
              ------------------------------------------------------------------------

              [INFO] Building voltage-ear(ear) 1.0.0-SNAPSHOT

              [INFO]
              ------------------------------------------------------------------------

              [INFO] 

              [INFO] --- cargo-maven2-plugin:1.0:start (default-cli) @
              voltage-ear ---

              [INFO] [talledLocalContainer] JOnAS 5.x starting...

              [WARNING] [talledLocalContainer]
              java.lang.NoClassDefFoundError:
              org/ow2/jonas/commands/admin/ClientAdmin

              [WARNING] [talledLocalContainer] Caused by:
              java.lang.ClassNotFoundException:
              org.ow2.jonas.commands.admin.ClientAdmin

              [WARNING] [talledLocalContainer]     at
              java.net.URLClassLoader$1.run(URLClassLoader.java:200)

              [WARNING] [talledLocalContainer]     at
              java.security.AccessController.doPrivileged(Native Method)

              [WARNING] [talledLocalContainer]     at
              java.net.URLClassLoader.findClass(URLClassLoader.java:188)

              [WARNING] [talledLocalContainer]     at
              java.lang.ClassLoader.loadClass(ClassLoader.java:303)

              [WARNING] [talledLocalContainer]     at
              sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

              [WARNING] [talledLocalContainer]     at
              java.lang.ClassLoader.loadClass(ClassLoader.java:248)

              [WARNING] [talledLocalContainer]     at
              java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316)

              [WARNING] [talledLocalContainer] Could not find the main
              class: org.ow2.jonas.commands.admin.ClientAdmin.  Program
              will exit.

              [WARNING] [talledLocalContainer] Exception in thread
              "main" 

              [WARNING] [talledLocalContainer] Java Result: 1

              

              What am i missing ?

              Thanks.