Skip to content

Commit

Permalink
Merge pull request #1 from codecentric/codecentric-refactoring
Browse files Browse the repository at this point in the history
Codecentric refactoring
  • Loading branch information
danielkocot authored Mar 15, 2021
2 parents 249ba41 + 4fa06bf commit b669b12
Show file tree
Hide file tree
Showing 49 changed files with 302 additions and 232 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/maven.yml
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
56 changes: 56 additions & 0 deletions .github/workflows/release-to-maven-central.yml
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/[email protected]
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-ftp/${{ github.event.inputs.releaseversion }}/
### Things that changed in this release
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.reedelk</groupId>
<groupId>de.codecentric.reedelk</groupId>
<artifactId>module-parent</artifactId>
<version>1.0.6</version>
<version>2.0.0</version>
</parent>

<packaging>bundle</packaging>
<version>1.0.6</version>
<version>2.0.0</version>
<artifactId>module-ftp</artifactId>

<properties>
Expand Down
7 changes: 0 additions & 7 deletions src/main/java/com/reedelk/ftp/ModuleDefinition.java

This file was deleted.

10 changes: 0 additions & 10 deletions src/main/java/com/reedelk/ftp/component/ConnectionType.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package de.codecentric.reedelk.ftp;

import de.codecentric.reedelk.runtime.api.annotation.Module;

