Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Polish command line property source demo
Browse files Browse the repository at this point in the history
Issue: SPR-8482
  • Loading branch information
cbeams committed Jun 30, 2011
1 parent 6fddf8a commit c583a82
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SPR-8482/README.markdown
Expand Up @@ -18,14 +18,14 @@ this from within Eclipse using the Run->Run Configurations menu, or from the Mav
command line with the following:

```bash
$ mvn -e exec:java -Dexec.mainClass="org.springframework.issues.Spr8482Main" -Dexec.args="--greeting=Wilkommen"
$ mvn package exec:java -Dexec.mainClass="org.springframework.issues.Spr8482Main" -Dexec.args="--greeting=Wilkommen"
```

Now, try leaving the --greeting command line argument in place while also setting a
'greeting' environment variable when running the application:

```bash
$ greeting=Bienvenidos mvn -e exec:java -Dexec.mainClass="org.springframework.issues.Spr8482Main" -Dexec.args="--greeting=Wilkommen"
$ greeting=Bienvenidos mvn package exec:java -Dexec.mainClass="org.springframework.issues.Spr8482Main" -Dexec.args="--greeting=Wilkommen"
```

You'll notice that 'Bienvenidos' is now the greeting. This is because the system
Expand Down
2 changes: 2 additions & 0 deletions SPR-8482/pom.xml
Expand Up @@ -49,13 +49,15 @@
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<configuration>
<includes>
<include>**/*Tests.java</include>
Expand Down

0 comments on commit c583a82

Please sign in to comment.