Giter Site home page Giter Site logo

codenjoy-builder's Introduction

Codenjoy builder

Configuration

A project that brings together the Codenjoy server and several games of your choice. You can choose which games to run with the server with command.

mvn clean jetty:run-war -Pgame1,game,game3
OR
mvn clean jetty:run-war -DallGames

This is Codenjoy Maven repository. To select existing games type the following in your pom.xml file.

<repositories>
    <repository>
        <id>codenjoy-releases</id>
        <url>https://github.com/codenjoyme/codenjoy-repo/raw/master/snapshots</url>
    </repository>
</repositories>

Choose codenjoy server/engine/games version

<groupId>com.codenjoy</groupId>
<artifactId>codenjoy-builder</artifactId>
<!-- version for all codenjoy dependencies here -->
<version>SERVER_VERSION</version>

The latest version as of now

<properties>
    <codenjoy.version>1.0.27</codenjoy.version>
</properties>

If you want to add your new game - please do thing bellow. Add your game dependency.

<profiles>
    <!-- Games dependencies (put your game here - replace YOURGAME) -->
    <profile>
        <id>YOURGAME</id>
        <activation>
            <property>
                <name>allGames</name>
            </property>
        </activation>
        <properties>
            <exclude.YOURGAME>false</exclude.battlecity>
        </properties>
        <dependencies>
            <dependency>
                <groupId>${project.groupId}</groupId>
                <artifactId>YOURGAME-engine</artifactId>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </profile>

Add game resources part in plugin[maven-dependency-plugin].executions tag

<!-- Games resources (put your game here - replace YOURGAME) -->
<execution>
    <id>unpack-YOURGAME</id>
    <phase>compile</phase>
    <goals>
        <goal>unpack</goal>
    </goals>
    <configuration>
        <skip>${exclude.YOURGAME}</skip>
        <artifactItems>
            <artifactItem>
                <groupId>${project.groupId}</groupId>
                <artifactId>YOURGAME-engine</artifactId>
                <version>${project.version}</version>
                <type>jar</type>
                <overWrite>true</overWrite>
                <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
                <includes>resources/**/*,WEB-INF/classes/com/codenjoy/dojo/server/*</includes>
            </artifactItem>
        </artifactItems>
    </configuration>
</execution>

Then

mvn clean jetty:run-war -Pyourgame

You can add multiple games at the same time, and remove existing ones

Launch your project

To launch your project, run mvn -DMAVEN_OPTS=-Xmx1024m -Dmaven.test.skip=true clean jetty:run-war from the project builder's root If you create your own game, you should have it pre-installed by running mvn clean install from the project root. If you use a game kit that already exists, you don't have to do anything - the builder will retrieve the games from the remote repository for you.

Other materials

Fore more details, click here

codenjoy-builder's People

Contributors

codenjoyme avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.