Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D7149200C3C for ; Sun, 5 Mar 2017 02:18:18 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D5C8C160B7F; Sun, 5 Mar 2017 01:18:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 065B0160B71 for ; Sun, 5 Mar 2017 02:18:17 +0100 (CET) Received: (qmail 9107 invoked by uid 500); 5 Mar 2017 01:18:17 -0000 Mailing-List: contact dev-help@polygene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@polygene.apache.org Delivered-To: mailing list dev@polygene.apache.org Received: (qmail 9094 invoked by uid 99); 5 Mar 2017 01:18:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Mar 2017 01:18:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 352C11A02D3 for ; Sun, 5 Mar 2017 01:18:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.48 X-Spam-Level: ** X-Spam-Status: No, score=2.48 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id UUONTWGej75a for ; Sun, 5 Mar 2017 01:18:14 +0000 (UTC) Received: from mail-oi0-f42.google.com (mail-oi0-f42.google.com [209.85.218.42]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id D94E35F253 for ; Sun, 5 Mar 2017 01:18:13 +0000 (UTC) Received: by mail-oi0-f42.google.com with SMTP id 126so19860161oig.3 for ; Sat, 04 Mar 2017 17:18:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=hpmeoApjXEQMcUyNQTzE6W5o1e4jVURy+GwGK+0R7ts=; b=RdV2Stzk1dJ1ykPl1tbVEP+TZjWA78IUmyh+J94jmDRn1WLOimdINkJkPYscQTZghY 5XcOYG2pE+U8hoPYHmpxtAUFeM/gE6L1ItKONnkLfOplrA5RhCxSeA7KVXTKTJQM1bvM HtonhE9dEsVQCIlQ3h7HGSyhiM6hybRxh1Sf3JgbiRXcgRD13s0agR82RMmfLg8qZKjh kj2f3R7V/+no6Cp40neyWhIAuRy1btiofbXCkcKwALSvfGH4yZ+UdiT4baovCElazRX/ whtsJ8ce3AFrnirpsivThMrej4fHMzh5xxj8CC8mULITwvva2nvpUDWgQY6JSgx+Su9v 00Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=hpmeoApjXEQMcUyNQTzE6W5o1e4jVURy+GwGK+0R7ts=; b=LMgtrGQbI45kzHDY5mR1ZzZbBVZCOJfT+EMzHe+5+51F79FCY0OnG5R0pNEC0TArCM v8c4zfk8wxXU/8lBBogto7RlJvN7paCKdWk0xoQE9/gojXrXfeZmAgYKM41EaCB8uIQy 2iSORG9gToBspEJZkPTrlar5m7Na1Tg0lp7Lo/C/APtS3Rnojqsn4WPseOKinej8KYHB YYwP0OKlr5p3XC3zBtIbBGemCgLa1iZaADt7DW+IjcTb7tqeYqMNxlS1/oEnHFcfgVDb 8gNvLvK/vmuGEv95j/E4I8Bw4ifwVsH0jMmAzH/1wBRPyoC0Zool0a0w+rM9aOlv80+v 6T1A== X-Gm-Message-State: AMke39l0lDxWo1i1cqSnpoj3hFtS89L3b/RwZHcYAWWoTTyWcXpKBQE1zq3LL/YDCFq0sK7HBTpEfOaUJQT0Zg== X-Received: by 10.202.231.148 with SMTP id e142mr4294458oih.3.1488676686659; Sat, 04 Mar 2017 17:18:06 -0800 (PST) MIME-Version: 1.0 Sender: hedhman@gmail.com Received: by 10.202.82.211 with HTTP; Sat, 4 Mar 2017 17:17:46 -0800 (PST) From: Niclas Hedhman Date: Sun, 5 Mar 2017 09:17:46 +0800 X-Google-Sender-Auth: fashqZ2gX-3spylKkvjmnvMAKJM Message-ID: Subject: Yeoman generator To: dev@polygene.apache.org Content-Type: multipart/alternative; boundary=001a1141759a180b840549f18d27 archived-at: Sun, 05 Mar 2017 01:18:19 -0000 --001a1141759a180b840549f18d27 Content-Type: text/plain; charset=UTF-8 A heads-up; I am working on the Yeoman generator to create Polygene projects from commandline, and there is some progress that I will commit shortly. One of the new things that I have added is that it is possible to provide a "model" in JSON, which either used as defaults for the questions, or one can disable the prompts and it will take all the stuff from that model. It came about because I couldn't figure out how to do "repeat questions" in Yeoman, i.e. Add the name of a Module, then add X value types, Y entity types..., then back to be able to add another Module and so on. If there is someone with Yeoman experience who can fix that, please step forward. So, I created a small json format (see sample below). This in turn means that small "profiles" could be prepared and simply fed into Yeoman and out comes a skeletal application, runnable at that point. If anyone wants to help working on this, here is what you need to do, install npm and yeoman on your system (http://yeoman.io/learning/) cd tools/generator-polygene/ sudo npm link That will make the "polygene" generator available in yeoman. I typically do my workflow by first creating my "project directory", say "mkdir niclas", then I repeatedly run, rm -rf * && cp ../model.json imported-model.json && yo polygene --import --export && ./gradlew clean build assemble between each change in the source code. Above I have an "model.json" containing the "modules" section seen in the "exported" model below. (Later the name of import and export files will be added) One thing that needs to be figured out, is how to make this available in the Polygene SDK distribution. Another that Paul has brought up is how to test all the permutations so that every combination of entitystore, indexing, serialization, caching, rest, jmx, reindexer, migration support, metrics and what else could be dreamt up, actually compiles after a generation. With the new "--import" this automation should be easier to do, although I think Yeoman has support for it too. Anyway, a good chunk of work is going to be committed a bit later today.. { "modules": { "users": { "cruds": [ { "name": "Users" }, { "name": "Roles" }, { "name": "User" }, { "name": "Role" }, { "name": "Permission" }, { "name": "Group" }, { "name": "Groups" } ], "entities": [], "values": [], "services": [ { "name": "AuthService", "visibilty": "application" } ], "transients": [], "objects": [], "name": "users", "clazz": { "name": "AuthService", "visibilty": "application" } } }, "name": "Niclas", "packageName": "com.acme.niclas", "singletonApp": false, "features": [ "rest api" ], "entitystore": "Cassandra", "indexing": "Rdf", "caching": "none", "serialization": "Jackson", "packagename": "com.acme.niclas", "javaPackageDir": "com/acme/niclas" } -- Niclas Hedhman, Software Developer http://polygene.apache.org - New Energy for Java --001a1141759a180b840549f18d27--