Commits

Aleksey Fomkin committed a71877f

Comments (0)

Files changed (32)

lib/cgml-as3-support/pom.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>com.yarrcad.cg</groupId>
-        <artifactId>cgml-libs-aggregator</artifactId>
-        <version>1.0-SNAPSHOT</version>
-    </parent>
-
-    <groupId>com.yarrcad.cg</groupId>
-    <artifactId>cgml-as3-support</artifactId>
-    <version>1.2</version>
-    <packaging>swc</packaging>
-
-    <name>AS3 library for CGML Support</name>
-
-    <build>
-        <sourceDirectory>src/main/flex</sourceDirectory>
-        <testSourceDirectory>src/test/flex</testSourceDirectory>
-        <plugins>
-            <plugin>
-                <groupId>org.sonatype.flexmojos</groupId>
-                <artifactId>flexmojos-maven-plugin</artifactId>
-                <version>${flexmojos.version}</version>
-                <extensions>true</extensions>
-                <executions>
-                    <execution>
-                        <id>run-tests</id>
-                        <phase>test</phase>
-                        <goals>
-                            <goal>test-compile</goal>
-                            <goal>test-run</goal>
-                        </goals>
-                    </execution>
-                </executions>
-                <configuration>
-                    <storepass/>
-                    <filesToTrust>
-                        <file>${project.build.outputDirectory}/${project.build.finalName}</file>
-                    </filesToTrust>
-                    <ditaSkip>true</ditaSkip>
-                    <targetPlayer>10.2</targetPlayer>
-                    </configuration>
-                <dependencies>
-                    <dependency>
-                        <groupId>com.adobe.flex</groupId>
-                        <artifactId>compiler</artifactId>
-                        <version>${flex.sdk.version}</version>
-                        <type>pom</type>
-                    </dependency>
-                </dependencies>
-            </plugin>
-        </plugins>
-    </build>
-
-    <dependencies>
-        <dependency>
-            <groupId>com.adobe.flex.framework</groupId>
-            <artifactId>flex-framework</artifactId>
-            <version>${flex.sdk.version}</version>
-            <type>pom</type>
-        </dependency>
-        <dependency>
-            <groupId>com.adobe.flexunit</groupId>
-            <artifactId>flexunit</artifactId>
-            <version>4.0-rc-1</version>
-            <type>swc</type>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <pluginRepositories>
-        <pluginRepository>
-            <id>sonatype</id>
-            <url>http://repository.sonatype.org/content/groups/flexgroup/</url>
-        </pluginRepository>
-    </pluginRepositories>
-
-</project>

lib/cgml-as3-support/src/main/flex/com/yarrcad/cgml/CollectionChangeBroadcaster.as

-package com.yarrcad.cgml {
-import flash.events.IEventDispatcher;
-
-import mx.collections.ArrayCollection;
-import mx.events.CollectionEvent;
-import mx.events.PropertyChangeEvent;
-
-public class CollectionChangeBroadcaster {
-
-  private var target:IEventDispatcher;
-  private var collection:ArrayCollection;
-  private var name:String;
-
-  public function CollectionChangeBroadcaster(name:String,  target:IEventDispatcher, collection:ArrayCollection) {
-
-    this.target = target;
-    this.collection = collection;
-    this.name = name;
-
-    if (collection != null)
-      collection.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler);
-
-    target.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, propertyChangeHanlder);
-  }
-
-  private function propertyChangeHanlder(event:PropertyChangeEvent):void {
-    if (event.source != this && event.property == name) {
-      // Remove old handler
-      if (collection != null)
-        collection.removeEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler);
-      // Resolve a property and add new handler
-      collection = target[name];
-      collection.addEventListener(CollectionEvent.COLLECTION_CHANGE, collectionChangeHandler);
-    }
-  }
-
-  private function collectionChangeHandler(event:CollectionEvent):void {
-    target.dispatchEvent(PropertyChangeEvent.createUpdateEvent(this, name, null, collection));
-  }
-
-}
-
-}

lib/cgml-as3-support/src/main/flex/com/yarrcad/cgml/ObjectStorage.as

