You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by cd...@apache.org on 2017/11/21 11:50:54 UTC
[14/50] incubator-edgent-samples git commit: cleanup and tweak
samples poms and doc for android
cleanup and tweak samples poms and doc for android
Project: http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/commit/150c308d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/tree/150c308d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/diff/150c308d
Branch: refs/heads/develop
Commit: 150c308d2f45be0ed029f1728a47911d2899db5c
Parents: 3f3e932
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Tue Sep 26 11:28:11 2017 -0400
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Tue Sep 26 11:28:11 2017 -0400
----------------------------------------------------------------------
README.md | 17 ++++++----
pom.xml | 9 ++++--
template/README.md | 18 +++++------
template/pom.xml | 85 ++-----------------------------------------------
4 files changed, 27 insertions(+), 102 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/blob/150c308d/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 48f5f15..2589e01 100644
--- a/README.md
+++ b/README.md
@@ -21,25 +21,28 @@ information on Edgent Application Development, Packaging and Execution.
Additional information may also be found in
Getting Started https://edgent.apache.org/docs/edgent-getting-started
-#Building the Edgent samples
+# Building the Edgent samples
By default Java8 class files are generated.
-Java7 and Android platform class files are produced when the appropriate
+Java7 platform class files are produced when the appropriate
profile is specified.
+Currently, building and running the samples for the Android platform
+is not supported. Many samples use the `DevelopmentProvider` and
+the `DevelopmentProvider` is not supported on the Android platform.
```sh
-./mvnw clean package # -Pplatform-java7,platform-android as needed
+./mvnw clean package # -Pplatform-java7 as needed
```
-A standard jar and uber jar is created for each sample category
+A standard jar and uber jar are created for each sample category
in the sample category's target directory: `<category>/target`.
-##Running the samples
+## Running the samples
See the README.md in each sample category directory.
-#Using Eclipse
+# Using Eclipse
The Edgent Git repository, or samples source release bundle, contains
Maven project definitions for the samples.
@@ -80,7 +83,7 @@ E.g.,
1. open the `HelloEdgent.java` sample
2. click on *Run*, *Run As*, then *Java application*. `HelloEdgent` runs and prints to the Console view.
-#Samples Summary
+# Samples Summary
<pre>
HelloEdgent Basic mechanics of declaring a topology and executing
http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/blob/150c308d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 713b1e4..f5032e3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -193,7 +193,12 @@
</plugins>
</build>
</profile>
- <profile>
+ <!-- Currently, many samples use the DevelopmentProvider,
+ which doesn't exist for the android platform.
+ For now don't support building/running the
+ samples for that context.
+ -->
+ <!--profile>
<id>platform-android</id>
<properties>
<platform.android>true</platform.android>
@@ -216,7 +221,7 @@
</plugin>
</plugins>
</build>
- </profile>
+ </profile-->
</profiles>
<build>
http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/blob/150c308d/template/README.md
----------------------------------------------------------------------
diff --git a/template/README.md b/template/README.md
index ef39700..096ef15 100644
--- a/template/README.md
+++ b/template/README.md
@@ -3,34 +3,32 @@ An Edgent Application template project.
Clone this template project to start your Edgent application project.
The project's pom supports
+
- building for java8, java7 or android execution environments
- building a standard jar and uber jar
-Edit the pom for your application. Adjust for your application's maven coordinates.
+Edit the pom for your application. Adjust it for your application's maven coordinates.
The pom has potential Edgent dependenacies present and commented out.
Include the Edgent Providers, Analytics, Utils, and Connectors used by your application.
Read `../README.md` for general information about Edgent Application development.
-#Building the project
-
+# Building the project
```sh
-./mvnw clean install # add -Pplatform-java7 or -Pplatform-java8 as needed
+./mvnw clean install # add -Pplatform-java7 or -Pplatform-android as needed
```
-#Running the application
-
-You can copy app-run.sh and the generated target/*-uber.jar to the edge device
+# Running the application
+You can copy `app-run.sh` and the generated `target/*-uber.jar` to the edge device
```sh
./app-run.sh
```
-#Using package-app.sh with the project
+# Using package-app.sh with the project
Adjust the main class name and application jar path below for your application.
-
```sh
-PLATFORM= # add "--platform java7" or "--platform android" if appropriate
+PLATFORM= # add "--platform java7" or "--platform android" as appropriate
../package-app.sh $PLATFORM --mainClass com.mycompany.app.TemplateApp --appjar target/my-app-1.0-SNAPSHOT.jar
```
http://git-wip-us.apache.org/repos/asf/incubator-edgent-samples/blob/150c308d/template/pom.xml
----------------------------------------------------------------------
diff --git a/template/pom.xml b/template/pom.xml
index 8d913d9..f225640 100644
--- a/template/pom.xml
+++ b/template/pom.xml
@@ -146,77 +146,8 @@
</dependencies>
<profiles>
- <!--
- This defines a self-activating profile which is only enabled for
- for projects that have a src/main/java directory (effectivley excludes
- it from the current pom module.
- -->
- <!--profile>
- <id>generate-classpath</id>
- <activation>
- <file>
- <exists>src/main/java</exists>
- </file>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>dump-dependency-tree</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>tree</goal>
- </goals>
- <configuration>
- <outputFile>${project.build.directory}/dependency-tree.graphml</outputFile>
- <outputType>graphml</outputType>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>xml-maven-plugin</artifactId>
- <version>1.0.1</version>
- <executions>
- <execution>
- <id>transform-dependency-tree</id>
- <goals>
- <goal>transform</goal>
- </goals>
- <configuration>
- <transformationSets>
- <transformationSet>
- <file>${project.build.directory}/dependency-tree.graphml</file>
- <stylesheet>${project.basedir}/../src/main/xslt/classpath.xsl</stylesheet>
- <parameters>
- <parameter>
- <name>groupId</name>
- <value>${project.groupId}</value>
- </parameter>
- <parameter>
- <name>artifactId</name>
- <value>${project.artifactId}</value>
- </parameter>
- <parameter>
- <name>version</name>
- <value>${project.version}</value>
- </parameter>
- </parameters>
- </transformationSet>
- </transformationSets>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile-->
-
<profile>
+ <!-- build app to run on Java7 platform -->
<id>platform-java7</id>
<properties>
<platform.java7>true</platform.java7>
@@ -241,6 +172,7 @@
</build>
</profile>
<profile>
+ <!-- build app to run on Android platform -->
<id>platform-android</id>
<properties>
<platform.android>true</platform.android>
@@ -295,19 +227,6 @@
</execution>
</executions>
</plugin>
-
- <!-- Inject the "incubating" into the output filename -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <finalName>apache-edgent-incubating-samples-${project.version}</finalName>
- <formats>
- <format>zip</format>
- <format>tar.gz</format>
- </formats>
- </configuration>
- </plugin>
</plugins>
</pluginManagement>