Files
2025-06-06 09:15:13 +02:00

307 lines
12 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.itac.interface</groupId>
<artifactId>imsinterfaces-asm-oib-suite</artifactId>
<packaging>pom</packaging>
<name>imsinterfaces-asm-oib-suite</name>
<version>${mes.interface.version}</version>
<parent>
<groupId>com.itac.interface</groupId>
<artifactId>data-interface-asm</artifactId>
<version>${mes.interface.version}</version>
</parent>
<properties>
<projectname>${job.name}</projectname>
<artes.lib.name>artes-dotnet.dll</artes.lib.name>
<dotnet.build.dir>${dotnet.build.basedir}/${project.artifactId}/${user.name}/${projectname}</dotnet.build.dir>
<!-- properties aus main POM: <asm.oib.version> -->
<timestamp>${maven.build.timestamp}</timestamp>
</properties>
<!--
build process description
The build of the native parts consists of a few steps.
1. Download artifacts (asmClient, oibClient (3.x and 5.x), log4Net, artes.dotnet) and unzip them to a local folder...
2. Copy all sources to a local folder (keep folder structure, including visual studio project and solution files) using sources.xml descriptor
3. filter resources ( = putting build parameters into project)
4. zip local build folder and transport via ssh to build machine
5. call msbuild
6. retrieve all built artifacts
-->
<dependencies>
<dependency>
<groupId>com.itac.product</groupId>
<artifactId>artes-dotnet</artifactId>
<classifier>net4</classifier>
<type>zip</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.itac.interface.asm5x</groupId>
<artifactId>asm-dotnet-api5x</artifactId>
<classifier>windows</classifier>
<type>zip</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>asm.as.oib</groupId>
<artifactId>asmclient</artifactId>
<type>zip</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4net</groupId>
<artifactId>log4net</artifactId>
<type>dll</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>asm.as.oib</groupId>
<artifactId>oibclient</artifactId>
<type>zip</type>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>copy-resources3</id>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/itacLib</outputDirectory>
<resources>
<resource>
<directory>${project.basedir}/lib</directory>
<filtering>false</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dotnet-dependencies2</id>
<phase>initialize</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>log4net</groupId>
<artifactId>log4net</artifactId>
<type>dll</type>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/libs/itac</outputDirectory>
<destFileName>log4net.dll</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>copy-dotnet-dependencies</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<!-- oib-version independent libs-->
<artifactItem>
<groupId>com.itac.product</groupId>
<artifactId>artes-dotnet</artifactId>
<type>zip</type>
<classifier>net4</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/libs/itac</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>com.itac.interface.asm5x</groupId>
<artifactId>asm-dotnet-api5x</artifactId>
<classifier>windows</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/libs/itac</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>com.itac.addons</groupId>
<artifactId>imsapi-dotnet</artifactId>
<classifier>net4</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/libs/itac</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>asm.as.oib</groupId>
<artifactId>asm5client</artifactId>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/libs/asm5client</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>asm.as.oib</groupId>
<artifactId>asmclient</artifactId>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/libs/asm3client</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>asm.as.oib</groupId>
<artifactId>oibclient</artifactId>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/libs/oib3</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>asm.as.oib</groupId>
<artifactId>oib5client</artifactId>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/libs/oib5</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>create-project-bundle</id>
<phase>process-resources</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>dotnet</finalName>
<descriptor>${project.basedir}/src/main/assembly/sources.xml</descriptor>
</configuration>
</execution>
<!--zusammenpacken des Ergebnisses in ein einziges zip; da ist das gesamte Projekt drin-->
<execution>
<id>pack-bundle</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${project.basedir}/src/main/assembly/descriptor.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.itac.tools</groupId>
<artifactId>ssh-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>ssh</goal>
</goals>
</execution>
</executions>
<configuration>
<parallel>true</parallel>
<remoteHosts>
<RemoteHost>
<host>${dotnet.build.host}</host>
<user>${dotnet.build.user}</user>
<password>${dotnet.build.pw}</password>
<commands>
<ExecuteCommand>
<order>1</order>
<arg>cd ${dotnet.build.basedir};
rm -rf ${project.artifactId}/${user.name}/${projectname};
mkdir ${project.artifactId};
cd ${project.artifactId};
mkdir ${user.name};
cd ${user.name};
mkdir ${projectname};
cd ${projectname};
</arg>
</ExecuteCommand>
<PutCommand>
<order>2</order>
<remoteDirectory>${dotnet.build.dir}/</remoteDirectory>
<localFiles>
<param>${project.basedir}/target/dotnet-sources.zip</param>
</localFiles>
</PutCommand>
<!-- Entpacken des Source-Folders auf der Windows-Build-Maschine -->
<ExecuteCommand>
<order>10</order>
<arg>cd ${dotnet.build.dir} &amp;&amp;unzip -q dotnet-sources.zip;
</arg>
</ExecuteCommand>
<!-- starten des msBuild-Vorgangs -->
<ExecuteCommand>
<order>40</order>
<!-- <arg>cd ${dotnet.build.dir} &amp;&amp;${dotnet.build.framework.dir}/${dotnet.build.framework.version}/msbuild.exe /m;
</arg>-->
<arg>cd ${dotnet.build.dir} &amp;&amp; &quot;/cygdrive/c/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe&quot;</arg>
</ExecuteCommand>
<!-- zippen aller executables auf der buildmaschine
<ExecuteCommand>
<order>45</order>
<arg>cd ${dotnet.build.dir} &amp;&amp;zip -q dotnet-sources.zip;
</arg>
</ExecuteCommand>-->
<GetCommand>
<order>50</order>
<localDirectory>${project.build.directory}</localDirectory>
<remoteFiles>
<param>${dotnet.build.dir}/AdapterApplication3x/bin/Debug/AdapterApplication3x.exe</param>
<param>${dotnet.build.dir}/AdapterApplication5x/bin/Debug/AdapterApplication5x.exe</param>
<param>${dotnet.build.dir}/ItacTools/bin/Debug/ItacTools.dll</param>
<param>${dotnet.build.dir}/MesTools/bin/Debug/MesTools.dll</param>
<param>${dotnet.build.dir}/Oib3xMapper/bin/Debug/Oib3xMapper.dll</param>
<param>${dotnet.build.dir}/Oib5xMapper/bin/Debug/Oib5xMapper.dll</param>
<param>${dotnet.build.dir}/MesTools/bin/Debug/MesTools.dll</param>
<param>${dotnet.build.dir}/SimmApplication3x/bin/Debug/SimmApplication3x.exe</param>
</remoteFiles>
</GetCommand>
</commands>
</RemoteHost>
</remoteHosts>
</configuration>
</plugin>
</plugins>
</build>
</project>