-/*
- * This file is part of the CGML Compiler
- *
- * Copyright(c) 2010 Aleksey Fomkin <aleksey.fomkin@gmail.com>
- * http://bitbucket.org/yelbota/cgml-compiler
- *
- * This file may be licensed under the terms of of the
- * GNU General Public License Version 3 (the ``GPL'').
- *
- * Software distributed under the License is distributed
- * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
- * express or implied. See the GPL for the specific language
- * governing rights and limitations.
- *
- * You should have received a copy of the GPL along with this
- * program. If not, go to http://www.gnu.org/licenses/gpl.html
- * or write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-package com.yarrcad.cgml {
-
-import flash.utils.Dictionary;
-
-public class ObjectStorage {
-
-  public function ObjectStorage(parent:ObjectStorage=null) {
-    this.parent = parent;
-  }
-
-  /**
-   * Parent object table, parent object can't be
-   * modified from here.
-   */
-  private var parent:ObjectStorage;
-
-  /**
-   * Object storage
-   */
-  private var map:Array = new Array();
-
-  /**
-   * Index of object storage. It needs for fast search ids by
-   * object values
-   */
-  private var indexMap:Dictionary = new Dictionary(true);
-
-  /**
-   * Initializtion map. Objects can exeists in storage, but in might
-   * be to initialized. When object pass initialization in puts in
-   * this map.
-   */
-  private var initMap:Dictionary = new Dictionary(true);
-
-  /**
-   * @return Id for a new object.
-   */
-  public function generateId():int {
-
-    var newId:int = Math.random() * 0xFFFFFFF;
-    while (getObjectExists2(newId))
-      newId = generateId();
-
-    return newId;
-  }
-
-  /**
-   * Register new object in reference table.
-   *
-   * @param object new object.
-   * @return id of new object.
-   */
-  public function registerNewObject(object:Object):int {
-    var id:int = generateId();
-    registerObject(id, object);
-    return id;
-  }
-
-  /**
-   * Register any object in the reference table.
-   *
-   * @param id     object id
-   * @param object object
-   */
-  public function registerObject(id:int, object:Object):void {
-    map[id] = object;
-    indexMap[object] = id;
-  }
-
-  /**
-   * @param object any object
-   * @return Id of object if it's allready registred else -1.
-   */
-  public function getObjectId(object:Object):int {
-    if (parent != null) {
-      var id_i:int = parent.getObjectId(object);
-      if (id_i > -1)
-        return id_i;
-    }
-
-    var id:Object = indexMap[object];
-    return (id == null) ? -1 : int(id);
-  }
-
-  public function getObject(id:int):Object {
-    var result:Object;
-    if (parent != null)
-      result = parent.getObject(id);
-    if (result == null)
-      result = map[id];
-    return result;
-  }
-
-  public function getObjectExists(object:Object):Boolean {
-    if (parent != null)
-      return parent.getObjectExists(object) || (indexMap[object] != null);
-    else return (indexMap[object] != null);
-  }
-
-  public function getObjectExists2(id:int):Boolean {
-    if (parent != null)
-      return parent.getObjectExists2(id) || (map[id] != null);
-    else return (map[id] != null);
-  }
-
-  /**
-   * Check object marked as initialized.
-   *
-   * @param object object
-   * @return inializtion status.
-   */
-  public function getObjectInitialized(object:Object):Boolean {
-    if (parent != null)
-      return parent.getObjectInitialized(object) || initMap[object];
-    else return initMap[object];
-  }
-
-  public function setObjectInitialized(object:Object):void {
-    if (parent != null && parent.getObjectExists(object))
-      parent.setObjectInitialized(object);
-    else initMap[object] = true;
-  }
-}
-
-}

lib/cgml-as3-support/src/main/flex/com/yarrcad/cgml/net/Connection.as

-package com.yarrcad.cgml.net {
-
-import com.yarrcad.cgml.net.events.ConnectionEvent;
-
-import flash.events.Event;
-import flash.events.EventDispatcher;
-import flash.events.IOErrorEvent;
-import flash.events.ProgressEvent;
-import flash.events.SecurityErrorEvent;
-import flash.net.Socket;
-import flash.utils.ByteArray;
-
-[Event(type="com.yarrcad.cgml.net.events.ConnectionEvent", name="packet")]
-[Event(name="securityError", type="flash.events.SecurityErrorEvent")]
-[Event(name="ioError", type="flash.events.IOErrorEvent")]
-[Event(name="connect", type="flash.events.Event")]
-[Event(name="close", type="flash.events.Event")]
-
-public class Connection extends EventDispatcher {
-
-    private var socket:Socket;
-    private var packetStack:PacketStack;
-
-    public function Connection() {
-        socket = new Socket();
-        socket.addEventListener(ProgressEvent.SOCKET_DATA, socket_socketDataHandler)
-        socket.addEventListener(Event.CONNECT, forwardEvent);
-        socket.addEventListener(IOErrorEvent.IO_ERROR, forwardEvent);
-        socket.addEventListener(SecurityErrorEvent.SECURITY_ERROR, forwardEvent);
-        socket.addEventListener(Event.CLOSE, forwardEvent);
-
-        packetStack = new PacketStack();
-    }
-
-    public function connect(host:String, port:int):void {
-        socket.connect(host, port);
-    }
-
-    public function get connected():Boolean {
-        return socket.connected;
-    }
-
-    public function sendBytes(body:ByteArray):void {
-        body.position = 0;
-        socket.writeUnsignedInt(body.length);
-        socket.writeBytes(body);
-        socket.flush();
-    }
-
-    public function close():void {
-        if (socket.connected)
-            socket.close();
-        dispatchEvent(new Event(Event.CLOSE));
-    }
-
-    private function forwardEvent(event:Event):void {
-        dispatchEvent(event.clone());
-    }
-
-    private function socket_socketDataHandler(event:ProgressEvent):void {
-        packetStack.processInput(socket);
-        while (packetStack.size > 0) {
-            dispatchEvent(new ConnectionEvent(ConnectionEvent.PACKET, packetStack.take()));
-        }
-    }
-}
-
-}

lib/cgml-as3-support/src/main/flex/com/yarrcad/cgml/net/PacketStack.as

-package com.yarrcad.cgml.net {
-
-import com.yarrcad.cgml.net.errors.PacketStackError;
-
-import flash.events.Event;
-import flash.events.EventDispatcher;
-import flash.utils.ByteArray;
-import flash.utils.IDataInput;
-
-public class PacketStack extends EventDispatcher {
-
-    private var packets:Vector.<ByteArray>;
-    private var knownPacketLength:int = -1;
-    private var buffer:ByteArray;
-
-    public function PacketStack() {
-        packets = new Vector.<ByteArray>();
-        buffer = new ByteArray();
-    }
-
-    public function processInput(input:IDataInput):void {
-        if (knownPacketLength > -1) {
-
-            // We already know packet length. So lets read out.
-            const assumeLength:int = knownPacketLength - buffer.length;
-            const toRead:int = assumeLength > input.bytesAvailable
-                    ? input.bytesAvailable
-                    : assumeLength;
-
-            if (toRead > 0)
-                input.readBytes(buffer, buffer.length, toRead);
-
-            // Check packet length
-            if (buffer.length >= knownPacketLength) {
-                // Yeha! Packet complete.
-                // Call user handler and reset the buffer.
-                buffer.position = 0;
-                packets.push(buffer);
-                buffer = new ByteArray();
-                knownPacketLength = -1;
-                processInput(input);
-            }
-        } else if (input.bytesAvailable >= 4) {
-            // Can read length of packet
-            knownPacketLength = input.readUnsignedInt();
-            processInput(input);
-        }
-    }
-
-    [Bindable("sizeChange")]
-
-    public function get size():uint {
-        return packets.length;
-    }
-
-    public function take():ByteArray {
-        if (packets.length > 0) {
-            var result:ByteArray = packets.shift();
-            dispatchEvent(new Event("sizeChange"));
-            return result;
-        }
-        else throw new PacketStackError(PacketStackError.NO_PACKETS_AVALIABLE);
-    }
-}
-
-}

