Return-Path: X-Original-To: apmail-apex-commits-archive@minotaur.apache.org Delivered-To: apmail-apex-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BF6BD18649 for ; Wed, 2 Mar 2016 23:32:37 +0000 (UTC) Received: (qmail 31771 invoked by uid 500); 2 Mar 2016 23:32:37 -0000 Delivered-To: apmail-apex-commits-archive@apex.apache.org Received: (qmail 31676 invoked by uid 500); 2 Mar 2016 23:32:37 -0000 Mailing-List: contact commits-help@apex.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@apex.incubator.apache.org Delivered-To: mailing list commits@apex.incubator.apache.org Received: (qmail 31654 invoked by uid 99); 2 Mar 2016 23:32:37 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2016 23:32:37 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3AE0A180612 for ; Wed, 2 Mar 2016 23:32:37 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -3.549 X-Spam-Level: X-Spam-Status: No, score=-3.549 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.329] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id gSicE85R_T1l for ; Wed, 2 Mar 2016 23:32:32 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 2170B5FB06 for ; Wed, 2 Mar 2016 23:32:31 +0000 (UTC) Received: (qmail 29149 invoked by uid 99); 2 Mar 2016 23:32:30 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2016 23:32:30 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 73778E178F; Wed, 2 Mar 2016 23:32:30 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: thw@apache.org To: commits@apex.incubator.apache.org Date: Wed, 02 Mar 2016 23:32:34 -0000 Message-Id: <6cdb10e3ea4a48619a3069a3d8f81d91@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [05/50] incubator-apex-core git commit: Touched up markdown version of App Package doc Touched up markdown version of App Package doc Project: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/commit/1d16ac40 Tree: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/tree/1d16ac40 Diff: http://git-wip-us.apache.org/repos/asf/incubator-apex-core/diff/1d16ac40 Branch: refs/heads/APEXCORE-293 Commit: 1d16ac402ae00b23159e0e227cdab49ae1655c57 Parents: 2164699 Author: David Yan Authored: Wed Oct 28 10:33:38 2015 -0700 Committer: Thomas Weise Committed: Sun Feb 28 22:46:32 2016 -0800 ---------------------------------------------------------------------- ApexPackage.md | 211 +++++++++++++++++++++++++--------------------------- 1 file changed, 100 insertions(+), 111 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-apex-core/blob/1d16ac40/ApexPackage.md ---------------------------------------------------------------------- diff --git a/ApexPackage.md b/ApexPackage.md index 7bf5e8b..fd4934b 100644 --- a/ApexPackage.md +++ b/ApexPackage.md @@ -1,25 +1,24 @@ -#Apex Application Packages +#Apache Apex (incubating) Application Packages -# 1. Introduction +# 1. Introduction -An Apex Application Package is a zip file that contains all the -necessary files to launch an application in Project Apex. It is the -standard way for assembling and sharing an Apex application. +An Apache Apex Application Package is a zip file that contains all the +necessary files to launch an application in Apache Apex. It is the +standard way for assembling and sharing an Apache Apex application. -# 2. Requirements +# 2. Requirements You will need have the following installed: 1. Apache Maven 3.0 or later (for assembling the App Package) -2. Apex 3.0.0 or later (for launching the App Package in your cluster) - -#3. Creating Your First Apex App Package +2. Apache Apex 3.0.0 or later (for launching the App Package in your cluster) +#3. Creating Your First Apex App Package You can create an Apex Application Package using your Linux command -line, or using your favorite IDE. +line, or using your favorite IDE. -##Using Command Line +##Using Command Line First, change to the directory where you put your projects, and create an Apex application project using Maven by running the following @@ -27,13 +26,13 @@ command. Replace "com.example", "mydtapp" and "1.0-SNAPSHOT" with the appropriate values (make sure this is all on one line): ``` - $ mvn archetype:generate - -DarchetypeRepository=https://www.datatorrent.com/maven/content/reposito - ries/releases - -DarchetypeGroupId=com.datatorrent - -DarchetypeArtifactId=apex-app-archetype -DarchetypeVersion=3.0.0 - -DgroupId=com.example -Dpackage=com.example.mydtapp -DartifactId=mydtapp - -Dversion=1.0-SNAPSHOT + $ mvn archetype:generate + -DarchetypeRepository=https://www.datatorrent.com/maven/content/reposito + ries/releases + -DarchetypeGroupId=com.datatorrent + -DarchetypeArtifactId=apex-app-archetype -DarchetypeVersion=3.2.0 + -DgroupId=com.example -Dpackage=com.example.mydtapp -DartifactId=mydtapp + -Dversion=1.0-SNAPSHOT ``` This creates a Maven project named "mydtapp". Open it with your favorite @@ -53,43 +52,31 @@ This builds the App Package runs the unit test of the DAG. You should be getting test output similar to this: ``` - ------------------------------------------------------- - - TESTS - - ------------------------------------------------------- - - Running com.example.mydtapp.ApplicationTest - - hello world: 0.8015370953286478 - - hello world: 0.9785359225545481 - - hello world: 0.6322611586644047 - - hello world: 0.8460953663451775 - - hello world: 0.5719372906929072 - - hello world: 0.6361174312337172 - - hello world: 0.14873007534816318 - - hello world: 0.8866986277418261 - - hello world: 0.6346526809866057 - hello world: 0.48587295703904465 - - hello world: 0.6436832429676687 - - ... - - Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.863 - sec - - Results : - - Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 + ------------------------------------------------------- + TESTS + ------------------------------------------------------- + + Running com.example.mydtapp.ApplicationTest + hello world: 0.8015370953286478 + hello world: 0.9785359225545481 + hello world: 0.6322611586644047 + hello world: 0.8460953663451775 + hello world: 0.5719372906929072 + hello world: 0.6361174312337172 + hello world: 0.14873007534816318 + hello world: 0.8866986277418261 + hello world: 0.6346526809866057 + hello world: 0.48587295703904465 + hello world: 0.6436832429676687 + + ... + + Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.863 + sec + + Results : + + Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 ``` The "mvn package" command creates the App Package file in target @@ -126,12 +113,12 @@ project, with a default unit test. You can run the unit test, make code changes or make dependency changes within your IDE. The procedure for other IDEs, like Eclipse or IntelliJ, is similar. -# 4. Writing Your Own App Package +# 4. Writing Your Own App Package Please refer to the [Application Developer Guide](https://www.datatorrent.com/docs/guides/ApplicationDeveloperGuide.html) on the basics on how to write a DataTorrent application. In your AppPackage project, you can add custom operators (refer to [Operator Developer Guide](https://www.datatorrent.com/docs/guides/OperatorDeveloperGuide.html)), project dependencies, default and required configuration properties, pre-set configurations and other metadata. -## Adding (and removing) project dependencies +## Adding (and removing) project dependencies Under the project, you can add project dependencies in pom.xml, or do it through your IDE. Here’s the section that describes the dependencies in @@ -147,7 +134,7 @@ the default pom.xml: If you know your application do not need the transitive dependencies that are pulled in by malhar-library, Uncomment the following to reduce the size of your app package. --> -