Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare for Release 1.0.0 #1

Merged
merged 18 commits into from
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/java-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Java CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'

- name: Build with Maven
run: mvn -B package --file pom.xml
4 changes: 2 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path

name: Maven Package
name: Maven Publish

on:
release:
Expand All @@ -21,7 +21,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
"java.configuration.updateBuildConfiguration": "automatic"
}
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) [![Java CI](https://github.com/Pera-Swarm/robot-library-java/actions/workflows/java-ci.yml/badge.svg)](https://github.com/Pera-Swarm/robot-library-java/actions/workflows/java-ci.yml) [![Maven Package](https://github.com/Pera-Swarm/robot-library-java/actions/workflows/maven-publish.yml/badge.svg)](https://github.com/Pera-Swarm/robot-library-java/actions/workflows/maven-publish.yml)

# java-swarm-node
# Robot Library (Java)

This is the Java Swarm Node Implementation for the project, *Pera-Swarm*
This is the Java Library Implementation of the Virtual Robots under, *Pera-Swarm*

More details will be updated soon.

---

## Local Environment Setup

If you need to run this repository on your local environment,
please create a file named *'mqtt.properties'* in path, *'./src/resources/config/'*
as follows and provide your MQTT broker's configurations.
If you need to run this repository on your local environment, please create a file named *'mqtt.properties'* in path, *'./src/resources/config/'* as follows and provide your MQTT Broker's configurations.

You can select any channel, as same as your simulation server runs on.
You can select any channel, as same as your [Simulation Server](https://github.com/Pera-Swarm/swarm-simulator) runs on.

```
```bash
server=127.0.0.1
port=1883
username=user
Expand Down
9 changes: 6 additions & 3 deletions node.iml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true"
type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
Expand All @@ -10,8 +11,10 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0" level="project" />
<orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0"
level="project" />
<orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1.1"
level="project" />
<orderEntry type="library" name="Maven: junit:junit:4.10" level="project" />
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
</component>
Expand Down
50 changes: 24 additions & 26 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,40 +1,34 @@
<?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">
<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>

<groupId>swarm.node</groupId>
<artifactId>swarm-node</artifactId>
<version>1.0.0-SNAPSHOT</version>
<groupId>pera.swarm</groupId>
<artifactId>java-robot</artifactId>
<version>0.9.1-SNAPSHOT</version>

<name>Pera-swarm</name>
<url>http://pera-swarm.github.io/</url>
<name>Pera-Swarm Java Node</name>
<url>https://github.com/Pera-Swarm/robot-library-java</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>

<!-- <distributionManagement>
<distributionManagement>
<repository>
<uniqueVersion>false</uniqueVersion>
<id>corp1</id>
<name>PeraSwarm-JavaNode</name>
<url>scp://repo/maven2</url>
<layout>default</layout>
<id>github</id>
<name>GitHub OWNER Apache Maven Packages</name>
<url>https://maven.pkg.github.com/Pera-Swarm/robot-library-java</url>
</repository>
</distributionManagement> -->

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub OWNER Apache Maven Packages</name>
<url>https://maven.pkg.github.com/Pera-Swarm/java-swarm-node</url>
</repository>
</distributionManagement>

<scm>
<developerConnection>scm:git:https://github.com/Pera-Swarm/robot-library-java.git</developerConnection>
<tag>HEAD</tag>
</scm>

<repositories>
<repository>
<id>Eclipse Paho Repo</id>
Expand Down Expand Up @@ -66,14 +60,17 @@
</resource>
</resources>

<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be
moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<!-- clean lifecycle, see
https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<!-- default lifecycle, jar packaging: see
https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
Expand All @@ -95,7 +92,8 @@
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<!-- site lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<!-- site lifecycle, see
https://maven.apache.org/ref/current/maven-core/lifecycles.html#site_Lifecycle -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
Expand All @@ -107,4 +105,4 @@
</plugins>
</pluginManagement>
</build>
</project>
</project>
22 changes: 22 additions & 0 deletions release.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#release configuration
#Fri Jul 28 22:04:29 IST 2023
projectVersionPolicyId=default
scm.rollbackCommitComment=@{prefix} rollback the release of @{releaseLabel}
remoteTagging=true
scm.commentPrefix=[maven-release-plugin]
releaseStrategyId=default
scm.branchCommitComment=@{prefix} prepare branch @{releaseLabel}
project.scm.pera.swarm\:java-robot.tag=HEAD
pinExternals=false
completedPhase=check-poms
scm.url=scm\:git\:https\://github.com/Pera-Swarm/robot-library-java.git
scm.developmentCommitComment=@{prefix} prepare for next development iteration
projectVersionPolicyConfig=<projectVersionPolicyConfig>${projectVersionPolicyConfig}</projectVersionPolicyConfig>\n
scm.tagNameFormat=@{project.artifactId}-@{project.version}
exec.activateProfiles=github
pushChanges=true
project.scm.pera.swarm\:java-robot.developerConnection=scm\:git\:https\://github.com/Pera-Swarm/robot-library-java.git
exec.snapshotReleasePluginAllowed=false
preparationGoals=clean verify
scm.releaseCommitComment=@{prefix} prepare release @{releaseLabel}
exec.pomFileName=pom.xml
3 changes: 1 addition & 2 deletions settings.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<activeProfiles>
<activeProfile>github</activeProfile>
Expand Down
30 changes: 30 additions & 0 deletions src/main/java/Robots/MyTestRobot.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package Robots;

import swarm.robot.VirtualRobot;

public class MyTestRobot extends VirtualRobot {

public MyTestRobot(int id, double x, double y, double heading) {
super(id, x, y, heading);
}

public void setup() {
System.out.println("My Test Robot Started");
super.setup();
}

public void loop() throws Exception {
super.loop();

if (state == robotState.RUN) {
System.out.println("Test");
delay(1000);
}
}

@Override
public void communicationInterrupt(String msg) {
System.out.println("communicationInterrupt on " + id + " with msg:" + msg);
}

}
75 changes: 0 additions & 75 deletions src/main/java/robotImplementations/ColorRippleRobot.java

This file was deleted.

Loading
Loading