Skip to content

Commit

Permalink
attempt to push to central
Browse files Browse the repository at this point in the history
  • Loading branch information
Jochen Stärk authored and Jochen Stärk committed Oct 17, 2020
1 parent 47146ad commit 0949fe7
Show file tree
Hide file tree
Showing 3 changed files with 177 additions and 81 deletions.
42 changes: 40 additions & 2 deletions doc/development_documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,28 @@ As „servers“, enter the following
      <id>github</id>
      <password>GITHUB-TOKEN</password>
    </server>
    <server>
      <id>ossrh</id>
      <username>jstaerk</username>
      <password>JIRA-PASSWORD</password>
    </server>
   </servers>
```
Add a profiles section to settings.xml
```
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.passphrase>PASSPHRASE</gpg.passphrase>
</properties>
</profile>
</profiles>
```

The whole settings.xml then looks e.g. like this
```xml
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
Expand All @@ -97,22 +117,40 @@ The whole settings.xml then looks e.g. like this
      <id>github</id>
      <password>TOKEN</password>
    </server>
    <server>
      <id>ossrh</id>
      <username>jstaerk</username>
      <password>JIRA-PASSWORD</password>
    </server>

</servers>
<mirrors/>
<proxies/>
<profiles/>
<profiles>
<profile>
<id>ossrh</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.passphrase>PASSPHRASE</gpg.passphrase>
</properties>
</profile>
</profiles>
<activeProfiles/>
</settings>
```

The password is generated on github.
The TOKEN is generated on github.
Deployment to maven central is described e.g. on [dzone](https://dzone.com/articles/publish-your-artifacts-to-maven-central).
See the following screenshot:


Sign in in GitHub and click on the profile picture -> Settings. Now just generate a new token and set the checkboxes from the screenshot.
![screenshot](development_documentation_screenshot_github_settings.png "Screenshot Github Settings")
The Token-ID is the password.


## Integrate before release

If you added functionality which you need to test in another project before a new version of Mustang is released you can
Expand Down
79 changes: 7 additions & 72 deletions library/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,20 +104,7 @@

</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin><!-- mvn help:effective-pom will otherwise tell it just defaults
to 2.3.2 - which does not release in the maven repo, and neither shows any
error message :-( -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>

<!-- toecount -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand All @@ -132,67 +119,13 @@
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<!-- http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven
mvn clean compile assembly:single -->
<!-- http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven
mvn clean compile assembly:single -->
<!-- or whatever version you use -->
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>


<!-- /toecount -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<configuration>

<excludePackageNames>org.mustangproject.ZUGFeRD.model.*</excludePackageNames>

</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo
</altDeploymentRepository>
</configuration>
</plugin>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.12</version>
<configuration>
<message>Maven artifacts for ${project.version}</message>
<!-- git commit message -->
<noJekyll>true</noJekyll>
<!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
<!-- matches distribution management repository url above -->
<branch>refs/heads/mvn-repo</branch>
<!-- remote branch name -->
<includes>
<include>**/*</include>
</includes>
<merge>true</merge>
<repositoryName>mustangproject</repositoryName>
<!-- github repo name -->
<repositoryOwner>ZUGFeRD</repositoryOwner>
<!-- github username -->
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as part of the build's normal
'deploy' phase -->
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down Expand Up @@ -237,9 +170,9 @@
<configuration>
<artifactSet>
<excludes>
<!--exclude>classworlds:classworlds</exclude> <exclude>junit:junit</exclude>
<exclude>jmock:*</exclude> <exclude>*:xml-apis</exclude> <exclude>org.apache.maven:lib:tests</exclude>
<exclude>log4j:log4j:jar:</exclude -->
<!--exclude>classworlds:classworlds</exclude> <exclude>junit:junit</exclude>
<exclude>jmock:*</exclude> <exclude>*:xml-apis</exclude> <exclude>org.apache.maven:lib:tests</exclude>
<exclude>log4j:log4j:jar:</exclude -->
</excludes>
</artifactSet>
</configuration>
Expand All @@ -261,6 +194,8 @@
</plugin>
</plugins>
</build>


<mailingLists>
<mailingList>
<name>User List</name>
Expand Down
137 changes: 130 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,131 @@
</description>
<url>http://www.mustangproject.org/</url>
<scm>
<connection>scm:git:https://github.com/ZUGFeRD/mustangproject.git</connection>
<developerConnection>scm:git:https://github.com/ZUGFeRD/mustangproject.git</developerConnection>
<url>https://github.com/ZUGFeRD/mustangproject</url>
<tag>mustang-1.7.3</tag>
<connection>scm:git:git://github.com/dexecutor/dependent-tasks-executor.git</connection>
<developerConnection>scm:git:git@github.com:dexecutor/dexecutor.git</developerConnection>
<url>https://github.com/dexecutor/dependent-tasks-executor</url>
</scm>
<build>
<pluginManagement>
<plugins>
<plugin><!-- mvn help:effective-pom will otherwise tell it just defaults
to 2.3.2 - which does not release in the maven repo, and neither shows any
error message :-( -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<localCheckout>true</localCheckout>
<pushChanges>false</pushChanges>
<mavenExecutorId>forked-path</mavenExecutorId>
<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
<version>1.9.5</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.1</version>
<configuration>

<excludePackageNames>org.mustangproject.ZUGFeRD.model.*</excludePackageNames>

</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo
</altDeploymentRepository>
</configuration>
</plugin>
<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.12</version>
<configuration>
<message>Maven artifacts for ${project.version}</message>
<!-- git commit message -->
<noJekyll>true</noJekyll>
<!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
<!-- matches distribution management repository url above -->
<branch>refs/heads/mvn-repo</branch>
<!-- remote branch name -->
<includes>
<include>**/*</include>
</includes>
<merge>true</merge>
<repositoryName>mustangproject</repositoryName>
<!-- github repo name -->
<repositoryOwner>ZUGFeRD</repositoryOwner>
<!-- github username -->
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as part of the build's normal
'deploy' phase -->
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.10.4</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
<executions>
<execution>
<id>attach-javadoc</id>
<goals>
</execution>
</executions>
</plugin>

</plugins>
</build>

<repositories>
<repository><!-- for jargs -->
<id>sonatype-oss-public</id>
Expand All @@ -35,10 +155,13 @@
</repository>
</repositories>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/ </url>
</repository>
</distributionManagement>
<properties>
Expand Down

0 comments on commit 0949fe7

Please sign in to comment.