Hi,
Some days ago i had some problems with a webapp of mine, deployed at a
test-server.
The reason was a wrong version (properties for localhost).
Now i wonder if there exists any plugin that generates some kind of version
info, that can be retrieved from a running webapp (or at least the webapp
should log this information to the logger).
What i exactly have in mind, would be...
- artifactId-version-buildnumber (eg: SVN Revision)
- it would be also nice, if the "name" (respectively id) of the maven
profile would be added as well, since i use multiple profiles to include the
corresponding properties, using...
<profile>
<id>localhost</id>
<build>
<resources>
<resource>
<directory>src/main/resources.localhost</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>live-server</id>
<build>
<resources>
<resource>
<directory>src/main/resources.live</directory>
</resource>
</resources>
</build>
</profile>
<profile>
<id>test-server</id>
<build>
<resources>
<resource>
<directory>src/main/resources.test</directory>
</resource>
</resources>
</build>
</profile>
My approach would be to write a plugin, that reads out this information (at
build-time) and generate a buildinfo.properties (buildinfo.txt) file that is
put into the classpath (e.g.: .WAR file), and can than be read out through a
small service that can be integrated into a webapp (or CLI as well).
any hints, thoughts, ideas are very welcome.
best regards
R.C.
--
View this message in context:
http://www.nabble.com/-M2--best-practice-to-retrieve-the-version-of-a-webapp--tp18087164p18087164.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]