Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-134

Logback cannot read system properties configured in Maven Jetty Plugin

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • None
    • None

    Description

      I have a system property configured in the maven jetty plugin, as follows:

      <plugin>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>maven-jetty-plugin</artifactId>
      <version>6.1.10</version>
      <configuration>
      <systemProperties>
      <systemProperty>
      <name>project.home</name>
      <value>D:</value>
      </systemProperty>
      </systemProperties>
      ....
      </configuration>
      </plugin>

      If I use this system property in logback –

      <property file="${project.home}/foo/bar/baz/app.properties"/>

      This system property is UNDEFINED when I run the webapp via mvn jetty:run.

      The rest of the system (spring configuration files, etc) can happily use the project.home system property
      except for logback.

      The only way to run jetty now, with the correct substitution is through:

      mvn jetty:run "-Dproject.home=D:"

      Attachments

        Activity

          People

            logback-dev Logback dev list
            emantos Erle Czar Mantos
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: