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 @@
*.iml
.classpath
/.settings
.vscode/
*.jar
*.dll
\ No newline at end of file
#
# (c) https://github.com/MontiCore/monticore
#
# The license generally applicable for this project
# can be found under https://github.com/MontiCore/monticore.
#
stages:
- build
......@@ -26,9 +30,19 @@ BranchJobLinux:
stage: build
image: maven:3-jdk-8
before_script:
- apt-get update
- apt-get install libxext6
- apt update
- 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:
- mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -B clean install --settings settings.xml
except:
- master
tags:
- se
#
# (c) https://github.com/MontiCore/monticore
#
# ******************************************************************************
# MontiCAR Modeling Family, www.se-rwth.de
# 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/>.
# *******************************************************************************
# The license generally applicable for this project
# can be found under https://github.com/MontiCore/monticore.
#
FROM openjdk:8
......
#!/bin/bash
#
# (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
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{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
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)
set AUTOPILOT_FOLDER=autopilots
......
#!/bin/bash
#
# (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)
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
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
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
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
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
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
call config.bat
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
#!/bin/bash
#
# (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
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
call config.bat
......
#!/usr/bin/env bash
#
# (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
PORT=10101
......
......@@ -2,4 +2,3 @@
The license generally applicable for this project
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">
<!--
(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>
<groupId>montisim</groupId>
<artifactId>rmi-model-server</artifactId>
<version>1.1.2</version>
<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>
<se-commons.version>1.7.7</se-commons.version>
......@@ -53,7 +63,12 @@
<dependency>
<groupId>montisim</groupId>
<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>
</dependencies>
......@@ -66,38 +81,19 @@
<version>2.8.1</version>
</plugin>
<!-- MontiCore Generation -->
<!-- Run the tests where the test/resources are located -->
<plugin>
<groupId>de.monticore.mojo</groupId>
<artifactId>monticore-maven-plugin</artifactId>
<version>${monticore.plugin}</version>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<skip>false</skip>
<script>de/monticore/monticore_noemf.groovy</script>
<workingDirectory>${project.basedir}/install</workingDirectory>
<forkCount>1</forkCount>
<reuseForks>true</reuseForks>
<argLine>-Xmx2048m -XX:MaxPermSize=1024m</argLine>
</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>
<!-- Other Configuration -->
<!-- Compiler plugin -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.plugin}</version>
......@@ -108,6 +104,30 @@
</configuration>
</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 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......@@ -130,22 +150,22 @@
</execution>
</executions>
</plugin>
<!-- to add copyright information automatically-->
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
<configuration>
<header>${project.baseUri}/src/license/se/license.txt</header>
<header>${project.baseUri}/license/se/license.txt</header>
<properties>
<owner>Michael von Wenckstern</owner>
<email>vonwenckstern@se-rwth.de</email>
</properties>
<excludes>
<exclude>**/README</exclude>
<exclude>src/test/resources/**</exclude>
<exclude>src/main/resources/**</exclude>
<exclude>src/license/**</exclude>
<exclude>license/se/license.txt</exclude>
</excludes>
</configuration>
<executions>
......@@ -157,22 +177,14 @@
</execution>
</executions>
</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>
<groupId>org.eluder.coveralls</groupId>
<artifactId>coveralls-maven-plugin</artifactId>
<version>4.3.0</version>
<configuration>
</configuration>
<configuration></configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
......@@ -185,31 +197,63 @@
</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>
</plugin>
</plugins>
</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 ==================================================== -->
<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"?>
<!-- (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"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
......@@ -61,106 +68,7 @@
</profile>
<profile>
<id>se-nexus</id>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled /></releases>
<snapshots><enabled /></snapshots>
</repository>
<repository>
<id>central</id>
<url>https://repo1.maven.org/maven2</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>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled /></releases>
<snapshots><enabled /></snapshots>
</pluginRepository>
<pluginRepository>
<id>central</id>
<url>https://repo1.maven.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>eclipse</id>
<url>https://repo.eclipse.org/content/groups/releases/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>jcenter</id>
<url>https://jcenter.bintray.com/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>topobyte</id>
<url>http://mvn.topobyte.de/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
......
/* (c) https://github.com/MontiCore/monticore */
package rwth.rmi.model.server;
/**
* (c) https://github.com/MontiCore/monticore
*
* The license generally applicable for this project
* can be found under https://github.com/MontiCore/monticore.
*/
package de.rwth.monticore.EmbeddedMontiArc.simulators.rmimodelserver;
import org.I0Itec.zkclient.ZkClient;
import simulator.integration.HardwareEmulatorInterface;
import de.rwth.monticore.EmbeddedMontiArc.simulators.hardware_emulator.HardwareEmulatorInterface;
import java.io.File;
import java.io.IOException;
......