Passing system properties to camel-maven-plugin when generating report

View: New views
2 Messages — Rating Filter:   Alert me  

Passing system properties to camel-maven-plugin when generating report

by Dragisa Krsmanovic :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Setting system properties for mvn camel:run works fine like this:

<build>
   <plugins>
      <plugin>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-maven-plugin</artifactId>
        <version>2.0.0</version>
        <configuration>
          <systemProperties>
            <property>
              <key>version</key>
              <value>${project.version}</value>
            </property>
          </systemProperties>
        </configuration>
      </plugin>
      ....

Doing similar thing for Camel report fails. System property does not
seem to have been set.

<reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-maven-plugin</artifactId>
        <configuration>
          <systemProperties>
            <property>
              <key>version</key>
              <value>${project.version}</value>
            </property>
          </systemProperties>
        </configuration>
      </plugin>

Camel report initializes Spring context. I need to pass some system
properties to it. How do I do that ?



--
Dragisa Krsmanovic
Java Developer
Public Library of Science
http://www.plos.org


Re: Passing system properties to camel-maven-plugin when generating report

by Claus Ibsen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Oct 28, 2009 at 7:20 PM, Dragisa Krsmanovic
<dkrsmanovic@...> wrote:

> Setting system properties for mvn camel:run works fine like this:
>
> <build>
>   <plugins>
>      <plugin>
>        <groupId>org.apache.camel</groupId>
>        <artifactId>camel-maven-plugin</artifactId>
>        <version>2.0.0</version>
>        <configuration>
>          <systemProperties>
>            <property>
>              <key>version</key>
>              <value>${project.version}</value>
>            </property>
>          </systemProperties>
>        </configuration>
>      </plugin>
>      ....
>
> Doing similar thing for Camel report fails. System property does not
> seem to have been set.
>

Which camel report? Is it camel:dot

The source code is in the tooling so you can take a look and see if
you can find the issue?
https://svn.apache.org/repos/asf/camel/trunk/tooling/maven/camel-maven-plugin/

You can the compare the camel:run plugin with the camel:dot to see if
you can spot a difference.



> <reporting>
>    <plugins>
>      <plugin>
>        <groupId>org.apache.camel</groupId>
>        <artifactId>camel-maven-plugin</artifactId>
>        <configuration>
>          <systemProperties>
>            <property>
>              <key>version</key>
>              <value>${project.version}</value>
>            </property>
>          </systemProperties>
>        </configuration>
>      </plugin>
>
> Camel report initializes Spring context. I need to pass some system
> properties to it. How do I do that ?
>
>
>
> --
> Dragisa Krsmanovic
> Java Developer
> Public Library of Science
> http://www.plos.org
>
>



--
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus