Tuesday, October 2, 2018

Eclipse Simultaneous Release 2018-09 is now "Eclipse 4.9"

I was expecting Eclipse 4.9 sometime during June, 2019 as part of the Eclipse annual release cycle. It's kind of surprising for me when I heard about Eclipse Simultaneous Release 2018-09 (SimRel 2018-09 ) is now called as "Eclipse 4.9

Each annual release typically occurs in June, with follow-up update releases in September (*.1), December (*.2), and March (*.3). 

Whatever, let's welcome "Eclipse 4.9" and it's time for one more upgrade!


Here are New and Noteworthy changes in the Eclipse 4.9
http://www.eclipse.org/eclipse/news/4.9/

More FAQ's here on the naming convention for Simultaneous Release:
https://wiki.eclipse.org/SimRel/Simultaneous_Release_Cycle_FAQ


More interesting part is here from the above link:


The releases will be named following the pattern year.month: SimRel YYYY-MM.
For instance SimRel 2018-09SimRel 2018-12SimRel 2019-03SimRel 2019-06
Note that unlike past years, the name will no longer change annually with an alphabetically increasing name (Kepler, Luna, Mars, Neon, Oxygen, Photon) but will instead remain the singular name of the train.
See the discussion in Bugzilla : https://bugs.eclipse.org/bugs/show_bug.cgi?id=532220.

Monday, October 1, 2018

Snapshot of Java 11 Features

New features from the developer’s perspective:


I think the most important feature from above is, HTTP Client API. As you must aware there are a number of existing HTTP client API’s and implementations exist, e.g. Jetty and the Apache Http Client – In fact, I was using Apache Http Client since there was no standardized API from the Java. 

Other important thing here is - Removal of Java EE and CORBA modules. Many projects still using JAXB API's and now they need to package them as third-party jars.

Memory and Performance tuning:
   (Experimental)

However, none of them impact the hotspot GC. Those are introduced to address various use cases especially for testing and performance tuning and need to enable them through specific flags.

Deprecated Features:


Lot of people uses the Nashron JS engine to run the JS code from the Java – this might be a huge impact for those people.

Thursday, September 27, 2018

When to amend/squash commits and how to maintain a clean PR

I always like to improve the development process with the git and a strong believer in the clean code.
Something which I always insist during my PR review is - maintain the clean git history by avoiding the unnecessary indivual commits. 

Broadly, we can follow these 2 rules:

  1. amend/squash commits if they don't add semantic value to the PR
  2. Always rebase the PR before you push to the server

Below article exactly reflects my thought on this.



Other nice articles on this:

https://www.atlassian.com/git/tutorials/rewriting-history
https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History

Friday, September 21, 2018

Setting a specific Java version to maven if you've multiple Java versions installed in the system

This is for the macOS:

By default, maven runs with the default JAVA_HOME configured in the system. If you want to set a different Java version temporarily for your maven - we need to change the JAVA_HOME in the mvn file. 

mvn shell file

#!/bin/bash
JAVA_HOME="${JAVA_HOME:-$(/usr/libexec/java_home)}" exec "/usr/local/Cellar/maven/3.5.2/libexec/bin/mvn" "$@"


Changed mvn shell file this to:

#!/bin/bash
JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home" exec "/usr/local/Cellar/maven/3.5.2/libexec/bin/mvn" "$@"

However, if you wish to set a particular java version to the project permanently - that needs to be configured in the pom.xml file

Refer here:                   


For example, to set for Java 1.8
<properties>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
 </properties>


Java 7:

<properties>
        <maven.compiler.target>1.7</maven.compiler.target>
        <maven.compiler.source>1.7</maven.compiler.source>
 </properties>


 But where can I find this mvn file in macOS?
$ which mvn
/usr/local/bin/mvn

$ cat mvn
#!/bin/bash
JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home" exec "/usr/local/Cellar/maven/3.5.2/libexec/bin/mvn" "$@"

As you can see - mvn file is located in /usr/local/Cellar/maven/3.5.2/libexec/bin/