Skip to content

Commit

Permalink
Merge pull request #2 from kieler/prepare-maven-release
Browse files Browse the repository at this point in the history
Prepare maven release
  • Loading branch information
NiklasRentzCAU authored Jun 6, 2023
2 parents e94c1b9 + 22fc8a1 commit 8c4b8c7
Show file tree
Hide file tree
Showing 10 changed files with 162 additions and 15 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
server-id: 'ossrh' # must match the serverId configured for the nexus-staging-maven-plugin
server-username: OSSRH_USERNAME # Env var that holds your OSSRH user name
server-password: OSSRH_PASSWORD # Env var that holds your OSSRH user pw
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Substituted with the value stored in the referenced secret
gpg-passphrase: SIGN_KEY_PASS # Env var that holds the key's passphrase
cache: 'maven'
- name: Build & Deploy
run: |
# -U force updates just to make sure we are using latest dependencies
# -B Batch mode (do not ask for user input), just in case
# -P activate profile
mvn -U -B clean deploy -P release
env:
SIGN_KEY_PASS: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}
OSSRH_USERNAME: ${{ secrets.SONATYPE_USER }}
OSSRH_PASSWORD: ${{ secrets.SONATYPE_PW }}
- uses: actions/upload-artifact@v3
with:
name: Maven Repository
path: swt-mock/
7 changes: 6 additions & 1 deletion org.eclipse.jface/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
<parent>
<groupId>de.cau.cs.kieler.swt.mock</groupId>
<artifactId>parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
</parent>

<artifactId>org.eclipse.jface</artifactId>

<!-- Further required information for publishing on OSSRH -->
<name>Mock for Jface</name>
<description>Leightweight mock code of org.eclipse.jface with parts of their API, but no implementation or platform dependence.</description>
<url>https://github.com/kieler/SWT-Mock/</url>

<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
* Clients who need a preference store may implement this interface or
* instantiate the standard implementation <code>PreferenceStore</code>.
* </p>
*
* @see PreferenceStore
*/
public interface IPreferenceStore {

Expand Down
7 changes: 6 additions & 1 deletion org.eclipse.swt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@
<parent>
<groupId>de.cau.cs.kieler.swt.mock</groupId>
<artifactId>parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
</parent>

<artifactId>org.eclipse.swt</artifactId>

<!-- Further required information for publishing on OSSRH -->
<name>Mock for Standard Widget Toolkit</name>
<description>Leightweight mock code of org.eclipse.swt with parts of their API, but no implementation or platform dependence.</description>
<url>https://github.com/kieler/SWT-Mock/</url>

</project>
7 changes: 6 additions & 1 deletion org.eclipse.ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@
<parent>
<groupId>de.cau.cs.kieler.swt.mock</groupId>
<artifactId>parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
</parent>

<artifactId>org.eclipse.ui</artifactId>

<!-- Further required information for publishing on OSSRH -->
<name>Mock for Eclipse UI</name>
<description>Leightweight mock code of org.eclipse.ui with parts of their API, but no implementation or platform dependence.</description>
<url>https://github.com/kieler/SWT-Mock/</url>

<dependencies>
<dependency>
Expand Down
1 change: 0 additions & 1 deletion org.eclipse.ui/src/org/eclipse/ui/IWorkbenchPart.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
* are managed by the platform's adapter manager.
* </p>
*
* @see IViewPart
* @see IEditorPart
*/
public interface IWorkbenchPart extends IAdaptable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* </p>
*
* @since 3.0
* @noimplement This interface is not intended to be implemented by clients.
* This interface is not intended to be implemented by clients.
*/
public interface IWorkbenchPartConstants {

Expand Down
4 changes: 1 addition & 3 deletions org.eclipse.ui/src/org/eclipse/ui/part/IPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@
* should instead subclass <code>Page</code>.
* </p>
*
* @see PageBookView
* @see Page
* @noimplement This interface is not intended to be implemented by clients.
* This interface is not intended to be implemented by clients.
*/
public interface IPage {
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,11 @@
* There are two ways for adding handlers to the handling flow. First using
* extension point <code>org.eclipse.ui.statusHandlers</code>, second by the
* workbench advisor and its method
* {@link WorkbenchAdvisor#getWorkbenchErrorHandler()}. If a handler is
* WorkbenchAdvisor#getWorkbenchErrorHandler(). If a handler is
* associated with a product, it is used instead of this defined in advisor.
* </p>
*
* @since 3.3
* @see AbstractStatusHandler
*/
public class StatusManager {
/**
Expand All @@ -82,6 +81,8 @@ public class StatusManager {
*/
public static final int SHOW = 0x02;

public static final int BLOCK = 0x04;

private static volatile StatusManager MANAGER;

/**
Expand Down Expand Up @@ -128,7 +129,6 @@ public void handle(IStatus status, int style) {
*
* @param coreException a CoreException to be handled.
* @param pluginId the unique identifier of the relevant plug-in
* @see StatusManager#handle(IStatus)
* @since 3.4
*
*/
Expand Down
116 changes: 114 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.cau.cs.kieler.swt.mock</groupId>
<artifactId>parent</artifactId>
<version>0.1.0-SNAPSHOT</version>
<version>0.1.0</version>
<packaging>pom</packaging>

<modules>
Expand All @@ -23,15 +23,127 @@
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
</properties>

<!-- Further required information for publishing on OSSRH, see https://central.sonatype.org/publish/requirements/ -->
<name>Mock for Standard Widget Toolkit - Parent</name>
<description>The parent configuration for multiple mock artifacts of SWT and UI-based code with no implementation or platform dependence.</description>
<url>https://github.com/kieler/SWT-Mock/</url>

<licenses>
<license>
<name>EPL-2.0</name>
<url>https://www.eclipse.org/legal/epl-2.0/</url>
</license>
</licenses>

<developers>
<developer>
<name>Niklas Rentz</name>
<email>[email protected]</email>
<organization>Kiel University</organization>
<organizationUrl>https://www.rtsys.informatik.uni-kiel.de/</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com:kieler/SWT-Mock.git</connection>
<developerConnection>scm:git:ssh://github.com:kieler/SWT-Mock.git</developerConnection>
<url>https://github.com/kieler/SWT-Mock/</url>
</scm>

<!-- while deploying, put the compiled artifact into the following (local) repository -->
<distributionManagement>
<!-- <distributionManagement>
<repository>
<id>internal-repo-for-downstream-usage</id>
<url>file://swt-mock</url>
</repository>
</distributionManagement> -->
<!-- While releasing or building snapshots, deploy them to OSSRH -->
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>



<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<!-- Configure the nexus server to deploy to. -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose> <!-- this allows to manually inspect the staging repository: https://central.sonatype.org/publish/release/
trigger a release later with `mvn nexus-staging:release` or set to true if no inspection is wanted.-->
</configuration>
</plugin>

<!-- Sign all artifacts with GPG. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
<configuration>
<keyname>0x22228C2E</keyname>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<sourceDirectory>src</sourceDirectory>

<plugins>
<!-- Build source and Javadoc jars -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

0 comments on commit 8c4b8c7

Please sign in to comment.