Skip to content

Commit

Permalink
Updated pom to latest from starter project
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjhawk committed Sep 28, 2023
1 parent 98f74ba commit b92973e
Showing 1 changed file with 178 additions and 11 deletions.
189 changes: 178 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@

<!-- PROJECT PROPERTIES -->
<properties>
<!-- Ewon Flexy Device Address (IP or URL) -->
<ewon.address>10.0.0.53</ewon.address>
<!-- Ewon Flexy Device Username -->
<ewon.username>adm</ewon.username>
<!-- Ewon Flexy Device Password -->
<ewon.password>adm</ewon.password>
<!-- Project Main Class -->
<project.main.class>com.hms_networks.americas.sc.extensions.ExtensionsMain</project.main.class>
<!-- Project Memory Heap Size -->
Expand Down Expand Up @@ -135,10 +129,11 @@
</goals>
<configuration>
<finalName>${project.artifactId}-${project.version}-archive</finalName>
<tarLongFileMode>gnu</tarLongFileMode>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>project</descriptorRef>
</descriptorRefs>
<descriptors>
<descriptor>${project.basedir}${file.separator}src${file.separator}assembly${file.separator}sc-project.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -172,17 +167,81 @@
</javadocExecutable>
<finalName>${project.artifactId}-${project.version}</finalName>
<show>private</show>
<includeDependencySources>true</includeDependencySources>
<dependencySourceExcludes>
<dependencySourceExclude>com.hms_networks.americas.sc.mvnlibs:ewon-etk:*</dependencySourceExclude>
</dependencySourceExcludes>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar</goal>
<goal>aggregate-jar</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Upload Jar file on install -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>wagon-maven-plugin</artifactId>
<version>2.0.2</version>
<executions>
<execution>
<id>ftp-install-jar</id>
<phase>install</phase>
<goals>
<goal>upload-single</goal>
</goals>
<configuration>
<fromFile>
${project.build.directory}${file.separator}${project.artifactId}-${project.version}-full.jar
</fromFile>
<url>ftp://${ewon.username}:${ewon.password}@${ewon.address}/usr</url>
</configuration>
</execution>
</executions>
</plugin>

<!-- Run Jar file on Ewon Flexy -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>deploy-stop-execution</id>
<phase>deploy</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<get username="${ewon.username}" password="${ewon.password}"
dest="stop.log" verbose="true"
src="http://${ewon.address}/rcgi.bin/jvmCmd?cmd=stop"/>
</target>
<failOnError>true</failOnError>
</configuration>
</execution>
<execution>
<id>deploy-execute-jar</id>
<phase>deploy</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<get username="${ewon.username}" password="${ewon.password}"
dest="start.log" verbose="true" src="${project.build.exec.url}"/>
</target>
<failOnError>true</failOnError>
</configuration>
</execution>
</executions>
</plugin>

<!-- Skip standard maven artifact deployment -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -213,8 +272,13 @@
<include>
.idea${file.separator}runConfigurations${file.separator}DEBUG__Run_on_Device__Remote_JVM_.xml
</include>
<include>starting-files${file.separator}jvmrun</include>
</includes>
<replacements>
<replacement>
<token>-classpath /usr/.*-full\.jar</token>
<value>-classpath /usr/${project.artifactId}-${project.version}-full.jar</value>
</replacement>
<replacement>
<token>key="port" value=".*"</token>
<value>key="port" value="${project.build.debug.port}"</value>
Expand Down Expand Up @@ -255,8 +319,60 @@
</execution>
</executions>
</plugin>

<!-- Mark flexy.properties as assume unchanged-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<executions>
<execution>
<id>git-assume-unchanged-flexy-properties</id>
<phase>initialize</phase>
<configuration>
<executable>git</executable>
<arguments>
<argument>update-index</argument>
<argument>--assume-unchanged</argument>
<argument>${project.basedir}/flexy.properties</argument>
</arguments>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>

<!-- Read properties from external file -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${project.basedir}/flexy.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
</plugins>

<extensions>
<!-- Extension for FTP connections in wagon-maven-plugin -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
</extension>
</extensions>

<pluginManagement>
<plugins>
<!-- Eclipse M2E settings. Note: this has no influence on the Maven build.-->
Expand Down Expand Up @@ -296,20 +412,71 @@
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!--suppress UnresolvedMavenProperty -->
<project.build.exec.url>http://${ewon.address}/rcgi.bin/jvmCmd?cmd=start&amp;runCmd=%20-heapsize%20${project.heap.size}%20-classpath%20/usr/${project.artifactId}-${project.version}-full.jar%20-emain%20${project.main.class}</project.build.exec.url>
</properties>
</profile>
<profile>
<id>debug</id>
<properties>
<!--suppress UnresolvedMavenProperty -->
<project.build.exec.url>http://${ewon.address}/rcgi.bin/jvmCmd?cmd=start&amp;runCmd=%20-heapsize%20${project.heap.size}%20-classpath%20/usr/${project.artifactId}-${project.version}-full.jar%20-emain%20${project.main.class}%20-debugger%20-port%20${project.build.debug.port}</project.build.exec.url>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>debug-delay</id>
<phase>deploy</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<sleep seconds="5"/>
</target>
<failOnError>true</failOnError>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>debugNoSuspend</id>
<properties>
<!--suppress UnresolvedMavenProperty -->
<project.build.exec.url>http://${ewon.address}/rcgi.bin/jvmCmd?cmd=start&amp;runCmd=%20-heapsize%20${project.heap.size}%20-classpath%20/usr/${project.artifactId}-${project.version}-full.jar%20-emain%20${project.main.class}%20-debugger%20-port%20${project.build.debug.port}%20-nosuspend</project.build.exec.url>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>debug-delay</id>
<phase>deploy</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<sleep seconds="5"/>
</target>
<failOnError>true</failOnError>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

Expand All @@ -331,4 +498,4 @@
<scope>provided</scope>
</dependency>
</dependencies>
</project>
</project>

0 comments on commit b92973e

Please sign in to comment.