[openrtm-commit:00798] r285 - in trunk/rtmtools/tasktool: . .settings bin bin/aist lib src src/aist test
openrtm @ openrtm.org
openrtm @ openrtm.org
2012年 5月 22日 (火) 05:49:27 JST
Author: n-ando
Date: 2012-05-22 05:49:27 +0900 (Tue, 22 May 2012)
New Revision: 285
Added:
trunk/rtmtools/tasktool/.classpath
trunk/rtmtools/tasktool/.project
trunk/rtmtools/tasktool/.settings/
trunk/rtmtools/tasktool/.settings/org.eclipse.core.resources.prefs
trunk/rtmtools/tasktool/bin/
trunk/rtmtools/tasktool/bin/aist/
trunk/rtmtools/tasktool/bin/aist/ManifestTask.class
trunk/rtmtools/tasktool/build.xml
trunk/rtmtools/tasktool/lib/
trunk/rtmtools/tasktool/lib/ant.jar
trunk/rtmtools/tasktool/src/
trunk/rtmtools/tasktool/src/aist/
trunk/rtmtools/tasktool/src/aist/ManifestTask.java
trunk/rtmtools/tasktool/test/
trunk/rtmtools/tasktool/test/MANIFEST.MF
trunk/rtmtools/tasktool/test/build_test.xml
Log:
tasktool commit.
Added: trunk/rtmtools/tasktool/.classpath
===================================================================
--- trunk/rtmtools/tasktool/.classpath (rev 0)
+++ trunk/rtmtools/tasktool/.classpath 2012-05-21 20:49:27 UTC (rev 285)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="lib/ant.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/rtmtools/tasktool/.project
===================================================================
--- trunk/rtmtools/tasktool/.project (rev 0)
+++ trunk/rtmtools/tasktool/.project 2012-05-21 20:49:27 UTC (rev 285)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>tasktool</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/rtmtools/tasktool/.settings/org.eclipse.core.resources.prefs
===================================================================
--- trunk/rtmtools/tasktool/.settings/org.eclipse.core.resources.prefs (rev 0)
+++ trunk/rtmtools/tasktool/.settings/org.eclipse.core.resources.prefs 2012-05-21 20:49:27 UTC (rev 285)
@@ -0,0 +1,3 @@
+#Mon May 07 09:30:42 JST 2012
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
Added: trunk/rtmtools/tasktool/bin/aist/ManifestTask.class
===================================================================
(Binary files differ)
Property changes on: trunk/rtmtools/tasktool/bin/aist/ManifestTask.class
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/rtmtools/tasktool/build.xml
===================================================================
--- trunk/rtmtools/tasktool/build.xml (rev 0)
+++ trunk/rtmtools/tasktool/build.xml 2012-05-21 20:49:27 UTC (rev 285)
@@ -0,0 +1,23 @@
+<project name="tasktool" default="jar">
+ <property name="target.name" value="tasktool" />
+
+ <property name="dist.dir" value="jar" />
+ <property name="build.dir" value="bin" />
+ <property name="src.dir" value="src" />
+
+ <target name="clean">
+ <fileset dir="${build.dir}" includes="**/*.class" />
+ </target>
+
+ <target name="compile">
+ <javac srcdir="${src.dir}" destdir="${build.dir}" encoding="UTF-8" />
+ </target>
+
+ <target name="jar" depends="compile">
+ <mkdir dir="${dist.dir}" />
+ <jar destfile="${dist.dir}/${target.name}.jar">
+ <fileset dir="${build.dir}" />
+ </jar>
+ </target>
+
+</project>
Added: trunk/rtmtools/tasktool/lib/ant.jar
===================================================================
(Binary files differ)
Property changes on: trunk/rtmtools/tasktool/lib/ant.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/rtmtools/tasktool/src/aist/ManifestTask.java
===================================================================
--- trunk/rtmtools/tasktool/src/aist/ManifestTask.java (rev 0)
+++ trunk/rtmtools/tasktool/src/aist/ManifestTask.java 2012-05-21 20:49:27 UTC (rev 285)
@@ -0,0 +1,45 @@
+package aist;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import org.apache.tools.ant.BuildException;
+import org.apache.tools.ant.Task;
+
+public class ManifestTask extends Task {
+
+ String file;
+ String key;
+ String prop;
+
+ @Override
+ public void execute() throws BuildException {
+ try {
+ FileInputStream is = new FileInputStream(file);
+ Manifest mf = new Manifest(is);
+ Attributes attr = mf.getMainAttributes();
+ String value = attr.getValue(key);
+ if (value == null) {
+ value = "";
+ }
+ getProject().setUserProperty(prop, value);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void setFile(String file) {
+ this.file = file;
+ }
+
+ public void setKey(String key) {
+ this.key = key;
+ }
+
+ public void setProperty(String prop) {
+ this.prop = prop;
+ }
+
+}
Added: trunk/rtmtools/tasktool/test/MANIFEST.MF
===================================================================
--- trunk/rtmtools/tasktool/test/MANIFEST.MF (rev 0)
+++ trunk/rtmtools/tasktool/test/MANIFEST.MF 2012-05-21 20:49:27 UTC (rev 285)
@@ -0,0 +1,58 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: jp.go.aist.rtm.toolscommon; singleton:=true
+Bundle-Version: 1.1.0.rc3v20120215
+Bundle-ClassPath: .,
+ lib/commons-lang-2.2.jar
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Export-Package: OpenRTM,
+ RTC,
+ RTM,
+ _SDOPackage,
+ jp.go.aist.rtm.toolscommon,
+ jp.go.aist.rtm.toolscommon.adapterfactory,
+ jp.go.aist.rtm.toolscommon.corba,
+ jp.go.aist.rtm.toolscommon.extension,
+ jp.go.aist.rtm.toolscommon.factory,
+ jp.go.aist.rtm.toolscommon.manager,
+ jp.go.aist.rtm.toolscommon.model.component,
+ jp.go.aist.rtm.toolscommon.model.component.impl,
+ jp.go.aist.rtm.toolscommon.model.component.util,
+ jp.go.aist.rtm.toolscommon.model.core,
+ jp.go.aist.rtm.toolscommon.model.core.impl,
+ jp.go.aist.rtm.toolscommon.model.core.util,
+ jp.go.aist.rtm.toolscommon.model.manager,
+ jp.go.aist.rtm.toolscommon.model.manager.impl,
+ jp.go.aist.rtm.toolscommon.model.manager.util,
+ jp.go.aist.rtm.toolscommon.synchronizationframework,
+ jp.go.aist.rtm.toolscommon.synchronizationframework.mapping,
+ jp.go.aist.rtm.toolscommon.ui.dialog,
+ jp.go.aist.rtm.toolscommon.ui.perspective,
+ jp.go.aist.rtm.toolscommon.ui.propertysource,
+ jp.go.aist.rtm.toolscommon.ui.views.propertysheetview,
+ jp.go.aist.rtm.toolscommon.ui.workbenchadapter,
+ jp.go.aist.rtm.toolscommon.util,
+ jp.go.aist.rtm.toolscommon.validation,
+ org.apache.commons.lang,
+ org.apache.commons.lang.builder,
+ org.apache.commons.lang.enums,
+ org.apache.commons.lang.exception,
+ org.apache.commons.lang.math,
+ org.apache.commons.lang.mutable,
+ org.apache.commons.lang.text,
+ org.apache.commons.lang.time
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.ecore.xmi;visibility:=reexport,
+ org.eclipse.ui;visibility:=reexport,
+ org.eclipse.ui.views,
+ org.eclipse.core.runtime;visibility:=reexport,
+ org.eclipse.ui.editors;visibility:=reexport,
+ org.eclipse.core.resources;visibility:=reexport,
+ org.eclipse.ui.ide;visibility:=reexport,
+ jp.go.aist.rtm.toolscommon.profiles
+Bundle-ActivationPolicy: lazy
+Eclipse-BuddyPolicy: registered
+Bundle-Activator: jp.go.aist.rtm.toolscommon.ToolsCommonPlugin
Added: trunk/rtmtools/tasktool/test/build_test.xml
===================================================================
--- trunk/rtmtools/tasktool/test/build_test.xml (rev 0)
+++ trunk/rtmtools/tasktool/test/build_test.xml 2012-05-21 20:49:27 UTC (rev 285)
@@ -0,0 +1,14 @@
+<project name="tasktool" default="test">
+ <taskdef name="manifesttask" classname="aist.ManifestTask" classpath="../bin" />
+
+ <target name="test">
+ <antcall target="step1" />
+ <echo message="[${version}] expect [$${version}]" />
+ </target>
+
+ <target name="step1">
+ <manifesttask file="MANIFEST.MF" key="Bundle-Version" property="version" />
+ <echo message="[${version}] expect [1.1.0.rc3v20120215]" />
+ </target>
+
+</project>
More information about the openrtm-commit
mailing list