Closed eichelbe closed 1 year ago
There since 3948bc5d52b8421491cb616e4218c08de832245d
Guide for switching to single-cmd mvn execution of one-shot examples (as example see examples.python) :
add <relativePath></relativePath>
to parent POM section
add filter to py-test execution of maven-python plugin in App profile
<configuration>
<fileset>
<directory>src/test/python</directory>
<includes>
<include>**/*Test.py</include>
</includes>
</fileset>
</configuration>
add non-build properties to EasyGen profile
<properties>
<maven.main.skip>true</maven.main.skip>
<maven.test.skip>true</maven.test.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
</properties>
add configuration plugin to build plugins in EasyGen profile (adjust presence of generateBroker, generatePlatform as needed for example context):
<plugin>
<groupId>de.iip-ecosphere.platform</groupId>
<artifactId>configuration-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>generateBroker</id>
<goals>
<goal>generateBroker</goal>
</goals>
</execution>
<execution>
<id>generateAppsNoDeps</id>
<goals>
<goal>generateAppsNoDeps</goal>
</goals>
</execution>
<execution>
<id>generateApps</id>
<goals>
<goal>generateApps</goal>
</goals>
</execution>
</executions>
<configuration>
<model>ExamplePython</model>
<outputDirectory>gen/py</outputDirectory>
</configuration>
</plugin>
add Main profile with default activation and invoker-plugin
<profile>
<id>Main</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<maven.main.skip>true</maven.main.skip>
<maven.test.skip>true</maven.test.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
</properties>
<build>
<plugins>
<plugin>
<groupId>de.iip-ecosphere.platform</groupId>
<artifactId>invoker-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>genInterfaces</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<invokeProfiles>
<invokeProfile>EasyGen</invokeProfile>
</invokeProfiles>
<invokeGoals>
<invokeGoal>process-sources</invokeGoal>
</invokeGoals>
</configuration>
</execution>
<execution>
<id>installServices</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<invokeProfiles>
<invokeProfile>App</invokeProfile>
</invokeProfiles>
<invokeGoals>
<invokeGoal>install</invokeGoal>
</invokeGoals>
<systemProperties>
<systemProperty>
<key>skipTests</key>
<key>true</key>
</systemProperty>
</systemProperties>
</configuration>
</execution>
<execution>
<id>integrateApp</id>
<goals>
<goal>install</goal>
</goals>
<configuration>
<invokeProfiles>
<invokeProfile>EasyGen</invokeProfile>
</invokeProfiles>
<invokeGoals>
<invokeGoal>package</invokeGoal>
</invokeGoals>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
adjust build.sh, replace all mvn calls at the beginning (-> build with broker) by the single line mvn -U install
adjust README.md to indicate the single call approach
<plugin>
<groupId>de.iip-ecosphere.platform</groupId>
<artifactId>dependency-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>unpack</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>de.iip-ecosphere.platform</groupId>
<artifactId>configuration.configuration</artifactId>
<version>${project.version}</version>
<classifier>easy</classifier>
<type>zip</type>
<overWrite>true</overWrite>
<outputDirectory>${project.basedir}/src/main/easy</outputDirectory>
<destFileName>model.jar</destFileName>
</artifactItem>
</artifactItems>
<cleanup>
<directory>${project.basedir}/src/main/easy</directory>
<includes>
<include>cfg</include>
<include>files</include>
<include>meta</include>
<include>vtl</include>
<include>IIPEcosphere*.*</include>
</includes>
</cleanup>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</execution>
</executions>
</plugin>
Handles the download of the platform model as well as the cleanup in case of updates.
Remaining tasks (@AhmadAlamoush @Chris-Sauer @JimmyAppel)
... may be - also HM'22 Cleanup see #115
Seems to be active in relevant places. Closing. Documentation x-check in #116 needed!
Trial: Does this simplify application of instantiation?