Skip to content

Commit

Permalink
#366 hopefully done (#430)
Browse files Browse the repository at this point in the history
it should now be possible to release to central
  • Loading branch information
vaadin-miki authored Nov 18, 2022
1 parent 1256b40 commit 49c0f5f
Show file tree
Hide file tree
Showing 10 changed files with 142 additions and 58 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish-central.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish to Central
on:
release:
type: [created]

jobs:
publish_central:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
server-id: maven-central
server-username: CENTRAL_USERNAME
server-password: CENTRAL_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Publish to Central
run: mvn deploy -P deploy-central --file superfields/pom.xml
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
types: [created]

jobs:
publish:
publish_github:

runs-on: ubuntu-latest
timeout-minutes: 30
Expand All @@ -28,4 +28,4 @@ jobs:
- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml --file superfields/pom.xml
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Starting with **version 0.12** SuperFields work with the latest major Vaadin ver
This is the relevant dependency:
```
<dependency>
<groupId>org.vaadin.miki</groupId>
<groupId>pl.unforgiven</groupId>
<artifactId>superfields</artifactId>
<version>{VERSION}</version>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions demo-v23/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>superfields-parent</artifactId>
<groupId>org.vaadin.miki</groupId>
<groupId>pl.unforgiven</groupId>
<version>0.6.66-SNAPSHOT</version>
</parent>

Expand All @@ -21,7 +21,7 @@

<dependencies>
<dependency>
<groupId>org.vaadin.miki</groupId>
<groupId>pl.unforgiven</groupId>
<artifactId>superfields</artifactId>
<version>0.6.66-SNAPSHOT</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>org.vaadin.miki</groupId>
<groupId>pl.unforgiven</groupId>
<artifactId>superfields-parent</artifactId>
<version>0.6.66-SNAPSHOT</version>
<modules>
Expand Down
152 changes: 105 additions & 47 deletions superfields/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.vaadin.miki</groupId>
<groupId>pl.unforgiven</groupId>
<artifactId>superfields</artifactId>
<name>SuperFields</name>
<description>Code for various V14+ fields and other components.</description>
<url>https://www.unforgiven.pl/superfields</url>
<version>0.6.66-SNAPSHOT</version>

<properties>
Expand All @@ -16,6 +17,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<vaadin.version>23.2.5</vaadin.version>
<maven.jar.plugin.version>3.1.2</maven.jar.plugin.version>
<javadoc.plugin.version>3.4.1</javadoc.plugin.version>
</properties>

<organization>
Expand All @@ -31,43 +33,6 @@
</license>
</licenses>

<repositories>
<!-- The order of definitions matters. Explicitly defining central here to make sure it has the highest priority. -->
<repository>
<id>vaadin-prereleases</id>
<url>https://maven.vaadin.com/vaadin-prereleases</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>

<!-- Main Maven repository -->
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- Repository used by many Vaadin add-ons: https://vaadin.com/directory -->
<repository>
<id>Vaadin Directory</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>

<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -135,14 +100,6 @@
</dependency>
</dependencies>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Apache Maven Packages</name>
<url>https://maven.pkg.github.com/vaadin-miki/super-fields</url>
</repository>
</distributionManagement>

<!-- configuration to enable publishing to Vaadin Directory -->
<build>
<plugins>
Expand Down Expand Up @@ -249,7 +206,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<version>${javadoc.plugin.version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down Expand Up @@ -278,6 +235,107 @@
</plugins>
</build>
</profile>
<profile>
<id>deploy-central</id>
<distributionManagement>
<repository>
<id>maven-central</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>maven-central</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.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>${javadoc.plugin.version}</version>
<configuration>
<doclint>none</doclint>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</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://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>deploy-github</id>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Apache Maven Packages</name>
<url>https://maven.pkg.github.com/vaadin-miki/super-fields</url>
</repository>
</distributionManagement>
</profile>
</profiles>

<developers>
<developer>
<name>Miki</name>
<email>miki@unforgiven.pl</email>
<organization>Unforgiven.pl</organization>
<organizationUrl>https://www.unforgiven.pl</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/vaadin-miki/superfields.git</connection>
<developerConnection>scm:git:git://github.com/vaadin-miki/superfields.git</developerConnection>
<url>https://github.com/vaadin-miki/superfields</url>
</scm>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected void configureGrid(Grid<V> grid) {

/**
* This method is called when a grid cell is selected in the client.
* By default it calls {@link #updateValue()}.
* By default, it calls {@link #updateValue()}.
* @param event Event with selection details.
*/
protected void onGridSelected(SelectionEvent<Grid<V>, V> event) {
Expand All @@ -56,7 +56,7 @@ protected void onGridSelected(SelectionEvent<Grid<V>, V> event) {

/**
* Returns the underlying {@link Grid}. Use with caution. Please do not mess with grid's selection.
* Note: unless a protected constructor with predefined grid - {@link GridSelect(Grid)} - is called, the returned grid will be a {@link RestrictedModeGrid}.
* Note: unless a protected constructor with predefined grid - {@link GridSelect#GridSelect(Grid)} - is called, the returned grid will be a {@link RestrictedModeGrid}.
* @return The {@link Grid}. Any changes to the grid will affect this component.
*/
public Grid<V> getGrid() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.Set;

/**
* A multi-selection {@link GridSelect}. Holds a value that is a {@link Set}<{@code V}>.
* A multi-selection {@link GridSelect}. Holds a value that is a {@link Set}&lt;{@code V}&gt;.
* @param <V> Value to store in the {@link Grid}.
* @author miki
* @since 2020-12-09
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

/**
* Reference implementation of {@link PropertyComponentBuilder}.
* In general, it allows building components based on {@link Predicate}<{@link Property}> and provides some helper methods for common use cases.
* In general, it allows building components based on {@link Predicate}&lt;{@link Property}&gt; and provides some helper methods for common use cases.
*
* @author miki
* @since 2022-06-06
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
* Simple reflection-based definition provider.
* It scans a given type for {@code private} fields (including {@code final}) and corresponding setters and/or getters.
* Delegates the scanning to {@link ReflectTools#extractFieldsWithMethods(Class, boolean)}.
* <br/>
* Superclasses are by default included, unless {@link DoNotScanSuperclasses} is used on the type.
* All fields are included in the results, except fields annotated with {@link Ignore}.
* The declared field types are used, unless {@link UseActualType} is used, in which case the actual type of the field's value is used.
Expand Down

0 comments on commit 49c0f5f

Please sign in to comment.