Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 2 Next »

We use Maven to configure our web applications but some properties might be specific for your system. You can override them in the following way.

Step-by-step guide

  1. Go to your home directory and find the folder ".m2".
  2. In there might be a file called "settings.xml".
  3. If there is no such file, create a new file called settings.xml.
  4. Open that file. If it's empty add the following lines to it

    <settings>
     
    </settings>
  5. Then add the following:

    <profiles>
      <profile>
        <id>dev</id>
        <properties>
          <property-you-like-to-override>value</property-you-like-to-override>
        </properties>
      </profile>
    </profiles>

    Replace "property-you-like-to-override" with the name of the property you want to override, and "value" with the value. Replace the profile id (in the example "dev") with the id of the profile you want a certain value to be used. In the above example the property "property-you-like-to-override" will have the value "value" when Maven is run.

  • No labels