Permalink
Browse files

Some cleanups. Added small build script for Eclipse.

  • Loading branch information...
1 parent 7cfa30b commit 396a33a683d5c192020cdebea51101e190900bd0 @jawi committed May 16, 2011
Showing with 97 additions and 96 deletions.
  1. +1 −0 .gitignore
  2. +2 −0 build.sh
  3. +76 −0 eclipse/build.xml
  4. +2 −71 runner/pom.xml
  5. +11 −4 runner/src/main/java/nl/lxtreme/ols/runner/Runner.java
  6. +0 −6 rxtx/pom.xml
  7. +5 −15 test.util/pom.xml
View
1 .gitignore
@@ -1,5 +1,6 @@
*/felix-cache/
*/target/
+eclipse/run/
*/.DS_Store/
**/.project
**/.classpath
View
2 build.sh
@@ -1,3 +1,5 @@
#!/bin/sh
mvn -Dpackage.osx.skip=true $@
+cd ols.distribution/target
+unzip ols-v*-full.zip plugins/
View
76 eclipse/build.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="OLS IDE integration" default="noop" basedir=".">
+ <description>
+ provides some integration for IDEs like Eclipse
+ </description>
+
+ <property name="ols.base.dir" value="${basedir}/.." />
+ <property name="ols.ide.base.dir" value="${basedir}/run" />
+ <property name="ols.ide.plugin.target.dir" value="${ols.ide.base.dir}/plugins" />
+ <property name="ols.ide.fw.target.dir" value="${ols.ide.base.dir}/bin" />
+
+ <!-- PUBLIC TARGETS -->
+
+ <target name="build" depends="init" description="Sets up a project structure for running OLS">
+ <!-- extract distribution file to target directory -->
+ <unzip dest="${ols.ide.base.dir}">
+ <fileset refid="ols.distribution.tarball" />
+ <patternset>
+ <include name="**/bin/*.jar" />
+ <include name="**/plugins/*.jar" />
+ </patternset>
+ <cutdirsmapper dirs="1" />
+ </unzip>
+ <!-- copy the individual bundles as well -->
+ <copy todir="${ols.ide.plugin.target.dir}">
+ <fileset refid="ols.plugins" />
+ <cutdirsmapper dirs="2" />
+ </copy>
+ <!-- copy the configuration files as well -->
+ <copy todir="${ols.ide.plugin.target.dir}">
+ <fileset refid="ols.configfiles" />
+ <cutdirsmapper dirs="4" />
+ </copy>
+ </target>
+
+
+ <target name="run" description="Runs the client from the created structure.">
+ <java classname="nl.lxtreme.ols.runner.Runner" fork="true" failonerror="true">
+ <sysproperty key="nl.lxtreme.ols.bundle.dir" value="${ols.ide.plugin.target.dir}" />
+ <classpath>
+ <fileset dir="${ols.ide.fw.target.dir}">
+ <include name="*.jar" />
+ </fileset>
+ </classpath>
+ </java>
+ </target>
+
+
+ <target name="clean" description="Cleans the mess made earlier">
+ <delete dir="${ols.ide.base.dir}" failonerror="false" />
+ </target>
+
+ <!-- PRIVATE TARGETS -->
+
+ <target name="init">
+ <!-- searches for all latest greatest bundle files -->
+ <fileset dir="${ols.base.dir}" id="ols.plugins">
+ <include name="**/target/*.jar" />
+ </fileset>
+ <!-- searches for all configuration files -->
+ <fileset dir="${ols.base.dir}" id="ols.configfiles">
+ <include name="**/src/main/config/*.cfg" />
+ </fileset>
+ <!-- searches for the latest tarball matching '*.tar.gz' -->
+ <fileset dir="${ols.base.dir}/ols.distribution/target" id="ols.distribution.tarball">
+ <include name="*-full.zip" />
+ </fileset>
+ <!-- create target directories -->
+ <mkdir dir="${ols.ide.plugin.target.dir}" />
+ <mkdir dir="${ols.ide.fw.target.dir}" />
+ </target>
+
+ <target name="noop">
+ </target>
+
+</project>
View
73 runner/pom.xml
@@ -31,85 +31,16 @@
<artifactId>org.apache.felix.configadmin</artifactId>
<scope>runtime</scope>
</dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.log</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.prefs</artifactId>
- <scope>runtime</scope>
- </dependency>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>looks</artifactId>
<scope>runtime</scope>
</dependency>
- <dependency>
- <groupId>nl.lxtreme.ols</groupId>
- <artifactId>api</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>nl.lxtreme.ols</groupId>
- <artifactId>client</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>nl.lxtreme.ols</groupId>
- <artifactId>logging</artifactId>
- <scope>runtime</scope>
- </dependency>
<dependency>
<groupId>nl.lxtreme.ols</groupId>
- <artifactId>service.io</artifactId>
- <scope>runtime</scope>
+ <artifactId>util</artifactId>
+ <scope>provided</scope>
</dependency>
- <dependency>
- <groupId>nl.lxtreme.ols</groupId>
- <artifactId>org.rxtx</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>nl.lxtreme.ols</groupId>
- <artifactId>util</artifactId>
- </dependency>
- <dependency>
- <groupId>nl.lxtreme.ols.device</groupId>
- <artifactId>test</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>nl.lxtreme.ols.device</groupId>
- <artifactId>logicsniffer</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>nl.lxtreme.ols.tool</groupId>
- <artifactId>base</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>nl.lxtreme.ols.tool</groupId>
- <artifactId>i2c</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>nl.lxtreme.ols.tool</groupId>
- <artifactId>spi</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>nl.lxtreme.ols.tool</groupId>
- <artifactId>state</artifactId>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>nl.lxtreme.ols.tool</groupId>
- <artifactId>uart</artifactId>
- <scope>runtime</scope>
- </dependency>
</dependencies>
<build>
<plugins>
View
15 runner/src/main/java/nl/lxtreme/ols/runner/Runner.java
@@ -240,15 +240,22 @@ private static String getPluginDir() throws IOException
return pluginDir.getCanonicalPath();
}
- pluginDir = new File( "./plugins" );
+ String pluginProperty = System.getProperty( "nl.lxtreme.ols.bundle.dir", "./plugins" );
+ pluginDir = new File( pluginProperty );
if ( pluginDir.exists() && pluginDir.isDirectory() )
{
return pluginDir.getCanonicalPath();
}
+ else
+ {
+ pluginDir = new File( pluginDir, "plugins" );
+ if ( pluginDir.exists() && pluginDir.isDirectory() )
+ {
+ return pluginDir.getCanonicalPath();
+ }
+ }
- String pluginProperty = System.getProperty( "nl.lxtreme.ols.bundle.dir", "./plugins" );
- pluginDir = new File( pluginProperty );
- return pluginDir.getCanonicalPath();
+ throw new RuntimeException( "Failed to find plugins folder! Is '-Dnl.lxtreme.ols.bundle.dir' specified?" );
}
/**
View
6 rxtx/pom.xml
@@ -42,12 +42,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <type>jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam</artifactId>
<version>1.2.3</version>
View
20 test.util/pom.xml
@@ -12,11 +12,11 @@
<version>1.1.0</version>
<name>OLS Testing Utilities</name>
<dependencies>
- <dependency>
- <groupId>nl.lxtreme.ols</groupId>
- <artifactId>api</artifactId>
- <scope>compile</scope>
- </dependency>
+ <dependency>
+ <groupId>nl.lxtreme.ols</groupId>
+ <artifactId>api</artifactId>
+ <scope>compile</scope>
+ </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -27,16 +27,6 @@
<artifactId>mockito-all</artifactId>
<scope>compile</scope>
</dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.core</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.compendium</artifactId>
- <scope>compile</scope>
- </dependency>
</dependencies>
<build>
<plugins>

0 comments on commit 396a33a

Please sign in to comment.