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'
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>
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

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