lib/cgml-as3-support/src/main/flex/com/yarrcad/cgml/net/errors/PacketStackError.as

-package com.yarrcad.cgml.net.errors {
-
-public class PacketStackError extends Error {
-
-    public static const NO_PACKETS_AVALIABLE:String = "No packets avaliable";
-
-    public function PacketStackError(message:String) {
-        super(message);
-    }
-}
-
-}

lib/cgml-as3-support/src/main/flex/com/yarrcad/cgml/net/events/ConnectionEvent.as

-package com.yarrcad.cgml.net.events {
-
-import flash.events.Event;
-import flash.utils.ByteArray;
-
-public class ConnectionEvent extends Event {
-
-    public static const PACKET:String = "packet";
-
-    public var bytes:ByteArray;
-
-    public function ConnectionEvent(type:String, bytes:ByteArray, bubbles:Boolean = false, cancelable:Boolean = false) {
-        super(type, bubbles, cancelable);
-        this.bytes = bytes;
-    }
-}
-
-}

lib/cgml-as3-support/src/main/flex/com/yarrcad/cgml/option/OptionBool.as

-/*
- * This file is part of the CGML Compiler
- *
- * Copyright(c) 2010 Aleksey Fomkin <aleksey.fomkin@gmail.com>
- * http://bitbucket.org/yelbota/cgml-compiler
- *
- * This file may be licensed under the terms of of the
- * GNU General Public License Version 3 (the ``GPL'').
- *
- * Software distributed under the License is distributed
- * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
- * express or implied. See the GPL for the specific language
- * governing rights and limitations.
- *
- * You should have received a copy of the GPL along with this
- * program. If not, go to http://www.gnu.org/licenses/gpl.html
- * or write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-package com.yarrcad.cgml.option {
-
-public class OptionBool {
-  public var value:Boolean;
-
-  public function OptionBool(value:Boolean) {
-    this.value = value;
-  }
-}
-
-}

lib/cgml-as3-support/src/main/flex/com/yarrcad/cgml/option/OptionFloat.as

-/*
- * This file is part of the CGML Compiler
- *
- * Copyright(c) 2010 Aleksey Fomkin <aleksey.fomkin@gmail.com>
- * http://bitbucket.org/yelbota/cgml-compiler
- *
- * This file may be licensed under the terms of of the
- * GNU General Public License Version 3 (the ``GPL'').
- *
- * Software distributed under the License is distributed
- * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
- * express or implied. See the GPL for the specific language
- * governing rights and limitations.
- *
- * You should have received a copy of the GPL along with this
- * program. If not, go to http://www.gnu.org/licenses/gpl.html
- * or write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-package com.yarrcad.cgml.option {
-
-public class OptionFloat {
-  public var value:Number;
-
-  public function OptionFloat(value:Number) {
-    this.value = value;
-  }
-}
-
-}

lib/cgml-as3-support/src/main/flex/com/yarrcad/cgml/option/OptionInt.as

-/*
- * This file is part of the CGML Compiler
- *
- * Copyright(c) 2010 Aleksey Fomkin <aleksey.fomkin@gmail.com>
- * http://bitbucket.org/yelbota/cgml-compiler
- *
- * This file may be licensed under the terms of of the
- * GNU General Public License Version 3 (the ``GPL'').
- *
- * Software distributed under the License is distributed
- * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
- * express or implied. See the GPL for the specific language
- * governing rights and limitations.
- *
- * You should have received a copy of the GPL along with this
- * program. If not, go to http://www.gnu.org/licenses/gpl.html
- * or write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-package com.yarrcad.cgml.option {
-
-public class OptionInt {
-  public var value:int;
-
-  public function OptionInt(value:int) {
-    this.value = value;
-  }
-}
-
-}

lib/cgml-as3-support/src/test/flex/com/yarrcad/cgml/net/PacketStackTest.as

-package com.yarrcad.cgml.net {
-
-import flash.utils.ByteArray;
-
-import org.flexunit.asserts.assertFalse;
-import org.flexunit.asserts.assertTrue;
-
-public class PacketStackTest {
-
-    private static function v2b(v:Vector.<int>):ByteArray {
-        var ba:ByteArray = new ByteArray();
-        for each (var i:int in v)
-            ba.writeByte(i);
-        ba.position = 0;
-        return ba;
-    }
-
-    [Test]
-    public function testProcessData1():void {
-        var bytes:ByteArray = v2b(new <int>[0, 0]);
-        var o:PacketStack = new PacketStack();
-        o.processInput(bytes);
-
-        assertFalse("2 bytes is not packet.", o.size > 0);
-    }
-
-    [Test]
-    public function testProcessData4():void {
-        var bytes:ByteArray = v2b(new <int>[0, 0, 0, 0, 0, 0, 0, 0]);
-        var o:PacketStack = new PacketStack();
-        o.processInput(bytes);
-        assertTrue("There is must be two packet with zero length.", o.size == 2);
-    }
-
-    [Test]
-    public function testProcessData5():void {
-        var bytes:ByteArray = new ByteArray();
-        bytes.writeInt(2);
-        bytes.writeByte(0);
-        bytes.position = 0;
-
-        var o:PacketStack = new PacketStack();
-        o.processInput(bytes);
-
-        assertFalse("Packet length is 2 bytes, but 1 byte written.", o.size > 0);
-    }
-
-    [Test]
-    public function testProcessData6():void {
-        var bytes:ByteArray = new ByteArray();
-        bytes.writeInt(2);
-        bytes.writeShort(0);
-        bytes.position = 0;
-
-        var o:PacketStack = new PacketStack();
-        o.processInput(bytes);
-
-        assertTrue(
-                "Packet length is 2 bytes, and 2 byte written. This is correct packet",
-                o.size == 1 && o.take().length == 2
-        );
-    }
-
-    [Test]
-    public function testProcessDataBroken():void {
-
-        var o:PacketStack = new PacketStack();
-        var bytes:ByteArray = new ByteArray();
-        bytes.writeInt(7);
-        bytes.writeBytes(v2b(new <int>[1, 2, 3, 4, 5, 6])); // пакет не заканчивается
-        bytes.position = 0;
-
-        o.processInput(bytes);
-
-        bytes = new ByteArray()
-        bytes.writeByte(0); // добиваем первый пакет
-        bytes.writeInt(10);
-        bytes.writeByte(0); // второй пакет не заканчивается
-        bytes.position = 0;
-
-        o.processInput(bytes);
-
-        bytes = new ByteArray();
-        bytes.writeBytes(v2b(new <int>[2, 3, 4, 5, 6, 7, 8, 9, 0])); // добиваем второй пакет
-        bytes.position = 0;
-
-        o.processInput(bytes);
-
-        assertTrue(
-                "Two packets was sent in different times. Query works correctly ",
-                o.size == 2
-        );
-    }
-}
-
-}

lib/cgml-compiler-runner/pom.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>com.yarrcad.cg</groupId>
-        <artifactId>cgml-libs-aggregator</artifactId>
-        <version>1.0-SNAPSHOT</version>
-    </parent>
-    
-    <groupId>com.yarrcad.cgml</groupId>
-    <artifactId>cgml-compiler-runner</artifactId>
-    <version>1.1</version>
-    <packaging>maven-plugin</packaging>
-
-    <name>Maven Wrapper for CGML Compiler</name>
-    <url>http://bitbucket.org/yelbota/cgml-compiler</url>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.maven</groupId>
-            <artifactId>maven-plugin-api</artifactId>
-            <version>${maven.version}</version>
-        </dependency>
-        <dependency>
-          <groupId>org.apache.maven</groupId>
-          <artifactId>maven-project</artifactId>
-          <version>${maven.version}</version>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-plugin-plugin</artifactId>
-                <version>2.3</version>
-                <configuration>
-                    <goalPrefix>cgmlc</goalPrefix>
-                </configuration>
-            </plugin>
-            <plugin>
-              <artifactId>maven-compiler-plugin</artifactId>
-              <configuration>
-                <source>6</source>
-                <target>1.6</target>
-                <encoding>UTF-8</encoding>
-              </configuration>
-            </plugin> 
-        </plugins>
-    </build>
-</project>

lib/cgml-compiler-runner/src/main/java/com/yarrcad/cg/AS3CgmlMojo.java

-package com.yarrcad.cg;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * @goal as3
- * @phase generate-sources
- * @requiresDependencyResolution compile
- */
-@SuppressWarnings("UnusedDeclaration")
-public class AS3CgmlMojo extends AbstractCgmlcMojo {
-    public void execute() throws MojoExecutionException, MojoFailureException {
-        execute(OutputType.AS3);
-    }
-}

