diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..50fca1a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +# +# Copyright © 2018 Sven Ruppert (sven.ruppert@gmail.com) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM svenruppert/maven-3.6.1-openjdk:1.11.0-2 +MAINTAINER sven.ruppert@gmail.com + +ARG USER_HOME_DIR="/root" + +#RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \ +#RUN curl -sL https://deb.nodesource.com/setup_11.x | bash - \ +RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \ + && apt-get install -y nodejs + +WORKDIR /build +#do not delete it, it is like a reference +COPY pom.xml . +RUN mvn dependency:go-offline + +ENV MAVEN_HOME /usr/share/maven +ENV MAVEN_CONFIG "$USER_HOME_DIR/.m2" + +CMD ["mvn"] \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..af49cee --- /dev/null +++ b/build.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# +# Copyright © 2018 Sven Ruppert (sven.ruppert@gmail.com) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +function docker_tag_exists() { + EXISTS=$(curl -s https://hub.docker.com/v2/repositories/$1/tags/?page_size=10000 | jq -r "[.results | .[] | .name == \"$2\"] | any") + test $EXISTS = true +} + +if docker_tag_exists working/vaadin-v14-prepared 20190628-001; then + echo skip building, image already existing - working/vaadin-v14-prepared 20190628-001 +else + echo start building the images + docker build -t working/vaadin-v14-prepared . +# docker tag working/vaadin-v14-prepared:latest working/vaadin-v14-prepared:20190628-001 +# docker push working/vaadin-v14-prepared:20190628-001 +fi + +#svenruppert/maven-3.6.1-openjdk:1.11.0-2 \ No newline at end of file diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..fe425ef --- /dev/null +++ b/deploy.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# +# Copyright © 2018 Sven Ruppert (sven.ruppert@gmail.com) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +docker rm deploy +docker-compose up diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f7fd401 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,33 @@ +# +# Copyright © 2018 Sven Ruppert (sven.ruppert@gmail.com) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +version: '3.5' + +services: + deploy: + image: svenruppert/maven-3.6.1-adopt:1.8.212-04 + container_name: deploy + hostname: deploy + volumes: + - /var/run/docker.sock:/tmp/docker.sock:ro + - $PWD/:/usr/src/mymaven + - ~/.m2/settings.xml:/root/.m2/settings.xml + - ~/.gnupg/:/root/.gnupg/ + working_dir: /usr/src/mymaven + # command: 'mvn help:active-profiles + command: 'mvn license:format clean deploy + -P_release + -Dmaven.test.skip=true ' \ No newline at end of file diff --git a/docker_compile_locale.sh b/docker_compile_locale.sh new file mode 100755 index 0000000..882ed79 --- /dev/null +++ b/docker_compile_locale.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# +# Copyright © 2018 Sven Ruppert (sven.ruppert@gmail.com) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +docker run \ + --rm \ + --name compile \ + -v "$(pwd)":/usr/src/mymaven \ + -w /usr/src/mymaven \ + svenruppert/maven-3.6.1-adopt:1.8.212-04 \ + mvn clean install diff --git a/docker_run_locale.sh b/docker_run_locale.sh new file mode 100644 index 0000000..0bbe04f --- /dev/null +++ b/docker_run_locale.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Copyright © 2018 Sven Ruppert (sven.ruppert@gmail.com) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +docker run \ + -it \ + -p 8899:8899 \ + --rm \ + --name run \ + -v "$(pwd)":/usr/src/mymaven \ + -w /usr/src/mymaven \ + working/vaadin-v14-prepared:latest \ + java -jar target/vaadin-app.jar + +#docker run -it \ +# -p 8080:8080 \ +# -p 5005:5005 \ +# --rm \ +# --name run \ +# -v "$(pwd)":/usr/src/mymaven \ +# -w /usr/src/mymaven \ +# svenruppert/maven-3.5-jdk-oracle-08 \ +# mvn meecrowave:bake \ +# -DargLine="-Xmx256m -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" \ No newline at end of file diff --git a/fluent-api-impl/pom.xml b/fluent-api-impl/pom.xml index a541eac..95ca75e 100644 --- a/fluent-api-impl/pom.xml +++ b/fluent-api-impl/pom.xml @@ -22,7 +22,7 @@ org.rapidpm.vaadin fluent-api-for-flow - 00.08.01-RPM-SNAPSHOT + 00.08.01-RPM 4.0.0 @@ -38,41 +38,41 @@ - - org.apache.maven.plugins - maven-jar-plugin - - - true - - false - true - - - ${Vaadin-Package-Version} - - - - + + + + + + + + + + + + + + + + - - org.apache.maven.plugins - maven-assembly-plugin - - false - - assembly/assembly.xml - - - - - - single - - install - - - + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/CompositionNotifierMixin.java b/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/CompositionNotifierMixin.java index 3d90f8d..c9330e5 100644 --- a/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/CompositionNotifierMixin.java +++ b/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/CompositionNotifierMixin.java @@ -24,7 +24,8 @@ import com.vaadin.flow.component.CompositionUpdateEvent; import com.vaadin.flow.shared.Registration; -public interface CompositionNotifierMixin +public interface CompositionNotifierMixin extends NeutralMixin { default R addCompositionStartListener(ComponentEventListener listener) { diff --git a/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/GridSortOrderMixin.java b/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/GridSortOrderMixin.java new file mode 100644 index 0000000..cd02b76 --- /dev/null +++ b/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/GridSortOrderMixin.java @@ -0,0 +1,23 @@ +/** + * Copyright © 2018 Sven Ruppert (sven.ruppert@gmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.rapidpm.vaadin.api.fluent.builder.api; + +import com.vaadin.flow.component.grid.GridSortOrder; + +public interface GridSortOrderMixin + extends SortOrderMixin { +} diff --git a/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/HasDataGeneratorsMixin.java b/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/HasDataGeneratorsMixin.java new file mode 100644 index 0000000..5f3a48c --- /dev/null +++ b/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/HasDataGeneratorsMixin.java @@ -0,0 +1,35 @@ +/** + * Copyright © 2018 Sven Ruppert (sven.ruppert@gmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.rapidpm.vaadin.api.fluent.builder.api; + +import java.util.function.Consumer; + +import com.vaadin.flow.data.provider.DataGenerator; +import com.vaadin.flow.data.provider.HasDataGenerators; +import com.vaadin.flow.shared.Registration; + +public interface HasDataGeneratorsMixin + extends NeutralMixin { + + default R addDataGenerator(DataGenerator dataGenerator , + Consumer registrationConsumer) { + component() + .map(component -> component.addDataGenerator(dataGenerator)) + .ifPresent(registrationConsumer); + return (R) this; + } +} diff --git a/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/HasThemeMixin.java b/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/HasThemeMixin.java new file mode 100644 index 0000000..d6f861a --- /dev/null +++ b/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/HasThemeMixin.java @@ -0,0 +1,48 @@ +/** + * Copyright © 2018 Sven Ruppert (sven.ruppert@gmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.rapidpm.vaadin.api.fluent.builder.api; + +import com.vaadin.flow.component.HasTheme; + +public interface HasThemeMixin + extends HasElementMixin { + + default HasThemeMixin addThemeName(String themeName) { + return invoke(component -> component.addThemeName(themeName)); + } + + default HasThemeMixin removeThemeName(String themeName) { + return invoke(component -> component.removeThemeName(themeName)); + } + + default HasThemeMixin setThemeName(String themeName) { + return invoke(component -> component.setThemeName(themeName)); + } + + + default HasThemeMixin setThemeName(String themeName , boolean set) { + return invoke(compoment -> compoment.setThemeName(themeName , set)); + } + + default HasThemeMixin addThemeNames(String... themeNames) { + return invoke(component -> component.addThemeNames(themeNames)); + } + + default HasThemeMixin removeThemeNames(String... themeNames) { + return invoke(component -> component.removeThemeNames(themeNames)); + } +} diff --git a/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/SortNotifierMixin.java b/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/SortNotifierMixin.java new file mode 100644 index 0000000..76ff582 --- /dev/null +++ b/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/SortNotifierMixin.java @@ -0,0 +1,48 @@ +/** + * Copyright © 2018 Sven Ruppert (sven.ruppert@gmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.rapidpm.vaadin.api.fluent.builder.api; + +import java.util.function.Consumer; + +import com.vaadin.flow.component.Component; +import com.vaadin.flow.component.ComponentEventListener; +import com.vaadin.flow.data.event.SortEvent; +import com.vaadin.flow.data.provider.SortOrder; +import com.vaadin.flow.shared.Registration; + +public interface SortNotifierMixin, + C extends Component, + S extends SortOrder> + extends NeutralMixin { + + + default R addSortListener(ComponentEventListener> listener) { + component() + .map(component -> component.addSortListener(listener)); + return (R) this; + } + + + default R addSortListener(ComponentEventListener> listener , + Consumer registrationConsumer) { + + component() + .map(component -> component.addSortListener(listener)) + .ifPresent(registrationConsumer); + return (R) this; + } +} diff --git a/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/SortOrderMixin.java b/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/SortOrderMixin.java new file mode 100644 index 0000000..23a1939 --- /dev/null +++ b/fluent-api-impl/src/main/java/org/rapidpm/vaadin/api/fluent/builder/api/SortOrderMixin.java @@ -0,0 +1,27 @@ +/** + * Copyright © 2018 Sven Ruppert (sven.ruppert@gmail.com) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.rapidpm.vaadin.api.fluent.builder.api; + +import com.vaadin.flow.data.provider.SortOrder; + +public interface SortOrderMixin + extends NeutralMixin { + + + + +} diff --git a/fluent-api-test/pom.xml b/fluent-api-test/pom.xml index 442db7f..4fc440a 100644 --- a/fluent-api-test/pom.xml +++ b/fluent-api-test/pom.xml @@ -22,7 +22,7 @@ org.rapidpm.vaadin fluent-api-for-flow - 00.08.01-RPM-SNAPSHOT + 00.08.01-RPM 4.0.0 @@ -32,18 +32,47 @@ true + + + + + org.apache.meecrowave + meecrowave-core + ${meecrowave.version} + test + + + org.apache.meecrowave + meecrowave-specs-api + ${meecrowave.version} + test + + + + org.rapidpm.vaadin fluent-api-for-flow-impl - 00.08.01-RPM-SNAPSHOT + 00.08.01-RPM - com.github.vaadin-developer.id-generator-for-flow - id-generator-for-flow-impl - e61bd2a2 + org.rapidpm.vaadin + id-generator-for-flow + 00.09.02-RPM + + + org.apache.meecrowave + meecrowave-core + test + + + org.apache.meecrowave + meecrowave-specs-api + test + diff --git a/pom.xml b/pom.xml index 4c6cf3c..96f2d8e 100644 --- a/pom.xml +++ b/pom.xml @@ -24,14 +24,14 @@ org.rapidpm - rapidpm-dependencies - 04.00.16-RPM + rapidpm-vaadin-dependencies-v14 + 04.01.05-RPM org.rapidpm.vaadin fluent-api-for-flow Fluent API for Flow - 00.08.01-RPM-SNAPSHOT + 00.08.01-RPM pom @@ -83,50 +83,20 @@ - - - 8 - 8 - - UTF-8 - UTF-8 - - 13.0.3 + 1.8 1.2.7 - - - vaadin-addons - http://maven.vaadin.com/vaadin-addons - - - - - com.vaadin vaadin-bom - ${vaadin.version} + ${vaadin-v14.version} pom import - - - org.apache.meecrowave - meecrowave-core - ${meecrowave.version} - test - - - org.apache.meecrowave - meecrowave-specs-api - ${meecrowave.version} - test - @@ -159,24 +129,36 @@ com.vaadin + vaadin + + + + com.vaadin.webjar + * + + + org.webjars.bowergithub.insites + * + + + org.webjars.bowergithub.polymer + * + + + org.webjars.bowergithub.polymerelements + * + + + org.webjars.bowergithub.vaadin + * + + + org.webjars.bowergithub.webcomponents + * + + - - com.vaadin - vaadin-lumo-theme - - - - - org.apache.meecrowave - meecrowave-core - test - - - org.apache.meecrowave - meecrowave-specs-api - test - \ No newline at end of file