@Module("FTP Module")
public class ModuleDefinition {
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.reedelk.ftp.component;
package de.codecentric.reedelk.ftp.component;

import com.reedelk.runtime.api.annotation.*;
import com.reedelk.runtime.api.commons.StringUtils;
import com.reedelk.runtime.api.component.Implementor;
import de.codecentric.reedelk.runtime.api.annotation.*;
import de.codecentric.reedelk.runtime.api.commons.StringUtils;
import de.codecentric.reedelk.runtime.api.component.Implementor;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.ServiceScope;

import java.util.Optional;

import static com.reedelk.ftp.internal.commons.Utils.FTP_PATH_SEPARATOR;
import static de.codecentric.reedelk.ftp.internal.commons.Utils.FTP_PATH_SEPARATOR;

@Shared
@Component(service = ConnectionConfiguration.class, scope = ServiceScope.PROTOTYPE)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.reedelk.ftp.component;
package de.codecentric.reedelk.ftp.component;

import com.reedelk.runtime.api.annotation.DisplayName;
import de.codecentric.reedelk.runtime.api.annotation.DisplayName;
import org.apache.commons.net.ftp.FTPClient;

public enum ConnectionMode {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package de.codecentric.reedelk.ftp.component;

import de.codecentric.reedelk.runtime.api.annotation.DisplayName;

public enum ConnectionType {
@DisplayName("FTP")
FTP,
@DisplayName("FTPs")
FTPS
}
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
package com.reedelk.ftp.component;

import com.reedelk.ftp.internal.Command;
import com.reedelk.ftp.internal.CommandDeleteFile;
import com.reedelk.ftp.internal.ExceptionMapper;
import com.reedelk.ftp.internal.FTPClientProvider;
import com.reedelk.ftp.internal.attribute.FTPAttribute;
import com.reedelk.ftp.internal.commons.Utils;
import com.reedelk.ftp.internal.exception.FTPDeleteException;
import com.reedelk.runtime.api.annotation.*;
import com.reedelk.runtime.api.component.ProcessorSync;
import com.reedelk.runtime.api.exception.PlatformException;
import com.reedelk.runtime.api.flow.FlowContext;
import com.reedelk.runtime.api.message.Message;
import com.reedelk.runtime.api.message.MessageBuilder;
import com.reedelk.runtime.api.script.ScriptEngineService;
import com.reedelk.runtime.api.script.dynamicvalue.DynamicString;
package de.codecentric.reedelk.ftp.component;

import de.codecentric.reedelk.ftp.internal.Command;
import de.codecentric.reedelk.ftp.internal.CommandDeleteFile;
import de.codecentric.reedelk.ftp.internal.ExceptionMapper;
import de.codecentric.reedelk.ftp.internal.FTPClientProvider;
import de.codecentric.reedelk.ftp.internal.attribute.FTPAttribute;
import de.codecentric.reedelk.ftp.internal.commons.Utils;
import de.codecentric.reedelk.ftp.internal.exception.FTPDeleteException;
import de.codecentric.reedelk.runtime.api.annotation.*;
import de.codecentric.reedelk.runtime.api.component.ProcessorSync;
import de.codecentric.reedelk.runtime.api.exception.PlatformException;
import de.codecentric.reedelk.runtime.api.flow.FlowContext;
import de.codecentric.reedelk.runtime.api.message.Message;
import de.codecentric.reedelk.runtime.api.message.MessageBuilder;
import de.codecentric.reedelk.runtime.api.script.ScriptEngineService;
import de.codecentric.reedelk.runtime.api.script.dynamicvalue.DynamicString;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ServiceScope;

import static com.reedelk.ftp.internal.commons.Messages.FTPDelete.ERROR_GENERIC;
import static com.reedelk.ftp.internal.commons.Messages.FTPDelete.PATH_EMPTY;
import static com.reedelk.ftp.internal.commons.Utils.joinPath;
import static com.reedelk.runtime.api.commons.DynamicValueUtils.isNullOrBlank;
import static de.codecentric.reedelk.ftp.internal.commons.Messages.FTPDelete.ERROR_GENERIC;
import static de.codecentric.reedelk.ftp.internal.commons.Messages.FTPDelete.PATH_EMPTY;
import static de.codecentric.reedelk.ftp.internal.commons.Utils.joinPath;
import static de.codecentric.reedelk.runtime.api.commons.DynamicValueUtils.isNullOrBlank;

@ModuleComponent("FTP Delete")
@ComponentOutput(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
package com.reedelk.ftp.component;

import com.reedelk.ftp.internal.CommandList;
import com.reedelk.ftp.internal.ExceptionMapper;
import com.reedelk.ftp.internal.FTPClientProvider;
import com.reedelk.ftp.internal.attribute.FTPAttribute;
import com.reedelk.ftp.internal.commons.Utils;
import com.reedelk.ftp.internal.exception.FTPListException;
import com.reedelk.ftp.internal.type.FTPFile;
import com.reedelk.ftp.internal.type.ListOfFTPFile;
import com.reedelk.runtime.api.annotation.*;
import com.reedelk.runtime.api.component.ProcessorSync;
import com.reedelk.runtime.api.converter.ConverterService;
import com.reedelk.runtime.api.exception.PlatformException;
import com.reedelk.runtime.api.flow.FlowContext;
import com.reedelk.runtime.api.message.Message;
import com.reedelk.runtime.api.message.MessageBuilder;
import com.reedelk.runtime.api.script.ScriptEngineService;
import com.reedelk.runtime.api.script.dynamicvalue.DynamicString;
package de.codecentric.reedelk.ftp.component;

import de.codecentric.reedelk.ftp.internal.CommandList;
import de.codecentric.reedelk.ftp.internal.ExceptionMapper;
import de.codecentric.reedelk.ftp.internal.FTPClientProvider;
import de.codecentric.reedelk.ftp.internal.attribute.FTPAttribute;
import de.codecentric.reedelk.ftp.internal.commons.Utils;
import de.codecentric.reedelk.ftp.internal.exception.FTPListException;
import de.codecentric.reedelk.ftp.internal.type.FTPFile;
import de.codecentric.reedelk.ftp.internal.type.ListOfFTPFile;
import de.codecentric.reedelk.runtime.api.annotation.*;
import de.codecentric.reedelk.runtime.api.component.ProcessorSync;
import de.codecentric.reedelk.runtime.api.converter.ConverterService;
import de.codecentric.reedelk.runtime.api.exception.PlatformException;
import de.codecentric.reedelk.runtime.api.flow.FlowContext;
import de.codecentric.reedelk.runtime.api.message.Message;
import de.codecentric.reedelk.runtime.api.message.MessageBuilder;
import de.codecentric.reedelk.runtime.api.script.ScriptEngineService;
import de.codecentric.reedelk.runtime.api.script.dynamicvalue.DynamicString;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ServiceScope;

import java.util.List;

import static com.reedelk.ftp.internal.commons.Messages.FTPList.ERROR_GENERIC;
import static com.reedelk.ftp.internal.commons.Messages.FTPList.PATH_EMPTY;
import static com.reedelk.runtime.api.commons.DynamicValueUtils.isNullOrBlank;
import static de.codecentric.reedelk.ftp.internal.commons.Messages.FTPList.ERROR_GENERIC;
import static de.codecentric.reedelk.ftp.internal.commons.Messages.FTPList.PATH_EMPTY;
import static de.codecentric.reedelk.runtime.api.commons.DynamicValueUtils.isNullOrBlank;

@ModuleComponent("FTP List Files")
@ComponentOutput(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
package com.reedelk.ftp.component;

import com.reedelk.ftp.internal.CommandRetrieve;
import com.reedelk.ftp.internal.ExceptionMapper;
import com.reedelk.ftp.internal.FTPClientProvider;
import com.reedelk.ftp.internal.attribute.FTPAttribute;
import com.reedelk.ftp.internal.commons.Utils;
import com.reedelk.ftp.internal.exception.FTPRetrieveException;
import com.reedelk.runtime.api.annotation.*;
import com.reedelk.runtime.api.commons.MimeTypeUtils;
import com.reedelk.runtime.api.component.ProcessorSync;
import com.reedelk.runtime.api.exception.PlatformException;
import com.reedelk.runtime.api.flow.FlowContext;
import com.reedelk.runtime.api.message.Message;
import com.reedelk.runtime.api.message.MessageBuilder;
import com.reedelk.runtime.api.message.content.MimeType;
import com.reedelk.runtime.api.message.content.StringContent;
import com.reedelk.runtime.api.message.content.TypedContent;
import com.reedelk.runtime.api.script.ScriptEngineService;
import com.reedelk.runtime.api.script.dynamicvalue.DynamicString;
package de.codecentric.reedelk.ftp.component;

import de.codecentric.reedelk.ftp.internal.CommandRetrieve;
import de.codecentric.reedelk.ftp.internal.ExceptionMapper;
import de.codecentric.reedelk.ftp.internal.FTPClientProvider;
import de.codecentric.reedelk.ftp.internal.attribute.FTPAttribute;
import de.codecentric.reedelk.ftp.internal.commons.Utils;
import de.codecentric.reedelk.ftp.internal.exception.FTPRetrieveException;
import de.codecentric.reedelk.runtime.api.annotation.*;
import de.codecentric.reedelk.runtime.api.commons.MimeTypeUtils;
import de.codecentric.reedelk.runtime.api.component.ProcessorSync;
import de.codecentric.reedelk.runtime.api.exception.PlatformException;
import de.codecentric.reedelk.runtime.api.flow.FlowContext;
import de.codecentric.reedelk.runtime.api.message.Message;
import de.codecentric.reedelk.runtime.api.message.MessageBuilder;
import de.codecentric.reedelk.runtime.api.message.content.MimeType;
import de.codecentric.reedelk.runtime.api.message.content.StringContent;
import de.codecentric.reedelk.runtime.api.message.content.TypedContent;
import de.codecentric.reedelk.runtime.api.script.ScriptEngineService;
import de.codecentric.reedelk.runtime.api.script.dynamicvalue.DynamicString;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ServiceScope;

import java.io.ByteArrayOutputStream;
import java.io.IOException;

import static com.reedelk.ftp.internal.commons.Messages.FTPRetrieve.*;
import static com.reedelk.runtime.api.commons.DynamicValueUtils.isNullOrBlank;
import static de.codecentric.reedelk.ftp.internal.commons.Messages.FTPRetrieve.*;
import static de.codecentric.reedelk.runtime.api.commons.DynamicValueUtils.isNullOrBlank;

@ModuleComponent("FTP Retrieve")
@ComponentOutput(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
package com.reedelk.ftp.component;

import com.reedelk.ftp.internal.CommandStore;
import com.reedelk.ftp.internal.ExceptionMapper;
import com.reedelk.ftp.internal.FTPClientProvider;
import com.reedelk.ftp.internal.attribute.FTPAttribute;
import com.reedelk.ftp.internal.commons.Utils;
import com.reedelk.ftp.internal.exception.FTPStoreException;
import com.reedelk.runtime.api.annotation.*;
import com.reedelk.runtime.api.component.ProcessorSync;
import com.reedelk.runtime.api.converter.ConverterService;
import com.reedelk.runtime.api.exception.PlatformException;
import com.reedelk.runtime.api.flow.FlowContext;
import com.reedelk.runtime.api.message.Message;
import com.reedelk.runtime.api.message.MessageBuilder;
import com.reedelk.runtime.api.script.ScriptEngineService;
import com.reedelk.runtime.api.script.dynamicvalue.DynamicByteArray;
import com.reedelk.runtime.api.script.dynamicvalue.DynamicString;
package de.codecentric.reedelk.ftp.component;

import de.codecentric.reedelk.ftp.internal.CommandStore;
import de.codecentric.reedelk.ftp.internal.ExceptionMapper;
import de.codecentric.reedelk.ftp.internal.FTPClientProvider;
import de.codecentric.reedelk.ftp.internal.attribute.FTPAttribute;
import de.codecentric.reedelk.ftp.internal.commons.Utils;
import de.codecentric.reedelk.ftp.internal.exception.FTPStoreException;
import de.codecentric.reedelk.runtime.api.annotation.*;
import de.codecentric.reedelk.runtime.api.component.ProcessorSync;
import de.codecentric.reedelk.runtime.api.converter.ConverterService;
import de.codecentric.reedelk.runtime.api.exception.PlatformException;
import de.codecentric.reedelk.runtime.api.flow.FlowContext;
import de.codecentric.reedelk.runtime.api.message.Message;
import de.codecentric.reedelk.runtime.api.message.MessageBuilder;
import de.codecentric.reedelk.runtime.api.script.ScriptEngineService;
import de.codecentric.reedelk.runtime.api.script.dynamicvalue.DynamicByteArray;
import de.codecentric.reedelk.runtime.api.script.dynamicvalue.DynamicString;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ServiceScope;

import java.io.ByteArrayInputStream;
import java.io.IOException;

import static com.reedelk.ftp.internal.commons.Messages.FTPStore.*;
import static com.reedelk.runtime.api.commons.DynamicValueUtils.isNullOrBlank;
import static de.codecentric.reedelk.ftp.internal.commons.Messages.FTPStore.*;
import static de.codecentric.reedelk.runtime.api.commons.DynamicValueUtils.isNullOrBlank;

@ModuleComponent("FTP Store")
@ComponentOutput(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reedelk.ftp.internal;
package de.codecentric.reedelk.ftp.internal;

import org.apache.commons.net.ftp.FTPClient;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.reedelk.ftp.internal;
package de.codecentric.reedelk.ftp.internal;

import org.apache.commons.net.ftp.FTPClient;

Expand Down
Loading

0 comments on commit b669b12

Please sign in to comment.