====== Java Best Practises ====== These guidelines help our many different Java projects and libraries to work together. ===== GitHub Repository ===== For easier collaboration, visibility, backup and version control, please create a repository at https://github.com/AKSW. Please only create a public repository if possible, as the number of private ones is limited. ===== Maven ===== Maven makes it easier to include dependencies //and// to let other people depend and work on your code. Please take care, to solely use HTTPS in your repository URLs, to avoid https://maven.apache.org/docs/3.8.1/release-notes.html#cve-2021-26291 and similar future vulnerabilities. Maven 3 pom.xml template (change the compiler source to your liking): 4.0.0 org.aksw.projectname projectname 0.0.1-SNAPSHOT 1.8 1.8 UTF-8 maven.aksw.internal University Leipzig, AKSW Maven2 Repository https://maven.aksw.org/repository/internal maven.aksw.snapshots University Leipzig, AKSW Maven2 Repository https://maven.aksw.org/repository/snapshots UK UK Central https://uk.maven.org/maven2 junit junit 4.12 test org.slf4j slf4j-log4j12 1.7.13 org.slf4j slf4j-api 1.7.13 If you have a stable project, create a release (non-snapshot) version, as it decrease network traffic and increase speed tremendously. ===== Logging ===== SLF4j is a collection of interfaces for logger abstraction and offers bridges, which makes it easier to handle libraries with different logging frameworks. ===== Encoding and Line Endings ===== Please always use UTF-8 encoding. Line endings will usually handled by git so that you can choose those as you prefer. ===== Further Reading ===== For general (not AKSW-specific) guidelines, see http://www.javapractices.com/home/HomeAction.do and https://github.com/cxxr/better-java.