lib/cgml-compiler-runner/src/main/java/com/yarrcad/cg/AbstractCgmlcMojo.java

-/*
- * This file is part of the CGML Compiler
- *
- * Copyright(c) 2010 Aleksey Fomkin <aleksey.fomkin@gmail.com>
- * http://bitbucket.org/yelbota/cgml-compiler
- *
- * This file may be licensed under the terms of of the
- * GNU General Public License Version 3 (the ``GPL'').
- *
- * Software distributed under the License is distributed
- * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
- * express or implied. See the GPL for the specific language
- * governing rights and limitations.
- *
- * You should have received a copy of the GPL along with this
- * program. If not, go to http://www.gnu.org/licenses/gpl.html
- * or write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-package com.yarrcad.cg;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.project.MavenProject;
-
-import java.io.*;
-import java.util.List;
-import java.util.ArrayList;
-
-abstract class AbstractCgmlcMojo extends AbstractMojo {
-
-    public enum OutputType {
-
-        JAVA("-java"),
-        HAXE("-haxe"),
-        AS3("-as3");
-
-        private String type;
-
-        @Override
-        public String toString() {
-            return type;
-        }
-
-        OutputType(String s) {
-            type = s;
-        }
-    }
-
-    /**
-     * The Maven project.
-     *
-     * @parameter default-value="null" expression="${project}"
-     */
-    protected MavenProject project;
-
-    /**
-     * @parameter default-value="true"
-     */
-    protected boolean javaUseDouble;
-
-    /**
-     * @parameter
-     */
-    protected List<String> define;
-
-    /**
-     * @parameter
-     * @required
-     */
-    @SuppressWarnings({"UnusedDeclaration"})
-    protected File sourceDirectory;
-
-    /**
-     * @parameter default-value="${project.build.directory}/generated-sources/cgml"
-     * @required
-     */
-    @SuppressWarnings({"UnusedDeclaration"})
-    private File outputDirectory;
-
-    /**
-     * @parameter
-     */
-    @SuppressWarnings({"UnusedDeclaration"})
-    protected String modelPrefix;
-
-    protected void execute(OutputType type) throws MojoExecutionException, MojoFailureException {
-        Runtime runtime = Runtime.getRuntime();
-        List<String> cmd = new ArrayList<String>();
-
-        if (!outputDirectory.exists())
-            outputDirectory.mkdirs();
-
-        cmd.add("cgmlc");
-        cmd.add("-source");
-        cmd.add(sourceDirectory.getAbsolutePath());
-        cmd.add(type.toString());
-        cmd.add(outputDirectory.getAbsolutePath());
-
-        if (modelPrefix != null) {
-            cmd.add("--model-prefix");
-            cmd.add(modelPrefix);
-        }
-
-        if (javaUseDouble) {
-          cmd.add("--java-use-double");
-          cmd.add(modelPrefix);
-        }
-
-        if (define != null) {
-          for (String d: define) {
-            cmd.add("--define");
-            cmd.add(d);
-          }
-        } 
-        
-        try {
-            getLog().debug(cmd.toString());
-
-            // Convert cmd to native java array and execute it.
-            Process process = runtime.exec(cmd.toArray(new String[cmd.size()]));
-
-            if (process.waitFor() > 0) {
-                for (String err: readInputStream(process.getErrorStream()))
-                    getLog().error(err);
-
-                throw new MojoFailureException("CGML compiler error occurred.");
-            }
-
-            project.addCompileSourceRoot(outputDirectory.getAbsolutePath());
-
-        } catch (IOException e) {
-            // Oops. CGML not found.
-            String msg = "CGML Compiler doesn't installed " +
-                    "in your system. Visit " +
-                    "<http://bitbucket.org/yelbota/cgml-compiler> " +
-                    "to get instructions.";
-
-            getLog().error(new FileNotFoundException(msg));
-        } catch (InterruptedException e) {
-            e.printStackTrace();
-        }
-    }
-
-    /*public static void clearDirectory(File dir) {
-        if (dir.isDirectory()) {
-            for (File f: dir.listFiles()) {
-                if (f.getAbsolutePath().equals(dir.getAbsolutePath()))
-                    continue;
-
-                clearDirectory(f);
-                f.delete();
-            }
-        }
-        else dir.delete();
-    }*/
-
-    public static Iterable<String> readInputStream(InputStream s) {
-
-        ArrayList<String> out = new ArrayList<String>();
-
-        try {
-            BufferedReader reader = new BufferedReader(new InputStreamReader(s, "UTF-8"));
-            String line;
-
-
-            while ((line = reader.readLine()) != null)
-                out.add(line);
-
-        } catch (UnsupportedEncodingException e) {
-            e.printStackTrace();
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-
-        return out;
-    }
-}

