Skip to content

Commit

Permalink
Pom now deploys to mvn-repo; also restructured project and included tex
Browse files Browse the repository at this point in the history
manual.
  • Loading branch information
koenhindriks committed Jul 28, 2014
1 parent 00da335 commit 217f339
Show file tree
Hide file tree
Showing 13 changed files with 249 additions and 76 deletions.
19 changes: 14 additions & 5 deletions README.md
@@ -1,8 +1,17 @@
The Blocks World
===========
# The Blocks World

The Blocks World is a classic and famous toy domain in Artificial Intelligence.

Starting from an initial configuration of blocks the aim is to move blocks to a new goal configuration. Blocks are
instantaneously moved by means of a virtual gripper. A block can only be moved if there is no other block sitting
on top of it. A block can always be moved to the table.
Starting from an initial configuration of blocks the aim is to move blocks to a new goal configuration. Blocks are instantaneously moved by means of a virtual gripper. A block can only be moved if there is no other block sitting on top of it. A block can always be moved to the table.

## Releases

Releases can be found [here](https://github.com/eishub/blocksworld/releases) and include the Blocks World environment, a random generator for Block's World configurations, and a manual for the environment.

Releases can also be found in eishub's maven repository [here](https://github.com/eishub/mvn-repo/tree/master/eishub/blocksworld).

## Generate Jars from Source

Run `mvn clean install`

Run `mvn clean pre-site install` to also generate the pdf manual from the tex source.
183 changes: 158 additions & 25 deletions pom.xml
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>eishub</groupId>
<artifactId>blocksworld</artifactId>
<version>1.0.0</version>
<version>${version}</version>
<name>blocksworld</name>
<description>The classic Blocks World from AI with an interactive user interface.</description>
<url>http://github.com/eishub/blocksworld/</url>
Expand All @@ -21,10 +21,48 @@
</organization>

<properties>
<version>1.0.0</version>
<!-- main class reference elements for manifest -->
<main.class>BWEnvironment</main.class>
<main.class.package>eisinterface</main.class.package>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<github.global.server>github</github.global.server>
</properties>

<repositories>
<repository>
<id>eishub-mvn-repo</id>
<url>https://raw.github.com/eishub/mvn-repo/master</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>

<dependencies>
<dependency>
<groupId>apleis</groupId>
<artifactId>eis</artifactId>
<version>0.3</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.1</version>
</dependency>
</dependencies>

<distributionManagement>
<repository>
<id>internal.repo</id>
<name>Temporary Staging Repository</name>
<url>file://${project.build.directory}/mvn-repo</url>
</repository>
</distributionManagement>

<scm>
<!-- used by the buildnumber plugin -->
<connection>scm:git:https://github.com/eishub/blocksworld.git</connection>
</scm>

Expand All @@ -51,6 +89,63 @@
</items>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.5</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>${main.class.package}.${main.class}</mainClass>
</manifest>
</archive>
</configuration>
<!-- Yes I know: http://blog.sonatype.com/2010/01/how-to-create-two-jars-from-one-project-and-why-you-shouldnt/ -->
<!-- Right now, it's just not worth the effort and a pity to mess up the directory structure. -->
<!-- Perhaps we'll get back to this later. -->
<executions>
<!-- Generate the blocksworld.jar -->
<execution>
<id>blocksworld</id>
<goals><goal>jar</goal></goals>
<phase>package</phase>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>${main.class.package}.${main.class}</mainClass>
</manifest>
</archive>
<classifier>blocksworld</classifier>
<excludes>
<exclude>**/worldgenerator*</exclude>
</excludes>
</configuration>
</execution>
<!-- Generate the worldgenerator.jar -->
<execution>
<id>worldgenerator</id>
<goals><goal>jar</goal></goals>
<phase>package</phase>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>worldgenerator.RandomWorldGenerator</mainClass>
</manifest>
</archive>
<classifier>worldgenerator</classifier>
<excludes>
<exclude>**/eishub</exclude>
<exclude>**/environment</exclude>
</excludes>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
Expand All @@ -64,6 +159,7 @@
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
Expand All @@ -77,31 +173,68 @@
</execution>
</executions>
</plugin>
</plugins>
</build>

<repositories>
<repository>
<id>eis-releases</id>
<url>https://raw.github.com/eishub/eis/releases/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<plugin>
<!-- See: http://akquinet.github.io/maven-latex-plugin/ -->
<groupId>de.akquinet.jbosscc.latex</groupId>
<artifactId>maven-latex-plugin</artifactId>
<version>1.2</version>
<inherited>false</inherited>
<configuration>
<settings>
<!-- all tex main documents in this folder (including subfolders) will be processed -->
<texDirectory>${basedir}/src/main/latex</texDirectory>
<!-- the generated artifacts will be copied to ${project.build.directory}/doc -->
<outputDirectory>../doc</outputDirectory>
</settings>
</configuration>
<executions>
<execution>
<phase>pre-site</phase>
<goals>
<goal>latex</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
</configuration>
</plugin>

<plugin>
<groupId>com.github.github</groupId>
<artifactId>site-maven-plugin</artifactId>
<version>0.9</version>
<configuration>
<message>Maven artifacts for ${project.name} environment version ${project.version}</message> <!-- git commit message -->
<merge>true</merge>
<noJekyll>true</noJekyll> <!-- disable webpage processing -->
<outputDirectory>${project.build.directory}/mvn-repo</outputDirectory> <!-- matches distribution management repository url above -->
<branch>refs/heads/master</branch> <!-- remote branch name -->
<includes>
<include>**/*</include>
</includes>
<repositoryName>mvn-repo</repositoryName> <!-- github repo name -->
<repositoryOwner>eishub</repositoryOwner> <!-- github organization -->
<dryrun>true</dryrun>
</configuration>
<executions>
<!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
<execution>
<goals>
<goal>site</goal>
</goals>
<phase>deploy</phase>
</execution>
</executions>
</plugin>
</plugins>

<dependencies>
<dependency>
<groupId>apleis</groupId>
<artifactId>eis</artifactId>
<version>0.3</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.1</version>
</dependency>
</dependencies>
</build>

</project>
@@ -1,4 +1,4 @@
package nl.tudelft.blocksworld;
package eisinterface;

import java.io.File;
import java.io.FileNotFoundException;
Expand All @@ -9,9 +9,6 @@

import org.apache.commons.io.FilenameUtils;

import blocksworld.BlocksWorldModel;
import blocksworld.BlocksWorldPainter;
import blocksworld.Cube3D;
import eis.eis2java.environment.AbstractEnvironment;
import eis.exceptions.EntityException;
import eis.exceptions.ManagementException;
Expand All @@ -21,6 +18,9 @@
import eis.iilang.Numeral;
import eis.iilang.Parameter;
import eis.iilang.ParameterList;
import environment.BlocksWorldModel;
import environment.BlocksWorldPainter;
import environment.Cube3D;

/**
* EIS2Java layer for the 3D Blocks World environment.
Expand All @@ -42,7 +42,10 @@ public BWEnvironment() {

@Override
protected boolean isSupportedByEnvironment(Action action) {
return true;
if (action.getName().equals("move") && action.getParameters().size()==2) {
return true;
}
return false;
}

@Override
Expand All @@ -61,10 +64,12 @@ public void init(Map<String, Parameter> parameters)
.getValue().equals("true"))) {
gui = new BlocksWorldPainter(model);
}

// Try creating and registering an entity called gripper.
try {
registerEntity("gripper", new Gripper(model));
} catch (EntityException e) {
throw new ManagementException("failed to create new entity", e);
throw new ManagementException("Could not create a gripper", e);
}
}

Expand Down
@@ -1,14 +1,14 @@
package nl.tudelft.blocksworld;
package eisinterface;

import java.util.ArrayList;
import java.util.List;

import nl.tudelft.blocksworld.BWEnvironment;
import blocksworld.BlocksWorldModel;
import blocksworld.Cube3D;
import eis.eis2java.annotation.AsAction;
import eis.eis2java.annotation.AsPercept;
import eis.exceptions.ActException;
import eisinterface.BWEnvironment;
import environment.BlocksWorldModel;
import environment.Cube3D;

/**
* this is the EIS entity that is plugged into the EIS2Java environment.
Expand Down
@@ -1,4 +1,4 @@
package blocksworld;
package environment;

import java.util.ArrayList;
import java.util.Collection;
Expand Down
@@ -1,4 +1,4 @@
package blocksworld;
package environment;

/** BlocksWorld.java, version 1.11, December 9, 1998.
Applet for interactive blocks world.
Expand Down Expand Up @@ -32,7 +32,7 @@
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;

import nl.tudelft.blocksworld.BWEnvironment;
import eisinterface.BWEnvironment;

/**
* This is an educational example of object oriented design for a 3D graphics
Expand Down
@@ -1,4 +1,4 @@
package blocksworld;
package environment;

import java.util.prefs.Preferences;

Expand Down
@@ -1,4 +1,4 @@
package blocksworld;
package environment;

/** BlocksWorld.java, version 1.11, December 9, 1998.
Applet for interactive blocks world.
Expand Down
@@ -1,4 +1,4 @@
package blocksworld;
package environment;

/** BlocksWorld.java, version 1.11, December 9, 1998.
Applet for interactive blocks world.
Expand Down
@@ -1,4 +1,4 @@
package blocksworld;
package environment;

/** BlocksWorld.java, version 1.11, December 9, 1998.
Applet for interactive blocks world.
Expand Down
@@ -1,4 +1,4 @@
package blocksworld;
package environment;

/** BlocksWorld.java, version 1.11, December 9, 1998.
Applet for interactive blocks world.
Expand Down
@@ -1,4 +1,4 @@
package blocksworld;
package environment;

/** BlocksWorld.java, version 1.11, December 9, 1998.
Applet for interactive blocks world.
Expand Down

0 comments on commit 217f339

Please sign in to comment.