Hi Christian, thanks for the description of your approach, this sounds very nice to me, and i will try it out soon.
best regards R.C. christian domsch (innoWake gmbh) wrote: > > Hi R.C., > > This is more or less the same we do in our project. I use the > buildnumber-plugin to generate a buildnumber and write this information > inside the generated MANIFEST.MF on each jar building process (jar, war, > ear). Then I use the war overlay mechanism to join my project war with a > util-war that just adds a library.jsp page, that iterates over all > METAINF.MF files in the classpath and looks for that property and writes > it to a page. > > Greetings, > > Christian. > -- > christian domsch > [software developer] > > > > innoWake gmbh > innovative.software.development(); > graf-arco-strasse 18 | 89079 ulm-donautal > fon: +49 (0)7 31 - 5 50 27 - 0 > fax: +49 (0)7 31 - 5 50 27 - 20 > [EMAIL PROTECTED] > www.innowake.de > > > innoWake gmbh hrb ulm 4584 > geschäftsführer: thorsten bernecker > > This e-mail may contain confidential information. If you are not the > intended recipient please notify the sender immediately and destroy this > e-mail. > -----Ursprüngliche Nachricht----- > Von: CodingPlayer [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 24. Juni 2008 11:20 > An: [email protected] > Betreff: [M2] best-practice to retrieve the version of a webapp? > > > 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] > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-M2--best-practice-to-retrieve-the-version-of-a-webapp--tp18087164p18089825.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]
