Nice trick ... I wonder what the Gradle equivalent is. We may be doing it the hard way right now.
On Thu, Sep 15, 2011 at 10:50 AM, Martin Strand <do.not.eat.yellow.s...@gmail.com> wrote: > On Wed, 14 Sep 2011 15:57:11 +0200, Steve Eynon > <steve.ey...@alienfactory.co.uk> wrote: > >> Yep, looks like you can't inject SymbolSource into your >> ApplicationDefaults contribution method when ProdMode is set to true; >> bit of a pain because I was using it to extract my webapp version for >> setting as the tapestry.app-version. > > > As a side note, an easy way to automatically set the version number is to > read it from the jar's manifest: > > contributeApplicationDefaults(...) > { > > String version = YourModule.class.getPackage().getImplementationVersion(); > if (version != null) > { > configuration.add(SymbolConstants.APPLICATION_VERSION, version); > } > > > > With Maven, use addDefaultImplementationEntries to add version info to the > manifest: > > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-jar-plugin</artifactId> > <configuration> > <archiveClasses>true</archiveClasses> > <archive> > <manifest> > > <addDefaultImplementationEntries>true</addDefaultImplementationEntries> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org