Tuesday 17 March 2015

Test SyntaxHighlighter


SyntaxHighlighter


PHP
<?php
$example = range(0, 9);
foreach ($example as $value)
{
 echo $value;
}

JAVA
public class TestJava {

 /**
  * @param args
  */
 public static void main(String[] args) {
  // TODO Auto-generated method stub

 }

}


SQL
SELECT *
FROM DUAL;


Shell Script
#!/bin/bash
clear
which bash
echo "Good morning, world."


Tested in following browsers:

  • Chrome Version 41.0.2272.89 m 
  • Firefox 36.0.1 
  • IE 10.0.23

Reference links:


Tuesday 10 March 2015

Create Deployment Jar with Maven

Create a single jar with all dependencies type "mvn assembly:assembly" from the command line.
Include following plugin in pom.xml
    
        
            
                maven-assembly-plugin
                
                    
                        src/assemble/distribution.xml
                    
                    
                        jar-with-dependencies
                    
                
            
        
    


Configuration details in descriptor file distribution.xml

    distribution
    
        jar
    
    
        
            
                README
                README.txt
                NOTICE
                NOTICE.txt
                LICENSE
                LICENSE.txt
                log4j.properties
            
        
    


Apache Maven Assembly Plugin