Petals Distribution

Petals executable should be runnable easily after their compilation

Details

  • Description:
    Hide

    Nowadays, after to have compiled and packaged Petals executable from their source code directory, we must move to a directory as target/petals-esb-default-zip-5.0.1-SNAPSHOT/bin and execute the right script. If the source code is cleaned and recompiled, we must removed to this directory (because the target was destroyed, and its inode has changed).

    Please, provide a way to start Petals executable from the root of their source code, for example through Maven !

    Show
    Nowadays, after to have compiled and packaged Petals executable from their source code directory, we must move to a directory as target/petals-esb-default-zip-5.0.1-SNAPSHOT/bin and execute the right script. If the source code is cleaned and recompiled, we must removed to this directory (because the target was destroyed, and its inode has changed). Please, provide a way to start Petals executable from the root of their source code, for example through Maven !
  • Environment:
    -

Issue Links

Activity

Hide
Christophe DENEUX added a comment - Wed, 16 Dec 2015 - 10:50:19 +0100 - edited

Perhaps can we use the Maven plugin: exec-maven-plugin.

For exemple for the Petals ESB minimal, we can add something as following in its POM:

<plugin>
   <groupId>org.codehaus.mojo</groupId>
   <artifactId>exec-maven-plugin</artifactId>
   <configuration>
      <executable>petals-esb.sh</executable>
      <workingDirectory>${project.build.directory}/${project.build.finalName}/bin</workingDirectory>
      <arguments>
         <argument>-u</argument>
         <argument>file://${project.build.directory}/${project.build.finalName}/conf/server.properties</argument>
      </arguments>
      <environmentVariables>
         <JAVA_OPTS>-Dpetals.log.dir=${project.build.directory}/${project.build.finalName}/logs</JAVA_OPTS>
      </environmentVariables>
   </configuration>
</plugin>

I don't know why the arguments and env variables are required. Perhaps a problem with the classpath defined in the script 'petals-esb.sh'

Show
Christophe DENEUX added a comment - Wed, 16 Dec 2015 - 10:50:19 +0100 - edited Perhaps can we use the Maven plugin: exec-maven-plugin. For exemple for the Petals ESB minimal, we can add something as following in its POM:
<plugin>
   <groupId>org.codehaus.mojo</groupId>
   <artifactId>exec-maven-plugin</artifactId>
   <configuration>
      <executable>petals-esb.sh</executable>
      <workingDirectory>${project.build.directory}/${project.build.finalName}/bin</workingDirectory>
      <arguments>
         <argument>-u</argument>
         <argument>file://${project.build.directory}/${project.build.finalName}/conf/server.properties</argument>
      </arguments>
      <environmentVariables>
         <JAVA_OPTS>-Dpetals.log.dir=${project.build.directory}/${project.build.finalName}/logs</JAVA_OPTS>
      </environmentVariables>
   </configuration>
</plugin>
I don't know why the arguments and env variables are required. Perhaps a problem with the classpath defined in the script 'petals-esb.sh'
Christophe DENEUX made changes - Wed, 16 Dec 2015 - 11:16:31 +0100
Field Original Value New Value
Status New [ 10000 ] Open [ 10002 ]
Priority Minor [ 4 ]
Christophe DENEUX made changes - Wed, 16 Dec 2015 - 11:16:33 +0100
Status Open [ 10002 ] In Progress [ 10003 ]
Hide
Christophe DENEUX added a comment - Wed, 16 Dec 2015 - 11:19:14 +0100

The problem was due to the directory missing in the executable definition. Using the following settings work fine:

<plugin>
   <groupId>org.codehaus.mojo</groupId>
   <artifactId>exec-maven-plugin</artifactId>
   <configuration>
      <executable>${project.build.directory}/${project.build.finalName}/bin/petals-esb.sh</executable>
      <workingDirectory>${project.build.directory}/${project.build.finalName}/bin</workingDirectory>
   </configuration>
</plugin>
Show
Christophe DENEUX added a comment - Wed, 16 Dec 2015 - 11:19:14 +0100 The problem was due to the directory missing in the executable definition. Using the following settings work fine:
<plugin>
   <groupId>org.codehaus.mojo</groupId>
   <artifactId>exec-maven-plugin</artifactId>
   <configuration>
      <executable>${project.build.directory}/${project.build.finalName}/bin/petals-esb.sh</executable>
      <workingDirectory>${project.build.directory}/${project.build.finalName}/bin</workingDirectory>
   </configuration>
</plugin>
Christophe DENEUX made changes - Wed, 16 Dec 2015 - 11:27:14 +0100
Link This issue depends on PETALSESBCONT-375 [ PETALSESBCONT-375 ]
Christophe DENEUX made changes - Wed, 16 Dec 2015 - 11:27:21 +0100
Link This issue depends on PETALSREGOVER-9 [ PETALSREGOVER-9 ]
Christophe DENEUX made changes - Wed, 16 Dec 2015 - 11:28:52 +0100
Link This issue depends on PETALSESBCLI-130 [ PETALSESBCLI-130 ]
Christophe DENEUX made changes - Wed, 16 Dec 2015 - 11:32:00 +0100
Link This issue depends on PETALSREGCLI-6 [ PETALSREGCLI-6 ]
Hide
Christophe DENEUX added a comment - Wed, 16 Dec 2015 - 11:37:04 +0100

Petals executables are now easily runnable using Maven from their source code directory: mvn exec:exec

Show
Christophe DENEUX added a comment - Wed, 16 Dec 2015 - 11:37:04 +0100 Petals executables are now easily runnable using Maven from their source code directory: mvn exec:exec
Christophe DENEUX made changes - Wed, 16 Dec 2015 - 11:37:04 +0100
Status In Progress [ 10003 ] Resolved [ 10004 ]
Fix Version/s 5.0.0 [ 10574 ]
Resolution Fixed [ 1 ]
Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
28m 28s
1
Christophe DENEUX
Wed, 16 Dec 2015 - 11:16:31 +0100
Open Open In Progress In Progress
2s
1
Christophe DENEUX
Wed, 16 Dec 2015 - 11:16:33 +0100
In Progress In Progress Resolved Resolved
20m 31s
1
Christophe DENEUX
Wed, 16 Dec 2015 - 11:37:04 +0100

People

Dates

  • Created:
    Wed, 16 Dec 2015 - 10:48:03 +0100
    Updated:
    Wed, 16 Dec 2015 - 11:37:04 +0100
    Resolved:
    Wed, 16 Dec 2015 - 11:37:04 +0100