Commit 15ac1432 authored by Evgeny Kusmenko's avatar Evgeny Kusmenko
Browse files

Merge branch 'basic-simulator' into 'master'

Repackaging + Using new Hardware Emulator package

See merge request !9
parents 03c51cc4 efb812c1
Pipeline #177781 failed with stage
in 1 minute and 31 seconds
...@@ -3,4 +3,7 @@ ...@@ -3,4 +3,7 @@
.project .project
*.iml *.iml
.classpath .classpath
/.settings /.settings
\ No newline at end of file .vscode/
*.jar
*.dll
\ No newline at end of file
# (c) https://github.com/MontiCore/monticore #
# (c) https://github.com/MontiCore/monticore
#
# The license generally applicable for this project
# can be found under https://github.com/MontiCore/monticore.
# #
stages: stages:
...@@ -26,9 +30,19 @@ BranchJobLinux: ...@@ -26,9 +30,19 @@ BranchJobLinux:
stage: build stage: build
image: maven:3-jdk-8 image: maven:3-jdk-8
before_script: before_script:
- apt-get update - apt update
- apt-get install libxext6 - apt --assume-yes install libxext6
- apt --assume-yes install libxrender1
- apt --assume-yes install libxtst6
#- apt --assume-yes install realpath
- "JAWT_LIB=$(find / -name libjawt.so -print -quit)"
- "echo JAWT_LIB: $JAWT_LIB"
- "JAWT_FOLDER=$(dirname ${JAWT_LIB})"
- "echo JAWT_FOLDER: $JAWT_FOLDER"
- "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${JAWT_FOLDER}"
script: script:
- mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml - mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml
except: except:
- master - master
tags:
- se
# #
# (c) https://github.com/MontiCore/monticore
# #
# ****************************************************************************** # The license generally applicable for this project
# MontiCAR Modeling Family, www.se-rwth.de # can be found under https://github.com/MontiCore/monticore.
# Copyright (c) 2017, Software Engineering Group at RWTH Aachen,
# All rights reserved.
#
# This project is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3.0 of the License, or (at your option) any later version.
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this project. If not, see <http://www.gnu.org/licenses/>.
# *******************************************************************************
# #
FROM openjdk:8 FROM openjdk:8
......
#!/bin/bash #!/bin/bash
# (c) https://github.com/MontiCore/monticore #
# (c) https://github.com/MontiCore/monticore
#
# The license generally applicable for this project
# can be found under https://github.com/MontiCore/monticore.
#
rm rmi-model-server-*.jar rm rmi-model-server-*.jar
cp ../target/rmi-model-server-*-jar-with-dependencies.jar ./rmi-model-server.jar cp ../target/rmi-model-server-*-jar-with-dependencies.jar ./rmi-model-server.jar
......
% (c) https://github.com/MontiCore/monticore
%
% The license generally applicable for this project
% can be found under https://github.com/MontiCore/monticore.
\usepackage{graphicx} \usepackage{graphicx}
%\usepackage{ngerman} %\usepackage{ngerman}
......
@rem (c) https://github.com/MontiCore/monticore @REM
@REM (c) https://github.com/MontiCore/monticore
@REM
@REM The license generally applicable for this project
@REM can be found under https://github.com/MontiCore/monticore.
@REM
@echo off @echo off
set GENDIR=target\ set GENDIR=target\
......
@rem (c) https://github.com/MontiCore/monticore @REM
@REM (c) https://github.com/MontiCore/monticore
@REM
@REM The license generally applicable for this project
@REM can be found under https://github.com/MontiCore/monticore.
@REM
@REM Please replace this with the path to the Autopilot(s) @REM Please replace this with the path to the Autopilot(s)
set AUTOPILOT_FOLDER=autopilots set AUTOPILOT_FOLDER=autopilots
......
#!/bin/bash #!/bin/bash
# (c) https://github.com/MontiCore/monticore #
# (c) https://github.com/MontiCore/monticore
#
# The license generally applicable for this project
# can be found under https://github.com/MontiCore/monticore.
#
# Please replace this with the path to the Autopilot(s) # Please replace this with the path to the Autopilot(s)
AUTOPILOT_FOLDER=autopilots AUTOPILOT_FOLDER=autopilots
......
@rem (c) https://github.com/MontiCore/monticore @REM
@REM (c) https://github.com/MontiCore/monticore
@REM
@REM The license generally applicable for this project
@REM can be found under https://github.com/MontiCore/monticore.
@REM
@echo off @echo off
pushd .. pushd ..
......
@rem (c) https://github.com/MontiCore/monticore @REM
@REM (c) https://github.com/MontiCore/monticore
@REM
@REM The license generally applicable for this project
@REM can be found under https://github.com/MontiCore/monticore.
@REM
@echo off @echo off
pushd .. pushd ..
......
@rem (c) https://github.com/MontiCore/monticore @REM
@REM (c) https://github.com/MontiCore/monticore
@REM
@REM The license generally applicable for this project
@REM can be found under https://github.com/MontiCore/monticore.
@REM
@echo off @echo off
pushd .. pushd ..
......
@rem (c) https://github.com/MontiCore/monticore @REM
@REM (c) https://github.com/MontiCore/monticore
@REM
@REM The license generally applicable for this project
@REM can be found under https://github.com/MontiCore/monticore.
@REM
@echo off @echo off
pushd .. pushd ..
......
@rem (c) https://github.com/MontiCore/monticore @REM
@REM (c) https://github.com/MontiCore/monticore
@REM
@REM The license generally applicable for this project
@REM can be found under https://github.com/MontiCore/monticore.
@REM
@echo off @echo off
pushd .. pushd ..
......
@rem (c) https://github.com/MontiCore/monticore @REM
@REM (c) https://github.com/MontiCore/monticore
@REM
@REM The license generally applicable for this project
@REM can be found under https://github.com/MontiCore/monticore.
@REM
@echo off @echo off
call config.bat call config.bat
echo Starting RMIModelServer on port %PORT% with Autopilot folder: %AUTOPILOT_FOLDER% echo Starting RMIModelServer on port %PORT% with Autopilot folder: %AUTOPILOT_FOLDER%
java "-Djava.rmi.server.codebase=file:rmi-model-server.jar" "-Djava.rmi.server.hostname=localhost" -cp rmi-model-server.jar rwth.rmi.model.server.RMIServer %PORT% %AUTOPILOT_FOLDER% --no-zookeeper %* @REM java "-Djava.rmi.server.codebase=file:rmi-model-server.jar" "-Djava.rmi.server.hostname=localhost" -cp rmi-model-server.jar rwth.rmi.model.server.RMIServer %PORT% %AUTOPILOT_FOLDER% --no-zookeeper %*
java -jar rmi-model-server.jar port=%PORT% autopilots_folder=%AUTOPILOT_FOLDER% no-zookeeper default_config %*
pause pause
#!/bin/bash #!/bin/bash
# (c) https://github.com/MontiCore/monticore #
# (c) https://github.com/MontiCore/monticore
#
# The license generally applicable for this project
# can be found under https://github.com/MontiCore/monticore.
#
source ./config.sh source ./config.sh
echo "Starting RMIModelServer on port $PORT with Autopilot folder: $AUTOPILOT_FOLDER" echo "Starting RMIModelServer on port $PORT with Autopilot folder: $AUTOPILOT_FOLDER"
java "-Djava.rmi.server.codebase=file:rmi-model-server.jar" "-Djava.rmi.server.hostname=localhost" -cp rmi-model-server.jar rwth.rmi.model.server.RMIServer $PORT $AUTOPILOT_FOLDER --no-zookeeper os=linux no_time # java "-Djava.rmi.server.codebase=file:rmi-model-server.jar" "-Djava.rmi.server.hostname=localhost" -cp rmi-model-server.jar rwth.rmi.model.server.RMIServer $PORT $AUTOPILOT_FOLDER --no-zookeeper os=linux no_time
java "-Djava.rmi.server.hostname=localhost" -jar rmi-model-server.jar port=$PORT autopilots_folder=$AUTOPILOT_FOLDER no-zookeeper default_config os=linux no_time
\ No newline at end of file
@rem (c) https://github.com/MontiCore/monticore @REM
@REM (c) https://github.com/MontiCore/monticore
@REM
@REM The license generally applicable for this project
@REM can be found under https://github.com/MontiCore/monticore.
@REM
@echo off @echo off
call config.bat call config.bat
......
#!/usr/bin/env bash #!/usr/bin/env bash
# (c) https://github.com/MontiCore/monticore #
# (c) https://github.com/MontiCore/monticore
#
# The license generally applicable for this project
# can be found under https://github.com/MontiCore/monticore.
#
if [ -z "$1" ]; then if [ -z "$1" ]; then
PORT=10101 PORT=10101
......
(c) https://github.com/MontiCore/monticore (c) https://github.com/MontiCore/monticore
The license generally applicable for this project The license generally applicable for this project
can be found under https://github.com/MontiCore/monticore. can be found under https://github.com/MontiCore/monticore.
\ No newline at end of file
<!-- (c) https://github.com/MontiCore/monticore --> <!--
<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>montisim</groupId> (c) https://github.com/MontiCore/monticore
<artifactId>rmi-model-server</artifactId>
<version>1.1.2</version>
<packaging>jar</packaging>
<name>rmi-model-server</name> The license generally applicable for this project
can be found under https://github.com/MontiCore/monticore.
<properties> -->
<!-- .. SE-Libraries .................................................. --> <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>montisim</groupId>
<artifactId>rmi-model-server</artifactId>
<version>1.1.3</version>
<packaging>jar</packaging>
<name>rmi-model-server</name>
<properties>
<!-- USE THESE TO SET THE VERSIONS OF THE DEPENDENCIES FOR ALL THE SUB-PROJECTS -->
<commons.version>1.0.9</commons.version>
<hardware_emulator.version>1.0.0</hardware_emulator.version>
<!-- .. SE-Libraries .................................................. -->
<monticore.version>4.5.4.08.11.2017</monticore.version> <monticore.version>4.5.4.08.11.2017</monticore.version>
<se-commons.version>1.7.7</se-commons.version> <se-commons.version>1.7.7</se-commons.version>
<mc.grammars.assembly.version>0.0.8</mc.grammars.assembly.version> <mc.grammars.assembly.version>0.0.8</mc.grammars.assembly.version>
<SIUnit.version>0.0.10-SNAPSHOT</SIUnit.version> <SIUnit.version>0.0.10-SNAPSHOT</SIUnit.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<!-- .. Plugins ....................................................... --> <!-- .. Plugins ....................................................... -->
<monticore.plugin>4.5.3.1</monticore.plugin> <monticore.plugin>4.5.3.1</monticore.plugin>
<assembly.plugin>2.5.4</assembly.plugin> <assembly.plugin>2.5.4</assembly.plugin>
<compiler.plugin>3.3</compiler.plugin> <compiler.plugin>3.3</compiler.plugin>
<source.plugin>2.4</source.plugin> <source.plugin>2.4</source.plugin>
<!-- .. Misc .......................................................... --> <!-- .. Misc .......................................................... -->
<java.version>1.8</java.version> <java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties> </properties>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12</version> <version>4.12</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.zookeeper</groupId> <groupId>org.apache.zookeeper</groupId>
<artifactId>zookeeper</artifactId> <artifactId>zookeeper</artifactId>
<version>3.4.6</version> <version>3.4.6</version>
<type>pom</type> <type>pom</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.101tec</groupId> <groupId>com.101tec</groupId>
<artifactId>zkclient</artifactId> <artifactId>zkclient</artifactId>
<version>0.2</version> <version>0.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>montisim</groupId> <groupId>montisim</groupId>
<artifactId>commons</artifactId> <artifactId>commons</artifactId>
<version>1.0.7</version> <version>${commons.version}</version>
</dependency> </dependency>
</dependencies> <dependency>
<groupId>montisim</groupId>
<!-- == PROJECT BUILD SETTINGS =========================================== --> <artifactId>hardware_emulator</artifactId>
<version>${hardware_emulator.version}</version>
</dependency>
</dependencies>
<!-- == PROJECT BUILD SETTINGS =========================================== -->
<build> <build>
<plugins> <plugins>
...@@ -66,38 +81,19 @@ ...@@ -66,38 +81,19 @@
<version>2.8.1</version> <version>2.8.1</version>
</plugin> </plugin>
<!-- MontiCore Generation --> <!-- Run the tests where the test/resources are located -->
<plugin> <plugin>
<groupId>de.monticore.mojo</groupId> <artifactId>maven-surefire-plugin</artifactId>
<artifactId>monticore-maven-plugin</artifactId> <version>3.0.0-M3</version>
<version>${monticore.plugin}</version>
<configuration> <configuration>
<skip>false</skip> <workingDirectory>${project.basedir}/install</workingDirectory>
<script>de/monticore/monticore_noemf.groovy</script> <forkCount>1</forkCount>
<reuseForks>true</reuseForks>
<argLine>-Xmx2048m -XX:MaxPermSize=1024m</argLine>
</configuration> </configuration>
<dependencies>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4</artifactId>
<version>4.7.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.antlr/antlr4-runtime -->
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.7.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
</plugin> </plugin>
<!-- Other Configuration --> <!-- Compiler plugin -->
<plugin> <plugin>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.plugin}</version> <version>${compiler.plugin}</version>
...@@ -108,6 +104,30 @@ ...@@ -108,6 +104,30 @@
</configuration> </configuration>
</plugin> </plugin>
<!-- Shade plugin: Create jar in install folder -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.1.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>true</minimizeJar>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>de.rwth.monticore.EmbeddedMontiArc.simulators.rmimodelserver.RMIServer</mainClass>
</transformer>
</transformers>
<outputFile>${project.basedir}/install/${project.name}.jar</outputFile>
</configuration>
</execution>
</executions>
</plugin>
<!-- Source Jar Configuration --> <!-- Source Jar Configuration -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
...@@ -130,22 +150,22 @@ ...@@ -130,22 +150,22 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!-- to add copyright information automatically--> <!-- to add copyright information automatically-->
<plugin> <plugin>
<groupId>com.mycila</groupId> <groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId> <artifactId>license-maven-plugin</artifactId>
<version>3.0</version> <version>3.0</version>
<configuration> <configuration>
<header>${project.baseUri}/src/license/se/license.txt</header> <header>${project.baseUri}/license/se/license.txt</header>
<properties> <properties>
<owner>Michael von Wenckstern</owner> <owner>Michael von Wenckstern</owner>
<email>vonwenckstern@se-rwth.de</email> <email>vonwenckstern@se-rwth.de</email>
</properties> </properties>
<excludes> <excludes>
<exclude>**/README</exclude>
<exclude>src/test/resources/**</exclude> <exclude>src/test/resources/**</exclude>
<exclude>src/main/resources/**</exclude> <exclude>src/main/resources/**</exclude>
<exclude>src/license/**</exclude> <exclude>license/se/license.txt</exclude>
</excludes> </excludes>
</configuration> </configuration>
<executions> <executions>
...@@ -157,22 +177,14 @@ ...@@ -157,22 +177,14 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<workingDirectory>${project.basedir}/install</workingDirectory>
<argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true</argLine>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.eluder.coveralls</groupId> <groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId> <artifactId>coveralls-maven-plugin</artifactId>
<version>4.3.0</version> <version>4.3.0</version>
<configuration> <configuration></configuration>
</configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId> <artifactId>cobertura-maven-plugin</artifactId>
...@@ -182,46 +194,78 @@ ...@@ -182,46 +194,78 @@
<maxmem>256m</maxmem> <maxmem>256m</maxmem>
<!-- aggregated reports for multi-module projects --> <!-- aggregated reports for multi-module projects -->
<aggregate>true</aggregate> <aggregate>true</aggregate>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<mainClass>server.rpc.RpcServer</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<!-- == DISTRIBUTION ==================================================== --> <repositories>