User Tools

Site Tools


public:javabestpractises

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
public:javabestpractises [2015/12/07 12:40] – [Maven] Konrad Hoeffnerpublic:javabestpractises [2021/04/29 11:42] (current) – [Maven] Carl Suckfuell
Line 10: Line 10:
  
 Maven makes it easier to include dependencies //and// to let other people depend and work on your code. 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 25: 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 58: Line 78:
  
 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.1449488456.txt.gz · Last modified: 2015/12/07 12:40 by Konrad Hoeffner

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki