0 Replies Latest reply on Mar 26, 2015 8:13 AM by Greg Deckers

    jboss-as-maven-plugin CLI commands (add mailsession)

    Greg Deckers Newbie

      I'm trying to find a way to add a mail session resource to my jboss-as-maven-plugin but I'm not really making a lot of progress.. Anyone has got some tutorial or something? I can't find any..

      I've already created a stack overflow for it but there isn't a lot of response..

      this is the SO post: http://stackoverflow.com/questions/29148380/jboss-as-maven-plugin-add-mail-session-resource

       

      Right now I'm trying to get it up and running with CLI commands. But for testing purposes I'm first trying to add my datasource to jBoss using the commands but even that isn't working. I've placed the following execution before the deploy goal:

       

                     <execution>

                          <id>execute-commands</id>

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

                              <goals>

                                  <goal>execute-commands</goal>

                              </goals>

                              <configuration>

                      <executeCommands>

                               <commands>

                                <command>/subsystem=datasources/data-source="java:jboss/datasources/eCadWSDS":add(jndi-name="java:jboss/datasources/eCadWSDS", driver-name="h2", connection-url="jdbc:h2:mem:testdb;DB_CLOSE_DELAY=-1")</command>

                               </commands>

                           </executeCommands>

                       </configuration>

                     </execution>

       

      The first plugin (start) is still there. The add-resources executions have been removed to be able to test the cli commands. But now I'm getting the "no datasource" exception although I'm adding it with the CLI command??? It looks as if it isn't really executed? But it's failing when I type some mistake in the command..


      If there is another way to add a mail session (without cli commands) then that is also fine for me.

       

      Anyone?