-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from codecentric/codecentric-refactoring
Codecentric refactoring
- Loading branch information
Showing
27 changed files
with
176 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Maven Build | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
|
||
- name: Build with Maven | ||
run: mvn -B install --no-transfer-progress --file pom.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: release-to-maven-central | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
releaseversion: | ||
description: 'Release version' | ||
required: true | ||
default: '1.1.0' | ||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: echo "Will start a Maven Central upload with version ${{ github.event.inputs.releaseversion }}" | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up settings.xml for Maven Central Repository | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: 11 | ||
server-id: oss.sonatype.org | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
|
||
- name: Set projects Maven version to GitHub Action GUI set version | ||
run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}" --no-transfer-progress | ||
|
||
- name: Publish package | ||
run: mvn --batch-mode clean deploy --no-transfer-progress -P central-deploy -DskipTests=true | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
|
||
- name: Generate changelog | ||
id: changelog | ||
uses: metcalfc/changelog-generator@v0.4.4 | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create GitHub Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.event.inputs.releaseversion }} | ||
release_name: ${{ github.event.inputs.releaseversion }} | ||
body: | | ||
Grab the new version from Maven central https://repo1.maven.org/maven2/de/codecentric/reedelk/module-scheduler/${{ github.event.inputs.releaseversion }}/ | ||
### Things that changed in this release | ||
${{ steps.changelog.outputs.changelog }} | ||
draft: false | ||
prerelease: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
src/main/java/com/reedelk/scheduler/internal/attribute/SchedulerAttributes.java
This file was deleted.
Oops, something went wrong.
8 changes: 0 additions & 8 deletions
8
src/main/java/com/reedelk/scheduler/internal/scheduler/SchedulingStrategyScheduler.java
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
src/main/java/de/codecentric/reedelk/scheduler/ModuleDefinition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package de.codecentric.reedelk.scheduler; | ||
|
||
import de.codecentric.reedelk.runtime.api.annotation.Module; | ||
|
||
@Module("Scheduler Module") | ||
public class ModuleDefinition { | ||
} | ||
|
6 changes: 3 additions & 3 deletions
6
...cheduler/component/CronConfiguration.java → ...cheduler/component/CronConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...omponent/FixedFrequencyConfiguration.java → ...omponent/FixedFrequencyConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
...eedelk/scheduler/component/Scheduler.java → ...eedelk/scheduler/component/Scheduler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...heduler/component/SchedulingStrategy.java → ...heduler/component/SchedulingStrategy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...reedelk/scheduler/component/TimeUnit.java → ...reedelk/scheduler/component/TimeUnit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...er/internal/SchedulerModuleActivator.java → ...er/internal/SchedulerModuleActivator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/de/codecentric/reedelk/scheduler/internal/attribute/SchedulerAttributes.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package de.codecentric.reedelk.scheduler.internal.attribute; | ||
|
||
import de.codecentric.reedelk.runtime.api.annotation.Type; | ||
import de.codecentric.reedelk.runtime.api.annotation.TypeProperty; | ||
import de.codecentric.reedelk.runtime.api.message.MessageAttributes; | ||
import org.quartz.JobExecutionContext; | ||
|
||
import static de.codecentric.reedelk.scheduler.internal.attribute.SchedulerAttributes.FIRED_AT; | ||
|
||
@Type | ||
@TypeProperty(name = FIRED_AT, type = long.class) | ||
public class SchedulerAttributes extends MessageAttributes { | ||
|
||
static final String FIRED_AT = "firedAt"; | ||
|
||
public SchedulerAttributes(JobExecutionContext executionContext) { | ||
put(FIRED_AT, executionContext.getFireTime().getTime()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...cheduler/internal/scheduler/Messages.java → ...cheduler/internal/scheduler/Messages.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...uler/internal/scheduler/SchedulerJob.java → ...uler/internal/scheduler/SchedulerJob.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
.../scheduler/SchedulingStrategyBuilder.java → .../scheduler/SchedulingStrategyBuilder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...java/de/codecentric/reedelk/scheduler/internal/scheduler/SchedulingStrategyScheduler.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package de.codecentric.reedelk.scheduler.internal.scheduler; | ||
|
||
import de.codecentric.reedelk.runtime.api.component.InboundEventListener; | ||
|
||
public interface SchedulingStrategyScheduler { | ||
|
||
SchedulerJob schedule(InboundEventListener listener); | ||
} |
Oops, something went wrong.