Daily Archives: April 25, 2017

eclipse – map jar to source

As we know when we develop java, some special jar should be stepped into to investigate logical inside jar.

say there are 10 jar files has 10 zip file for source.

there is a better way to use eclipse UI. Here is inside .classpath file.

1
<classpathentry kind="lib" path="D:/dev/oltu/oauth-2.0/authzserver/target/org.apache.oltu.oauth2.authzserver-1.0.3-SNAPSHOT.jar" sourcepath="D:/dev/oltu/oauth-2.0/authzserver/src/main/java/org.zip"/>

Maven – different between -DskipTests and -Dmaven.test.skip=true

sometime when we build maven, junit will also be invoked to test code.

usually, these unit test will fail because of development machine configures are different.

there are two commands which could skip test.

1
2
$ mvn package -DskipTests
$ mvn package -Dmaven.test.skip=true

“-DskipTests” is to build test source code but don’t run them.
“-Dmaven.test.skip=true” don’t do anything for test source code, do not compile and do not run for test code.