lib/cgml-compiler-runner/src/main/java/com/yarrcad/cg/HaxeCgmlMojo.java

-package com.yarrcad.cg;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * @goal haxe
- * @phase generate-sources
- * @requiresDependencyResolution compile
- */
-@SuppressWarnings({"UnusedDeclaration"})
-public class HaxeCgmlMojo extends AbstractCgmlcMojo {
-    public void execute() throws MojoExecutionException, MojoFailureException {
-        execute(OutputType.HAXE);
-    }
-}

lib/cgml-compiler-runner/src/main/java/com/yarrcad/cg/JavaCgmlMojo.java

-/*
- * This file is part of the CGML Compiler
- *
- * Copyright(c) 2010 Aleksey Fomkin <aleksey.fomkin@gmail.com>
- * http://bitbucket.org/yelbota/cgml-compiler
- *
- * This file may be licensed under the terms of of the
- * GNU General Public License Version 3 (the ``GPL'').
- *
- * Software distributed under the License is distributed
- * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
- * express or implied. See the GPL for the specific language
- * governing rights and limitations.
- *
- * You should have received a copy of the GPL along with this
- * program. If not, go to http://www.gnu.org/licenses/gpl.html
- * or write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-package com.yarrcad.cg;
-
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-
-/**
- * @goal java
- * @phase generate-sources
- * @requiresDependencyResolution compile
- */
-@SuppressWarnings({"UnusedDeclaration"})
-public class JavaCgmlMojo extends AbstractCgmlcMojo {
-    public void execute() throws MojoExecutionException, MojoFailureException {
-        execute(OutputType.JAVA);
-    }
-}

lib/cgml-java-support/pom.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>com.yarrcad.cg</groupId>
-        <artifactId>cgml-libs-aggregator</artifactId>
-        <version>1.0-SNAPSHOT</version>
-    </parent>
-
-    <groupId>com.yarrcad.cg</groupId>
-    <artifactId>cgml-java-support</artifactId>
-    <version>1.2</version>
-    <packaging>jar</packaging>
-
-    <name>Java library for CGML support</name>
-    <url>http://bitbucket.org/yelbota/cgml-compiler</url>
-
-    <dependencies>
-        <dependency>
-            <groupId>org.yaml</groupId>
-            <artifactId>snakeyaml</artifactId>
-            <version>1.7</version>
-        </dependency>
-        <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
-            <version>4.8.2</version>
-            <scope>test</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>2.0</version>
-                <configuration>
-                    <source>1.6</source>
-                    <target>1.6</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
-</project>
-

lib/cgml-java-support/src/main/java/com/yarrcad/cg/ObjectStorage.java

