install maven in CentOS

from: https://tecadmin.net/install-apache-maven-on-centos/

 

Advertisements

Display all the classes loaded by jvm in Eclipse

I have a maven project which referenced hibernate-jpa-2.0 then I upgraded to hibernate-jpa-2.1. I got rid of all the indirect references to jpa-2.0 in pom and added explicitly the reference to jpa-2.1 but somehow it still uses the old one. In order to find out which jar version it is using, I added ‘-verbose:class‘ vm parameter then found out it still uses jpa-2.0 on the classpath. Then I manually deleted jpa-2.0 from local maven repository and rebuilt the project. Then everything works fine.

Maven Install third party jar

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> \
    -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>

ex. mvn install:install-file -Dfile=ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=6.0 -Dpackaging=jar