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

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
...@@ -4,3 +4,6 @@ ...@@ -4,3 +4,6 @@
*.iml *.iml
.classpath .classpath
/.settings /.settings
.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:
- build - build
...@@ -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
......
...@@ -2,4 +2,3 @@ ...@@ -2,4 +2,3 @@
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.
<!-- (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"> (c) https://github.com/MontiCore/monticore
The license generally applicable for this project
can be found under 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> <modelVersion>4.0.0</modelVersion>
<groupId>montisim</groupId> <groupId>montisim</groupId>
<artifactId>rmi-model-server</artifactId> <artifactId>rmi-model-server</artifactId>
<version>1.1.2</version> <version>1.1.3</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>rmi-model-server</name> <name>rmi-model-server</name>
<properties> <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 .................................................. --> <!-- .. 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>
...@@ -53,7 +63,12 @@ ...@@ -53,7 +63,12 @@
<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>
<groupId>montisim</groupId>
<artifactId>hardware_emulator</artifactId>
<version>${hardware_emulator.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
...@@ -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>
...@@ -185,31 +197,63 @@ ...@@ -185,31 +197,63 @@
</configuration> </configuration>
</plugin> </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>
</plugin>
</plugins> </plugins>
</build> </build>
<repositories>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>senexus</id>
<url>https://nexus.se.rwth-aachen.de/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>eclipse</id>
<url>https://repo.eclipse.org/content/groups/releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>jcenter</id>
<url>https://jcenter.bintray.com/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>topobyte</id>
<url>http://mvn.topobyte.de/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<!-- == DISTRIBUTION ==================================================== --> <!-- == DISTRIBUTION ==================================================== -->
<distributionManagement> <distributionManagement>
......
@rem (c) https://github.com/MontiCore/monticore
pushd %~dp0..
call mvn clean install -s "settings.xml"
cd target
ren "rmi-model-server-*-jar-with-dependencies.jar" "rmi-model-server.jar"
copy "rmi-model-server.jar" "..\install"
popd
#!/bin/bash
# (c) https://github.com/MontiCore/monticore
cd ..
mvn clean install -s settings.xml -DskipTests
cd target
cp rmi-model-server-*-jar-with-dependencies.jar ../install/rmi-model-server.jar
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- (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.
-->
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
...@@ -61,106 +68,7 @@ ...@@ -61,106 +68,7 @@
</profile> </profile>
<profile> <profile>