-/*
- * This file is part of the CGML Compiler
- *
- * Copyright(c) 2010 Aleksey Fomkin <aleksey.fomkin@gmail.com>
- * http://bitbucket.org/yelbota/cgml-compiler
- *
- * This file may be licensed under the terms of of the
- * GNU General Public License Version 3 (the ``GPL'').
- *
- * Software distributed under the License is distributed
- * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
- * express or implied. See the GPL for the specific language
- * governing rights and limitations.
- *
- * You should have received a copy of the GPL along with this
- * program. If not, go to http://www.gnu.org/licenses/gpl.html
- * or write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-package com.yarrcad.cg;
-
-import java.util.HashMap;
-import java.util.Random;
-
-/**
- * Object storage is place, where readers and writers collect
- * declared objects.
- *
- * @author Aleksey Fomkin
- */
-@SuppressWarnings("unused")
-public final class ObjectStorage {
-
-    /**
-     * Object storage
-     */
-    private HashMap<Integer, Object> map = new HashMap<Integer, Object>();
-
-    /**
-     * Index of object storage. It needs for fast search ids by
-     * object values
-     */
-    private HashMap<Object, Integer> indexMap = new HashMap<Object, Integer>();
-
-    /**
-     * Initializtion map. Objects can exeists in storage, but in might
-     * be to initialized. When object pass initialization in puts in
-     * this map.
-     */
-    private HashMap<Object, Boolean> initMap = new HashMap<Object, Boolean>();
-
-    /**
-     * Parent object table, parent object can't be
-     * modified from here.
-     */
-    private ObjectStorage parent;
-
-    public ObjectStorage(ObjectStorage parent) {
-        this.parent = parent;
-    }
-
-    public ObjectStorage() {
-
-    }
-
-    /**
-     * @return Id for a new object.
-     */
-    public int generateId() {
-
-        Random random = new Random();
-
-        int id = random.nextInt();
-        while (getObjectExists(id))
-            id = random.nextInt();
-
-        return id;
-    }
-
-    /**
-     * Register new object in reference table.
-     *
-     * @param object new object.
-     * @return id of new object.
-     */
-    public int registerNewObject(Object object) {
-        int id = generateId();
-        registerObject(id, object);
-        return id;
-    }
-
-    /**
-     * Register any object in the reference table.
-     *
-     * @param id     object id
-     * @param object object
-     */
-    public void registerObject(int id, Object object) {
-        map.put(id, object);
-        indexMap.put(object, id);
-    }
-
-    /**
-     * @param object any object
-     * @return Id of object if it's allready registred.
-     */
-    public int getObjectId(Object object) throws ObjectNotRegistred {
-        if (parent != null) {
-            Integer id = indexMap.get(object);
-            if (id != null)
-                return id;
-        }
-
-        Integer id = indexMap.get(object);
-        if (id == null) {
-            throw new ObjectNotRegistred();
-        }
-        else return id;
-    }
-
-    public Object getObject(int id) {
-        if (parent != null && parent.getObjectExists(id))
-            return parent.getObject(id);
-        else return map.get(id);
-    }
-
-    public boolean getObjectExists(int id) {
-        if (parent != null)
-            return parent.getObjectExists(id) || map.containsKey(id);
-        else return map.containsKey(id);
-    }
-
-    public boolean getObjectExists(Object object) {
-        if (parent != null)
-            return parent.getObjectExists(object) || map.containsValue(object);
-        else return map.containsValue(object);
-    }
-
-    /**
-     * Check object marked as initialized.
-     *
-     * @param object object
-     * @return inializtion status.
-     */
-    public boolean getObjectInitialized(Object object) {
-        if (parent != null && getObjectExists(object))
-            return parent.getObjectInitialized(object);
-        else {
-            Boolean b = initMap.get(object);
-            return (b == null) ? false : b;
-        }
-    }
-
-    public void setObjectInitialized(Object object) {
-        if (parent != null && getObjectExists(object))
-            parent.setObjectInitialized(object);
-        else initMap.put(object, true);
-    }
-
-    public class ObjectNotRegistred extends Exception {
-    }
-}

lib/cgml-java-support/src/main/java/com/yarrcad/cg/rpc/AbstractSender.java

-package com.yarrcad.cg.rpc;
-
-import com.yarrcad.cg.ObjectStorage;
-
-public abstract class AbstractSender<T> {
-
-    private T serverInterface;
-    private ObjectStorage objectStorage;
-
-    protected T getServerInterface() {
-        return serverInterface;
-    }
-
-    protected ObjectStorage getObjectStorage() {
-        return objectStorage;
-    }
-
-    public AbstractSender(T serverInterface, ObjectStorage objectStorage) {
-        this.serverInterface = serverInterface;
-        this.objectStorage = objectStorage;
-    }
-
-}

lib/cgml-java-support/src/main/java/com/yarrcad/cg/rpc/PacketExchange.java

-package com.yarrcad.cg.rpc;
-
-public interface PacketExchange {
-    byte[] send(byte[] data);
-}

lib/cgml-java-support/src/main/java/com/yarrcad/cg/rpc/PacketExchangeAsync.java

-package com.yarrcad.cg.rpc;
-
-public interface PacketExchangeAsync {
-    void send(byte[] data, RawPacketHandler handler);
-}

lib/cgml-java-support/src/main/java/com/yarrcad/cg/rpc/PacketHandler.java

-package com.yarrcad.cg.rpc;
-
-public interface PacketHandler<T> {
-    void process(T packet);
-}

lib/cgml-java-support/src/main/java/com/yarrcad/cg/rpc/RawPacketHandler.java

-package com.yarrcad.cg.rpc;
-
-import java.io.IOException;
-
-public interface RawPacketHandler {
-    void process(byte[] packet) throws IOException;
-}

lib/cgml-java-support/src/main/java/com/yarrcad/cg/rpc/ServerInterface.java

-package com.yarrcad.cg.rpc;
-
-public interface ServerInterface {
-    PacketExchange startPacketExchange();
-}

lib/cgml-java-support/src/main/java/com/yarrcad/cg/rpc/ServerInterfaceAsync.java

-package com.yarrcad.cg.rpc;
-
-public interface ServerInterfaceAsync {
-    PacketExchangeAsync startPacketExchange();
-}

lib/cgml-java-support/src/main/java/com/yarrcad/cg/rpc/socket/PacketQueue.java

