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

250 lines
9.1 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.interfaces</groupId>
<artifactId>imsinterfaces-simm-adapter</artifactId>
<packaging>pom</packaging>
<name>imsinterfaces-simm-adapter</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>
<dotnet.build.dir>${dotnet.build.basedir}/build_${project.artifactId}/${user.name}/${projectname}</dotnet.build.dir>
<timestamp>${maven.build.timestamp}</timestamp>
</properties>
<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.addons</groupId>
<artifactId>imsapi-dotnet</artifactId>
<type>zip</type>
<classifier>net4</classifier>
</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>
<dependency>
<groupId>com.itac.addons</groupId>
<artifactId>imsapi-dotnet</artifactId>
<classifier>net4</classifier>
<type>zip</type>
</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}/lib</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}/lib</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>
<artifactItem>
<groupId>com.itac.addons</groupId>
<artifactId>imsapi-dotnet</artifactId>
<classifier>net4</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/lib</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>com.itac.product</groupId>
<artifactId>artes-dotnet</artifactId>
<type>zip</type>
<classifier>net4</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/lib</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>asm.as.oib</groupId>
<artifactId>asmclient</artifactId>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/lib</outputDirectory>
</artifactItem>
<artifactItem>
<groupId>asm.as.oib</groupId>
<artifactId>oibclient</artifactId>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/lib</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<!-- zusammenpacken aller source-Files und Properties und libs in ein Zip
Dieses zip wird dann per SCP auf die windows Maschine kopiert -->
<execution>
<id>create-project-bundle</id>
<phase>process-resources</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>simm-adapter-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 build_${project.artifactId}/${user.name}/${projectname};
mkdir build_${project.artifactId};
cd build_${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/simm-adapter-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 simm-adapter-dotnet-sources.zip;
</arg>
</ExecuteCommand>
<!-- starten des msBuild-Vorgangs -->
<ExecuteCommand>
<order>40</order>
<arg>cd ${dotnet.build.dir} &amp;&amp;${dotnet.build.framework.dir}/${dotnet4.framework.version}/msbuild.exe SIMM.proxy.sln;
</arg>
</ExecuteCommand>
<GetCommand>
<order>50</order>
<localDirectory>${project.build.directory}</localDirectory>
<remoteFiles>
<param>${dotnet.build.dir}/bin/debug/${simm.binary.name}</param>
</remoteFiles>
</GetCommand>
</commands>
</RemoteHost>
</remoteHosts>
</configuration>
</plugin>
</plugins>
</build>
</project>