Maven annoyances: Dynamic Web Module 3 1 requires Java 1 7 or newer

Solution to this irritating problem can be found here

http://javahonk.com/dynamic-web-module-3-1-requires-java-1-7-or-newer/

Advertisements

Maven annoyances: “Web.Xml Is Missing And Is Set To True”

So you are getting this error in your Eclipse IDE

web.xml is missing and <failOnMissingWebXml&gt> is set to true

Here how you fix this silly error

Right click the project->Java EE Tools->Generate Deployment Descriptor Stub

Voila. Problem fixed.

Extract .key and .crt files from JKS file

JKS file is a Java keystore. Using the Java keytool program, run the following commands

Export the .der file

keytool -export -alias sample -file sample.der -keystore my.jks

Convert the .der file to unencrypted PEM (crt file)

openssl x509 -inform der -in sample.der -out sample.crt

Export the .p12 file

keytool -importkeystore -srckeystore my.jks -destkeystore keystore.p12 -deststoretype PKCS12

Convert the .p12 file to unencrypted PEM (key file)

openssl pkcs12 -in keystore.p12 -nodes -nocerts -out server.key

 

More info here: http://www.gtopia.org/blog/2010/02/der-vs-crt-vs-cer-vs-pem-certificates/

Linux: Find recently modified files recursively

List all files in the folder /site/ reverse sorted by modifed date

find /site/ -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort -r | more

List all php files in the folder /var/www/html/site/ reverse sorted by modifed date

find /site/ -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort -r | grep php | more