5. /**
* @author François Robert
*/
public class PtitbobAtToursJug {
public static void main(String... args) {
System.out.println("Hello everybody");
}
public Twitter getTwitter() {
return new Twitter("@ptitbob");
}
public URL getGithub() throws MalformedURLException {
return new URL("github.com/ptitbob");
}
}
6. Pourquoi ?
Lib qui n’existe pas
Idée du siècle
Plugin maven
complexe Iznogoud
7. Lib qui n’existe pas
Swagger UI+Swagger
= Swagger-UI-Integration
@SwaggerUIConfiguration
public class ApplicationConfiguration {
}
8.
9.
10.
11. • Coordonnées
• Description du projet
• La signature
• La licence
• Le(s) développeur(s)
• Informations de repo de source
12. Ce qu’il ne faut pas faire
• Intégrer un repository (autres que défaut)
• Intégrer des lib non libre
• Lib ayant une licence moins permissive
13. • Coordonnées
• Description du projet
• La signature
• La licence
• Le(s) développeur(s)
• Informations de repo de source
27. LGPL
Licence publique générale limitée GNU
<licenses>
<license>
<name>GNU LESSER GENERAL PUBLIC LICENSE version 3</name>
<url>http://www.gnu.org/licenses/lgpl-3.0.fr.html</url>
</license>
</licenses>
28. • Coordonnées
• Description du projet
• La signature
• La licence
• Le(s) développeur(s)
• Informations de repo de source
33. Demande de publication
Il en existe d’autres
• Apache Software Foundation (for all Apache projects)
• FuseSource Forge (focused on FUSE related projects)
• nuiton.org
• …
34. Créez vous un compte
Création de demande
Demande de publication
35. Demande de publication
Community Support - Open Source Project Repository Hosting (OSSRH)
Nouveau projet
Le projet en une phrase
Courte description
36. Demande de publication
Le groupId choisi
Site de description ou lien vers le README
L’URL (github ou bitbucket)
Login Sonatype
44. Utilisation du plugin Nexus
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.3</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin> <servers>
<server>
<id>ossrh</id>
<username>ptitbob</username>
<password>[password]</password>
</server>
</servers>
pom.xml
settings.xml
Configuration de la release
45. Publication de la release
En 2 temps
mvn clean install release:clean release:prepare1
mvn -Prelease clean install gpg:sign
nexus-staging:deploy
2
Se placer dans le tag généré