-package com.yarrcad.cg.rpc.socket;
-
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.util.LinkedList;
-
-public class PacketQueue extends LinkedList<byte[]> {
-
-	private byte[] buffer = new byte[0];
-	private int knownPacketLength = -1;
-
-	public void processInput(DataInputStream input) throws IOException {
-		if (knownPacketLength > -1) {
-			// We allready know packet length
-			// So lets read out.
-			int toRead = Math.min(input.available(), knownPacketLength - buffer.length);
-			byte[] newBuffer = new byte[buffer.length + toRead];
-			input.read(newBuffer, buffer.length, toRead);
-			System.arraycopy(buffer, 0, newBuffer, 0, buffer.length);
-			buffer = newBuffer;
-			// Check packet length
-			if (buffer.length >= knownPacketLength) {
-				// Yeha! Packet complete.
-				// Call user handler and reset the buffer.
-				add(buffer);
-				buffer = new byte[0];
-				knownPacketLength = -1;
-				processInput(input);
-			}
-		} else if (input.available() >= 4) {
-			// Can read length of packet
-			knownPacketLength = input.readInt();
-			processInput(input);
-		}
-	}
-}

lib/cgml-java-support/src/main/java/com/yarrcad/cg/yaml/MarkedError.java

-package com.yarrcad.cg.yaml;
-
-import org.yaml.snakeyaml.error.Mark;
-
-public class MarkedError {
-	private Mark mark;
-	private String message;
-	
-	public MarkedError(String message, Mark mark) {
-		this.message = message;
-		this.mark = mark;
-	}
-
-	public Mark getMark() {
-		return mark;
-	}
-
-	public String getMessage() {
-		return message;
-	}
-}

lib/cgml-java-support/src/main/java/com/yarrcad/cg/yaml/MarkedErrorException.java

-package com.yarrcad.cg.yaml;
-
-import org.yaml.snakeyaml.error.Mark;
-
-@SuppressWarnings("serial")
-public class MarkedErrorException extends Throwable {
-	private Mark mark; 
-	public Mark getMark() {
-		return mark;
-	}
-	
-	public MarkedErrorException(String message, Mark mark) {
-		super(message);
-		this.mark = mark;
-	}
-}

lib/cgml-java-support/src/main/java/com/yarrcad/cg/yaml/ReferenceWrongTypeException.java

-package com.yarrcad.cg.yaml;
-
-import org.yaml.snakeyaml.error.Mark;
-
-/**
- * Throws when reference and target field has incompatible types.
- */
-@SuppressWarnings("unused")
-public class ReferenceWrongTypeException extends MarkedErrorException {
-
-    public ReferenceWrongTypeException(String s, Mark mark) {
-        super(s, mark);
-    }
-}

lib/cgml-java-support/src/main/java/com/yarrcad/cg/yaml/YamlReferenceTable.java

-/*
- * This file is part of the CGML Compiler
- *
- * Copyright(c) 2010 Aleksey Fomkin <aleksey.fomkin@gmail.com>
- * http://bitbucket.org/yelbota/cgml-compiler
- *
- * This file may be licensed under the terms of of the
- * GNU General Public License Version 3 (the ``GPL'').
- *
- * Software distributed under the License is distributed
- * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
- * express or implied. See the GPL for the specific language
- * governing rights and limitations.
- *
- * You should have received a copy of the GPL along with this
- * program. If not, go to http://www.gnu.org/licenses/gpl.html
- * or write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
-
-package com.yarrcad.cg.yaml;
-
-import com.yarrcad.cg.ObjectStorage;
-import org.yaml.snakeyaml.error.Mark;
-
-import java.lang.reflect.Field;
-import java.util.LinkedList;
-import java.util.List;
-
-public class YamlReferenceTable {
-
-    /**
-     * Throws then reference is not found.
-     */
-    public class NoRefecenceException extends MarkedErrorException {
-        public NoRefecenceException(String s, Mark mark) {
-            super(s, mark);
-        }
-    }
-
-    private class YamlReference {
-
-        private Mark mark;
-        private Object object;
-        private String name;
-
-        public YamlReference(Object object, String name, Mark mark) {
-            this.object = object;
-            this.mark = mark;
-            this.name = name;
-        }
-    }
-
-    /**
-     * In the YAML readeds we have places, where declared objects are
-     * used. User can write invalid code and we must tell him about it.
-     */
-    private List<YamlReference> yamlReferenceList = new LinkedList<YamlReference>();
-
-    /**
-     * Object storage
-     */
-    private ObjectStorage objectStorage;
-
-    /**
-     * Constructor
-     * @param objectStorage true object table.
-     */
-    @SuppressWarnings("unused")
-    public YamlReferenceTable(ObjectStorage objectStorage) {
-        this.objectStorage = objectStorage;
-    }
-
-    /**
-     * Uses in generaged yaml readers. Adds reference declaration.
-     * @param object link to object from object storage.
-     * @param mark place in the YAML document
-     */
-    @SuppressWarnings("unused")
-    public void registerReference(Object object, String name, Mark mark) {
-        yamlReferenceList.add(new YamlReference(object, name, mark));
-    }
-
-    /**
-     * Reference validation.
-     * @throws NoRefecenceException Then object follow the reference is not initialized.
-     */
-    @SuppressWarnings("unused")
-    public void checkReferences() throws NoRefecenceException {
-        for (YamlReference reference : yamlReferenceList) {
-            // Check object is initialized
-            if (!objectStorage.getObjectInitialized(reference.object)) {
-                // If we don't know the name. It can't be but anyway lets check.
-                if (reference.name == null) {
-                    try {
-                        reference.name = "@" + objectStorage.getObjectId(reference.object);
-                    } catch (ObjectStorage.ObjectNotRegistred objectNotRegistred) {
-                        throw new RuntimeException("YAML reference to unknown object. Please contact with developers.");
-                    }
-                }
-                throw new NoRefecenceException(reference.name + " doesn't initialized.", reference.mark);
-            }
-        }
-    }
-}

lib/cgml-java-support/src/test/java/com/yarrcad/cg/rpc/socket/PacketIntegrityBufferTest.java

