Skip to content

Commit

Permalink
preparations for 00.08.01-RPM
Browse files Browse the repository at this point in the history
  • Loading branch information
svenruppert committed Jul 28, 2019
1 parent e9e2ab3 commit ab1c196
Show file tree
Hide file tree
Showing 15 changed files with 467 additions and 92 deletions.
35 changes: 35 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# Copyright © 2018 Sven Ruppert ([email protected])
#
# 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 [email protected]

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"]
32 changes: 32 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
#
# Copyright © 2018 Sven Ruppert ([email protected])
#
# 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
19 changes: 19 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
#
# Copyright © 2018 Sven Ruppert ([email protected])
#
# 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
33 changes: 33 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Copyright © 2018 Sven Ruppert ([email protected])
#
# 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 '
25 changes: 25 additions & 0 deletions docker_compile_locale.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash
#
# Copyright © 2018 Sven Ruppert ([email protected])
#
# 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
38 changes: 38 additions & 0 deletions docker_run_locale.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
#
# Copyright © 2018 Sven Ruppert ([email protected])
#
# 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"
70 changes: 35 additions & 35 deletions fluent-api-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.rapidpm.vaadin</groupId>
<artifactId>fluent-api-for-flow</artifactId>
<version>00.08.01-RPM-SNAPSHOT</version>
<version>00.08.01-RPM</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -38,41 +38,41 @@
<build>
<plugins>
<!--For Vaadin Directory deployment-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<index>true</index>
<manifest>
<addClasspath>false</addClasspath>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Vaadin-Package-Version>${Vaadin-Package-Version}</Vaadin-Package-Version>
</manifestEntries>
</archive>
</configuration>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-jar-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <archive>-->
<!-- <index>true</index>-->
<!-- <manifest>-->
<!-- <addClasspath>false</addClasspath>-->
<!-- <addDefaultImplementationEntries>true</addDefaultImplementationEntries>-->
<!-- </manifest>-->
<!-- <manifestEntries>-->
<!-- <Vaadin-Package-Version>${Vaadin-Package-Version}</Vaadin-Package-Version>-->
<!-- </manifestEntries>-->
<!-- </archive>-->
<!-- </configuration>-->
<!-- </plugin>-->

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<goals>
<goal>single</goal>
</goals>
<phase>install</phase>
</execution>
</executions>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-assembly-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <appendAssemblyId>false</appendAssemblyId>-->
<!-- <descriptors>-->
<!-- <descriptor>assembly/assembly.xml</descriptor>-->
<!-- </descriptors>-->
<!-- </configuration>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <goals>-->
<!-- <goal>single</goal>-->
<!-- </goals>-->
<!-- <phase>install</phase>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
import com.vaadin.flow.component.CompositionUpdateEvent;
import com.vaadin.flow.shared.Registration;

public interface CompositionNotifierMixin<R extends CompositionNotifierMixin, T extends CompositionNotifier>
public interface CompositionNotifierMixin<R extends CompositionNotifierMixin,
T extends CompositionNotifier>
extends NeutralMixin<R, T> {

default R addCompositionStartListener(ComponentEventListener<CompositionStartEvent> listener) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* Copyright © 2018 Sven Ruppert ([email protected])
*
* 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<R extends GridSortOrderMixin,
T extends GridSortOrder>
extends SortOrderMixin<R, T> {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/**
* Copyright © 2018 Sven Ruppert ([email protected])
*
* 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<R extends HasDataGeneratorsMixin,
T extends HasDataGenerators>
extends NeutralMixin<R, T> {

default R addDataGenerator(DataGenerator dataGenerator ,
Consumer<Registration> registrationConsumer) {
component()
.map(component -> component.addDataGenerator(dataGenerator))
.ifPresent(registrationConsumer);
return (R) this;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* Copyright © 2018 Sven Ruppert ([email protected])
*
* 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<R extends HasThemeMixin,
T extends HasTheme>
extends HasElementMixin<R, T> {

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));
}
}
Loading

0 comments on commit ab1c196

Please sign in to comment.