User Tools

Site Tools


public:javabestpractises

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
public:javabestpractises [2015/12/07 12:36] – created Konrad Hoeffnerpublic:javabestpractises [2021/04/29 11:42] (current) – [Maven] Carl Suckfuell
Line 8: Line 8:
  
 ===== Maven ===== ===== 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): Maven 3 pom.xml template (change the compiler source to your liking):
  
 <code> <code>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">+<project xmlns="https://maven.apache.org/POM/4.0.0" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="https://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelversion>4.0.0</modelversion>     <modelversion>4.0.0</modelversion>
     <groupid>org.aksw.projectname</groupid>     <groupid>org.aksw.projectname</groupid>
Line 23: Line 27:
             <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>             <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>     </properties>
 +<!-- remove repositories you don't use-->
 +     <repositories>
 +            <repository>
 +                <id>maven.aksw.internal</id>
 +                <name>University Leipzig, AKSW Maven2 Repository</name>
 +                <url>https://maven.aksw.org/repository/internal</url>
 +            </repository>
 +            <repository>
 +                <id>maven.aksw.snapshots</id>
 +                <name>University Leipzig, AKSW Maven2 Repository</name>
 +                <url>https://maven.aksw.org/repository/snapshots</url>
 +            </repository>
 +            <repository>
 +                <id>UK</id>
 +                <name>UK Central</name>
 +                <url>https://uk.maven.org/maven2</url>
 +            </repository>
 +        </repositories>
  
     <dependencies>     <dependencies>
Line 46: Line 68:
  
 If you have a stable project, create a release (non-snapshot) version, as it decrease network traffic and increase speed tremendously. If you have a stable project, create a release (non-snapshot) version, as it decrease network traffic and increase speed tremendously.
 +
  
 ===== Logging ===== ===== Logging =====
  
-SLF4j +SLF4j is a collection of interfaces for logger abstraction and offers bridges, which makes it easier to handle libraries with different logging frameworks. 
-is a collection of interfaces for logger abstraction, which .+
  
 ===== Encoding and Line Endings ===== ===== 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. 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.
  
  
public/javabestpractises.1449488194.txt.gz · Last modified: 2015/12/07 12:36 by Konrad Hoeffner

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki