Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-2532

System properties cannot be set from Profiles or Settings.xml

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 2.0.4
    • None
    • Profiles, Settings
    • None
    • Windows XP

    Description

      Hi All

      With the maven-antrun-plugin in Maven 2.0.4 is it possibly to define a system property. Instead of me doing this all the time.

      mvn install -Duser.install.root="C:\Program Files\IBM\WebSphere\AppServer"

      For more info on the context see my blog http://www.jroller.com/page/peter_pilgrim?entry=how_to_configure_xemacs_http

      Specifically the system properties is not set up following to either a profiles.xml or settings.xml file by Maven 2
      Possibly the system property I need is not also transfered to the Ant task using the maven-antrun-plugin.

      /* profiles.xml */
      <profiles>
      <profile>
      <id>user-install-root</id>
      <activation>
      <property>
      <name>!user.install.root</name>
      </property>
      </activation>
      <properties>
      <user.install.root>C:
      Program Files\\IBM\\WebSphere
      AppServer</user.install.root>
      </properties>
      </profile>
      </profiles>

      Running mvn help:active-profiles, however, does show that the profile has been read.

      C:\WORKSP~2\M2SPRI~1\ejb>mvn help:active-profiles
      [INFO] Scanning for projects...
      [INFO] Searching repository for plugin with prefix: 'help'.
      [INFO] -------------------------------------------------------------------------

      [INFO] Building Maven 2.0 Spring EJB Research Project (EJB Module)
      [INFO] task-segment: [help:active-profiles] (aggregator-style)
      [INFO] -------------------------------------------------------------------------

      [INFO] [help:active-profiles]
      [INFO]
      Active Profiles for Project 'com.ubs.firc.ptsp.research.ejb:M2SpringEJBExample-e
      jb:ejb:1.0-SNAPSHOT':

      The following profiles are active:

      • user-install-root (source: profiles.xml)

      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD SUCCESSFUL
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1 second
      [INFO] Finished at: Tue Aug 29 10:46:31 BST 2006
      [INFO] Final Memory: 2M/5M
      [INFO] ------------------------------------------------------------------------

      C:\WORKSP~2\M2SPRI~1\ejb>

      Thanks Peter Pilgrim

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              peterpilgrim Peter Pilgrim
              Votes:
              12 Vote for this issue
              Watchers:
              14 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: