2013-11-15

Maven build timestamp

Want to display a Maven build timestamp using a Maven build. Check this out...

Create a file in src/main/resources. Its name can be whatever.properties. 
It could contain:
   the.application.version     = ${project.version}
   the.application.build.time  = ${maven.project.timestamp}

Then, in the pom.xml, you should have in the build tag:
<resources>
   <resource>
      <directory>src/main/resources</directory>
      <filtering>true</filtering>
   </resource>
</resources>

The filtering to true is the magic that converts ${project.version} to the real deal project version.

We could've used maven.build.timestamp in the whatever.properties file, instead of maven.project.timestamp, which is not a Maven standard property. 
But, there is a bug in Maven. The workaround is to use it indirectly as in the pom.xml, properties tag:
<maven.project.timestamp>${maven.build.timestamp}</maven.project.timestamp>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm</maven.build.timestamp.format>

That's pretty it.


2013-06-23

tree command on Mac

In :
/usr/local/bin/tree

Edit this :
#!/bin/bash
find $1 -print | sed -e 's;[^/]*/;|--;g;s;--|; |;g'
Run :
tree .


2012-12-07

Mac OS Finder show hidden files

In Terminal mode:
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

Back to hide:

defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder

2012-08-24

Install maven

tar -xvzf apache-maven-3.0.3-bin.tar.gz
sudo cp -R apache-maven-3.0.3 /usr/local
sudo ln -s /usr/local/apache-maven-3.0.3/bin/mvn /usr/bin/mvn
mvn –version

2012-06-08

Survive the End Game

http://www.scribd.com/doc/96356876/Eidesis-Capital