-package com.yarrcad.cg.rpc.socket;
-
-import org.junit.Test;
-
-import java.io.*;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-public class PacketIntegrityBufferTest {
-
-    @Test
-    public void testProcessData1() throws Exception {
-        byte[] bytes = new byte[] { 0, 0 };
-        PacketQueue o = new PacketQueue();
-        o.processInput(new DataInputStream(new ByteArrayInputStream(bytes)));
-
-        assertFalse("2 bytes is not packet.", o.size() > 0);
-    }
-
-    @Test
-    public void testProcessData4() throws Exception {
-        byte[] bytes = new byte[] { 0, 0, 0, 0, 0, 0, 0, 0 };
-        PacketQueue o = new PacketQueue();
-        o.processInput(new DataInputStream(new ByteArrayInputStream(bytes)));
-
-        assertTrue("There is must be two packet with zero length.", o.size() == 2);
-    }
-
-    @Test
-    public void testProcessData5() throws Exception {
-        ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream(2);
-        DataOutput dataOutput = new DataOutputStream(byteOutputStream);
-        dataOutput.writeInt(2);
-        dataOutput.writeByte(0);
-
-        byte[] bytes = byteOutputStream.toByteArray();
-        PacketQueue o = new PacketQueue();
-        o.processInput(new DataInputStream(new ByteArrayInputStream(bytes)));
-
-        assertFalse("Packet length is 2 bytes, but 1 byte written.", o.size() > 0);
-    }
-
-    @Test
-    public void testProcessData6() throws Exception {
-        ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream(2);
-        DataOutput dataOutput = new DataOutputStream(byteOutputStream);
-        dataOutput.writeInt(2);
-        dataOutput.writeShort(0);
-
-        byte[] bytes = byteOutputStream.toByteArray();
-        PacketQueue o = new PacketQueue();
-        o.processInput(new DataInputStream(new ByteArrayInputStream(bytes)));
-
-        assertTrue(
-                "Packet length is 2 bytes, and 2 byte written. This is corrent packet",
-                o.size() == 1 && o.get(0).length == 2
-        );
-    }
-
-    @Test
-    public void testProcessDataBroken() throws Exception {
-
-        PacketQueue o = new PacketQueue();
-
-        ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream(10);
-        DataOutput dataOutput = new DataOutputStream(byteOutputStream);
-        dataOutput.writeInt(7);
-        dataOutput.writeBytes("123456"); // пакет не заканчивается
-
-        byte[] bytes = byteOutputStream.toByteArray();
-        o.processInput(new DataInputStream(new ByteArrayInputStream(bytes)));
-
-        byteOutputStream = new ByteArrayOutputStream(6);
-        dataOutput = new DataOutputStream(byteOutputStream);
-        dataOutput.writeByte(0); // добиваем первый пакет
-        dataOutput.writeInt(10);
-        dataOutput.writeByte(0); // второй пакет не заканчивается
-
-        bytes = byteOutputStream.toByteArray();
-        o.processInput(new DataInputStream(new ByteArrayInputStream(bytes)));
-
-        byteOutputStream = new ByteArrayOutputStream(9);
-        dataOutput = new DataOutputStream(byteOutputStream);
-        dataOutput.writeBytes("234567890"); // добиваем второй пакет
-
-        bytes = byteOutputStream.toByteArray();
-        o.processInput(new DataInputStream(new ByteArrayInputStream(bytes)));
-
-        assertTrue(
-                "Two packets was sent in different times. Query works correctly ",
-                o.size() == 2
-        );
-    }
-
-}

lib/pom.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-		 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-		 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
-	<modelVersion>4.0.0</modelVersion>
-
-	<groupId>com.yarrcad.cg</groupId>
-	<artifactId>cgml-libs-aggregator</artifactId>
-	<version>1.0-SNAPSHOT</version>
-	<packaging>pom</packaging>
-
-	<licenses>
-		<license>
-			<name>GPL3</name>
-			<url>http://www.gnu.org/licenses/gpl.html</url>
-		</license>
-	</licenses>
-
-	<name>CGML Compiler Libraries</name>
-	<url>http://bitbucket.org/yelbota/cgml-compiler</url>
-
-	<properties>
-		<downloadSources>true</downloadSources>
-		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-		<maven.version>2.2.1</maven.version>
-		<flexmojos.version>4.0-RC1</flexmojos.version>
-		<flex.sdk.version>4.5.1.21328</flex.sdk.version>
-		<fp.version>10.0.0</fp.version>
-	</properties>
-
-	<developers>
-		<developer>
-			<name>Aleksey Fomkin</name>
-			<email>aleksey.fomkin@gmail.com</email>
-			<timezone>+3</timezone>
-		</developer>
-	</developers>
-
-	<modules>
-		<module>cgml-java-support</module>
-		<module>cgml-as3-support</module>
-        	<module>cgml-compiler-runner</module>
-	</modules>
-
-	<repositories>
-		<repository>
-			<id>flex-mojos-repository</id>
-			<url>http://repository.sonatype.org/content/groups/flexgroup/</url>
-			<releases>
-				<enabled>true</enabled>
-			</releases>
-			<snapshots>
-				<enabled>true</enabled>
-			</snapshots>
-		</repository>
-	</repositories>
-	<pluginRepositories>
-		<pluginRepository>
-			<id>flex-mojos-repository</id>
-			<url>http://repository.sonatype.org/content/groups/flexgroup/</url>
-			<releases>
-				<enabled>true</enabled>
-			</releases>
-			<snapshots>
-				<enabled>true</enabled>
-			</snapshots>
-		</pluginRepository>
-	</pluginRepositories>
-
-<distributionManagement>
-    <repository>
-        <id>Flexis maven repository-releases</id>
-        <name>Flexis maven repository-releases</name>
-        <url>http://artifactory.flexis.ru:8030/artifactory/flexis-local</url>
-    </repository>
-    <snapshotRepository>
-        <id>Flexis maven repository-snapshots</id>
-        <name>Flexis maven repository-snapshots</name>
-        <url>http://artifactory.flexis.ru:8030/artifactory/flexis-local</url>
-    </snapshotRepository>
-</distributionManagement>
-
-</project>