BuildDeploy.bat

 cscript /nologo c:\Utils\stopjboss.vbs

 set JBOSS_DEPLOYMENT=c:\jboss\standalone\deployments
 set DEVELOPMENT_HOME=c:\projectName
 set BRANCH=BranchName\ReleaseNo
 
 del /q %JBOSS_DEPLOYMENT%\*.*
 cd %DEVELOPMENT_HOME%\%BRANCH%
 
 call mvn clean
 call mvn install -o
 
 IF EXISTS  %DEVELOPMENT_HOME%\%BRANCH%\SpringMVC.war (
  goto :startServer
 ) else (
  echo Build Failed
 )

 exit /b

:startServer
 copy %DEVELOPMENT_HOME%\%BRANCH%\SpringMVC.war %JBOSS_DEPLOYMENT%
 cscript /nologo c:\Utils\startjboss.vbs
goto :eof

startjboss.vbs

 Set WshShell = WScript.CreateObject("WScript.Shell")
 activateServer("Server")
 WshShell.SendKeys "%{d}"

 Function activateServer(windowName)
   WshShell.SendKeys "^{3}"
   WScript.Sleep 500
   WshShell.SendKeys windowName
   WScript.Sleep 500
   WshShell.SendKeys "{ENTER}"
 End Function

stopjboss.vbs

 Set WshShell = WScript.CreateObject("WScript.Shell")
 activateServer("Server")
 WshShell.SendKeys "%{s}"
 WScript.Sleep 5000

How it Works

  • We are using a VBScript to Start and Stop server by Sending Key Strokes to Eclipse(Shortcut Keys)
  • The mvn clean and mvn install is done in 2 different steps to make sure that clean of the war files happen before the new file is created since executing clean and install in single shot happened to give inconsistent results
  • Once the build is done we are checking whether the war file is created or we are assuming the build failed and we are not starting the server
  • The builddeploy.bat should be configured in External Tools Configuration
  • Workdirectory is the one which has pom.xml of the project
  • Assign a shortcut key to Run Last Run Build Configuration

How to arrange Two excel sheets side by Side

Steps

  • Click on View tab, Click on New Window
  • Click on Arrange All, Select Vertical

Now to compare 2 Rows in 2 Excel Sheets

  • Select the Rows in the Sheet which needs to be compared
  • Click on Conditional Formatting Option
  • =ISNA(MATCH(A2,Sheet2!A2,FALSE))

If you want the formatting to be applied only for one Column select that column and apply conditional formatting

Instead of

 =$A$2:$B$7

it should be

 =$A$2:$A$7

in Conditional Rules Formatting Manager

Download Excel

How to highlight rows which have different row value of one Column

null

The Steps are as Below
Below is the way to highlight the rows based on a change in value in the single column.The Column considered is SNo

Steps

  • Select the whole DataSet LookUpArray on which the conditional formatting to be applied
  • Click on Conditional Formatting
  • Click on new Rule
  • Use a formula to determine which cells to format
  • Note : The formula used is relative formula =ISNA(MATCH($D2,$A$2:$A$7,FALSE))
  • Use the format option to apply the Conditional format on the cells
  • The same could be seen in Conditional Formatting->Manage Rules for future rule edits

In the below image Rows 4 and 7 are highlighted because of mismatch in SNo and 5 is highlighted because of mismatch in fruit name

Checking for Identical rows in two tables with more than one column

 =ISNA(MATCH($D2,$A$2:$A$7,FALSE)&MATCH($E2,$B$2:$B$7,FALSE) )

Steps

  • First we are checking if the rows in D2 is same as on in A2 to A7
  • Second we are checking if the rows in E2 is same as on in B2 to B7
=MATCH(lookup_value, lookup_array, match_type)

lookup_value – Value you are interested in
lookup_array – Column you want to look for value
match_type – Whether it should be a exact match or approximate match

Match Function

 =MATCH(D2,A2:A7,FALSE)

Looks for D2 in the Lookup Array in A2 to A7

Match with Msg

  =IFERROR(MATCH(D2,A2:A7,FALSE),"Missing")

In case of Error IFERROR is used to make it display as Missing

Match with ISNA

  =ISNA(MATCH(D2,A2:A7,FALSE))

If #N/A then it would be displayed as True

Match with 2 Columns

  =MATCH(D2,A2:A7,FALSE)&MATCH(E2,B2:B7,FALSE)

In the above code, we are checking the two columns for uniqueness by using two match function
and using && Operator to display the value as 11 or #N/A