jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
Signup
Haus Chores
  • Haus Chores
  • HAUS-211

New Account Request

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Task Task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Account Creation
  • Labels:
    None
  • Environment:
    na
  • Number of attachments :
    0

Description

Hello My name is Alex Jackson and I work with some of your memebers at ThoughtWorks. I am currently working with Jon Tirsen on his build project. He suggested I request an account on codehaus. My preferred username is alex or ajackson. Here is my ssh2 key.

ssh-dss AAAAB3NzaC1kc3MAAACBAJhCNjOHyxb9LkY2U0O1h/YfkNoqVYy40HX826FNGyJH7Gtq4ZShfUPaHkoWGm2bs04I+h0OPm7Zh6SWqXVu6zXO2eFH0Scih+jzNRDZECmEgKaU0VvJQHJNJacEbf0//DRyRDh329j0MhrReVvtZAJViDV5bC+i/14/QQFWhTefAAAAFQCZyfxX4FcDzrXkZbmHGHAOw84hpwAAAIAKOFr2H8tWatwC3+eFUv4yzQjxHVtvAoznKrbogcnyWedeDDy6UWymNhJN0qQ4kuJRhoeZgFyyOvrlU+aSHRt2g9egWCCIwfdn/y2xKZPCI7VHclNp18C2Ru9u6RAwRjbVdETN4CHQJsMMhyn+nJb7I3pRRV6kdWIZlmI2W5cjVwAAAIBJh8Ng2ARIfbmyr4EafMQ3oMUDGgiDCZabsUHbCm+fNaMPim7fAz8XoLQv9U/MTuRNQKHQXWhfsWusHfbPfqQhWjFn6gPO/bvsSnc2Xgw4zugA9rxZlxj0CJw+IradhUl4okY+657dKQTXcQ4GxNR56VaBvQ6MKm4iSym2DWmWoA== ajackson@ZIPPY

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Aslak Hellesøy added a comment - 27/Oct/03 11:02 AM

Just out of curiosity: What Codehaus project are you referring to? Damagecontrol? Something else?

What are the features you have been working on? On IRC you mentioned something about a ruby-ant bridge. Any chance you could upload your code to DC's JIRA (if it is DC at all).

Aslak

Show
Aslak Hellesøy added a comment - 27/Oct/03 11:02 AM Just out of curiosity: What Codehaus project are you referring to? Damagecontrol? Something else? What are the features you have been working on? On IRC you mentioned something about a ruby-ant bridge. Any chance you could upload your code to DC's JIRA (if it is DC at all). Aslak
Hide
Permalink
Alex Jackson added a comment - 27/Oct/03 12:24 PM

I don't know the specifics about what project this is for. Jon just asked me if I could do this ruby -> ant bridge and then said to set an account here. Not sure what he is up to.

Show
Alex Jackson added a comment - 27/Oct/03 12:24 PM I don't know the specifics about what project this is for. Jon just asked me if I could do this ruby -> ant bridge and then said to set an account here. Not sure what he is up to.
Hide
Permalink
Aslak Hellesøy added a comment - 27/Oct/03 12:54 PM

I talked to Jon and it's not DamageControl. He's planning a new project that doesn't yet exist at Codehaus. It's a Ruby-Ant wrapper (shall we call it Rant?)

Jon is about to set up a Gems (small jewels) project for Various Ruby goodies. Rant will live here for starters.

Can we see some of the code that you're planning to commit? (You can attach it here or in Gems' JIRA when it's up.

Show
Aslak Hellesøy added a comment - 27/Oct/03 12:54 PM I talked to Jon and it's not DamageControl. He's planning a new project that doesn't yet exist at Codehaus. It's a Ruby-Ant wrapper (shall we call it Rant?) Jon is about to set up a Gems (small jewels) project for Various Ruby goodies. Rant will live here for starters. Can we see some of the code that you're planning to commit? (You can attach it here or in Gems' JIRA when it's up.
Hide
Permalink
Alex Jackson added a comment - 27/Oct/03 2:04 PM

The code I currently have is only "proof of concept" quality... meaning that in my view it is not ready to be commited. Here are some code snippets of the main parts. The parts that are left out are my own implementations of the apache ProjectHelperImpl xml parsing classes. (My custom ones are mostly the same but work on a stream rather than a file) If you want to see more let me know. (Also note package names are just placeholders) For this you should be able to see the idea. The Ruby Server is still under heavy work. Currently it is just a basic example to prove that the plumbing works.

<begin AntWrapper.java>

package org.codehaus.antserver;

import org.apache.tools.ant.Project;

import java.io.IOException;
import java.io.InputStream;

public class AntWrapper {

private Project project;
private InputStream inputStream;
private boolean running = false;
private Thread serverThread;

public AntWrapper(String projectName, String baseDirectory, InputStream inStream)

{ project = new Project(); project.setBasedir(baseDirectory); project.setName(projectName); project.init(); inputStream = inStream; }

public boolean isRunning()

{ return running; }

public void stop() {
running = false;
try

{ inputStream.close(); }

catch (IOException ioe)

{ ioe.printStackTrace(); }

}

public void start() {
running = true;

if (inputStream != null)

{ StreamProjectHelper projectHelper = new StreamProjectHelper(project, inputStream); serverThread = new Thread(projectHelper); serverThread.setName("AntServerThread"); serverThread.setDaemon(true); serverThread.setPriority(Thread.MAX_PRIORITY); Thread.currentThread().setPriority(Thread.MIN_PRIORITY); serverThread.start(); }

}
}

<end AntWrapper.java>

<begin AntWrapperTest.java>

package org.codehaus.antserver;

import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
import org.apache.tools.ant.filters.StringInputStream;

import java.io.File;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;

public class AntWrapperTest extends TestCase {

private String projectName = "TestProject";
private String baseDirectory = "./testproject";

protected void setUp() throws Exception {
super.setUp();
File testFile = new File("./testProject/testbuild/HelloWorld.class");
if (testFile.exists())

{ testFile.delete(); }

}

public AntWrapperTest() {
}

public AntWrapperTest(String name)

{ super(name); }

public void testStartAntServer()

{ AntWrapper antServer = new AntWrapper(projectName, baseDirectory,null); antServer.start(); assertTrue(antServer.isRunning()); antServer.stop(); }

public void testAntServerCompile() throws Exception

{ String xmlFragement = "<project><target name=\"compile\"> <javac srcdir=\"./test\" destdir=\"./testbuild\"/> </target></project>"; InputStream xmlInputStream = new StringInputStream(xmlFragement); AntWrapper antServer = new AntWrapper(projectName, baseDirectory,xmlInputStream); antServer.start(); assertExists("./testProject/testbuild/HelloWorld.class"); antServer.stop(); }

public void testSeveralTargets() throws Exception

{ PipedOutputStream outputStream = new PipedOutputStream(); InputStream xmlInputStream = new PipedInputStream(outputStream); OutputStreamWriter out = new OutputStreamWriter(outputStream); AntWrapper antServer = new AntWrapper(projectName,baseDirectory,xmlInputStream); antServer.start(); out.write("<project>"); out.write("<target name=\"makeDir\"> <mkdir dir=\"testDir\"/> </target>"); out.flush(); //Thread.currentThread().sleep(30); assertExists("./testProject/testDir"); out.write("<target name=\"deleteDir\"> <delete dir=\"testDir\"/> </target>"); out.flush(); //Thread.currentThread().sleep(30); assertNotExists("./testProject/testDir"); out.write("</project>"); out.close(); antServer.stop(); }

private void assertExists(String location) throws AssertionFailedError {
if (location == null || location.trim().length() == 0)

{ throw new AssertionFailedError("The location is null"); }

File locationFile = new File(location);
if (!locationFile.exists()) { throw new AssertionFailedError("The location " + locationFile.getAbsolutePath() + " does not exist"); }
}

private void assertNotExists(String location) throws AssertionFailedError {
if (location == null || location.trim().length() == 0) { throw new AssertionFailedError("The location is null"); }

File locationFile = new File(location);
if (locationFile.exists())

{ throw new AssertionFailedError("The location " + locationFile.getAbsolutePath() + " does exist"); }
}
}
<end AntWrapperTest.java>

<begin AntServer.java>

package org.codehaus.antserver;

import java.io.InputStream;

public class AntServer {

public static void main(String[] args) {

String projectName = null;
String baseDir = null;

if (args != null && args.length >= 2) { projectName = args[0]; baseDir = args[1]; }

if (projectName == null || baseDir == null) { System.out.println("You need to pass the projectName and the baseDir as arguments"); System.out.println("For example AntServer testProject ."); System.exit(1); }


InputStream in = System.in;

AntWrapper antWrapper = new AntWrapper(projectName,baseDir,in);

antWrapper.start();

while (antWrapper.isRunning()) {
try { Thread.currentThread().sleep(10); } catch (InterruptedException ie) { ie.printStackTrace(); System.exit(1); }
}

}
}

<end AntServer.java>

<start AntServer.java (warning hard coded paths)>

package org.codehaus.antserver;

import junit.framework.AssertionFailedError;
import junit.framework.TestCase;

import java.io.File;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;

public class AntServerTest extends TestCase {

public void setUp() throws Exception {
super.setUp();
File testDir = new File("./testProject/testDir");
File testDir2 = new File ("./testProject/testDir2");

if (testDir.exists()) { testDir.delete(); }

if (testDir2.exists()) { testDir2.delete(); }
}

public void testServer() throws Exception{
String[] args = {"testProject","."};

Runtime runtime = Runtime.getRuntime();

Process process = runtime.exec("java -cp C:\\.ideabuild\\antserver;C:\\IdeaProjects\\antserver\\lib\\ant.jar;C:\\IdeaProjects\\antserver\\lib\\xercesImpl.jar;C:\\IdeaProjects\\antserver\\lib
xml-apis.jar org.codehaus.antserver.AntServer testProject C:\\IdeaProjects\\AntServer
testProject");

Thread.currentThread().setPriority(Thread.MIN_PRIORITY);


OutputStreamWriter out = new OutputStreamWriter(process.getOutputStream());
InputStreamReader in = new InputStreamReader(process.getInputStream());
InputStreamReader err = new InputStreamReader(process.getErrorStream());



out.write("<project>");
out.write("<target name=\"makeDir\"> <mkdir dir=\"testDir\"/> </target>");
out.flush();


out.write("<target name=\"makeDir2\"> <mkdir dir=\"testDir2\"/> </target>");
out.flush();

out.write("</project>");

out.flush();



System.out.println("This is std out for the process");


while (in.ready()) { System.out.write(in.read()); }

System.out.println("This is std error for the process");

while (err.ready()) { System.out.write(err.read()); }


Thread.currentThread().sleep(10);

assertExists("/IdeaProjects/AntServer/testProject/testDir");
assertExists("/IdeaProjects/AntServer/testProject/testDir2");

process.destroy();

}

private void assertExists(String location) throws AssertionFailedError {
if (location == null || location.trim().length() == 0) { throw new AssertionFailedError("The location is null"); }

File locationFile = new File(location);
if (!locationFile.exists()) { throw new AssertionFailedError("The location " + locationFile.getAbsolutePath() + " does not exist"); }
}

private void assertNotExists(String location) throws AssertionFailedError {
if (location == null || location.trim().length() == 0) { throw new AssertionFailedError("The location is null"); }

File locationFile = new File(location);
if (locationFile.exists()) { throw new AssertionFailedError("The location " + locationFile.getAbsolutePath() + " does exist"); }

}

}

<end AntServerTest.java>

<begin AntServer.rb>

antServer = IO.popen("java -jar antserver.jar testProject testProject","w+");

antServer.sync = true

antServer.puts("<project>")
antServer.puts('<target name="compile"> <javac srcdir="./test" destdir="./testbuild"/> </target>')
antServer.puts("</project>")

antServer.close()

<end AntServer.rb>

Show
Alex Jackson added a comment - 27/Oct/03 2:04 PM The code I currently have is only "proof of concept" quality... meaning that in my view it is not ready to be commited. Here are some code snippets of the main parts. The parts that are left out are my own implementations of the apache ProjectHelperImpl xml parsing classes. (My custom ones are mostly the same but work on a stream rather than a file) If you want to see more let me know. (Also note package names are just placeholders) For this you should be able to see the idea. The Ruby Server is still under heavy work. Currently it is just a basic example to prove that the plumbing works. <begin AntWrapper.java> package org.codehaus.antserver; import org.apache.tools.ant.Project; import java.io.IOException; import java.io.InputStream; public class AntWrapper { private Project project; private InputStream inputStream; private boolean running = false; private Thread serverThread; public AntWrapper(String projectName, String baseDirectory, InputStream inStream) { project = new Project(); project.setBasedir(baseDirectory); project.setName(projectName); project.init(); inputStream = inStream; } public boolean isRunning() { return running; } public void stop() { running = false; try { inputStream.close(); } catch (IOException ioe) { ioe.printStackTrace(); } } public void start() { running = true; if (inputStream != null) { StreamProjectHelper projectHelper = new StreamProjectHelper(project, inputStream); serverThread = new Thread(projectHelper); serverThread.setName("AntServerThread"); serverThread.setDaemon(true); serverThread.setPriority(Thread.MAX_PRIORITY); Thread.currentThread().setPriority(Thread.MIN_PRIORITY); serverThread.start(); } } } <end AntWrapper.java> <begin AntWrapperTest.java> package org.codehaus.antserver; import junit.framework.AssertionFailedError; import junit.framework.TestCase; import org.apache.tools.ant.filters.StringInputStream; import java.io.File; import java.io.InputStream; import java.io.OutputStreamWriter; import java.io.PipedInputStream; import java.io.PipedOutputStream; public class AntWrapperTest extends TestCase { private String projectName = "TestProject"; private String baseDirectory = "./testproject"; protected void setUp() throws Exception { super.setUp(); File testFile = new File("./testProject/testbuild/HelloWorld.class"); if (testFile.exists()) { testFile.delete(); } } public AntWrapperTest() { } public AntWrapperTest(String name) { super(name); } public void testStartAntServer() { AntWrapper antServer = new AntWrapper(projectName, baseDirectory,null); antServer.start(); assertTrue(antServer.isRunning()); antServer.stop(); } public void testAntServerCompile() throws Exception { String xmlFragement = "<project><target name=\"compile\"> <javac srcdir=\"./test\" destdir=\"./testbuild\"/> </target></project>"; InputStream xmlInputStream = new StringInputStream(xmlFragement); AntWrapper antServer = new AntWrapper(projectName, baseDirectory,xmlInputStream); antServer.start(); assertExists("./testProject/testbuild/HelloWorld.class"); antServer.stop(); } public void testSeveralTargets() throws Exception { PipedOutputStream outputStream = new PipedOutputStream(); InputStream xmlInputStream = new PipedInputStream(outputStream); OutputStreamWriter out = new OutputStreamWriter(outputStream); AntWrapper antServer = new AntWrapper(projectName,baseDirectory,xmlInputStream); antServer.start(); out.write("<project>"); out.write("<target name=\"makeDir\"> <mkdir dir=\"testDir\"/> </target>"); out.flush(); //Thread.currentThread().sleep(30); assertExists("./testProject/testDir"); out.write("<target name=\"deleteDir\"> <delete dir=\"testDir\"/> </target>"); out.flush(); //Thread.currentThread().sleep(30); assertNotExists("./testProject/testDir"); out.write("</project>"); out.close(); antServer.stop(); } private void assertExists(String location) throws AssertionFailedError { if (location == null || location.trim().length() == 0) { throw new AssertionFailedError("The location is null"); } File locationFile = new File(location); if (!locationFile.exists()) { throw new AssertionFailedError("The location " + locationFile.getAbsolutePath() + " does not exist"); } } private void assertNotExists(String location) throws AssertionFailedError { if (location == null || location.trim().length() == 0) { throw new AssertionFailedError("The location is null"); } File locationFile = new File(location); if (locationFile.exists()) { throw new AssertionFailedError("The location " + locationFile.getAbsolutePath() + " does exist"); } } } <end AntWrapperTest.java> <begin AntServer.java> package org.codehaus.antserver; import java.io.InputStream; public class AntServer { public static void main(String[] args) { String projectName = null; String baseDir = null; if (args != null && args.length >= 2) { projectName = args[0]; baseDir = args[1]; } if (projectName == null || baseDir == null) { System.out.println("You need to pass the projectName and the baseDir as arguments"); System.out.println("For example AntServer testProject ."); System.exit(1); } InputStream in = System.in; AntWrapper antWrapper = new AntWrapper(projectName,baseDir,in); antWrapper.start(); while (antWrapper.isRunning()) { try { Thread.currentThread().sleep(10); } catch (InterruptedException ie) { ie.printStackTrace(); System.exit(1); } } } } <end AntServer.java> <start AntServer.java (warning hard coded paths)> package org.codehaus.antserver; import junit.framework.AssertionFailedError; import junit.framework.TestCase; import java.io.File; import java.io.InputStreamReader; import java.io.OutputStreamWriter; public class AntServerTest extends TestCase { public void setUp() throws Exception { super.setUp(); File testDir = new File("./testProject/testDir"); File testDir2 = new File ("./testProject/testDir2"); if (testDir.exists()) { testDir.delete(); } if (testDir2.exists()) { testDir2.delete(); } } public void testServer() throws Exception{ String[] args = {"testProject","."}; Runtime runtime = Runtime.getRuntime(); Process process = runtime.exec("java -cp C:\\.ideabuild\\antserver;C:\\IdeaProjects\\antserver\\lib\\ant.jar;C:\\IdeaProjects\\antserver\\lib\\xercesImpl.jar;C:\\IdeaProjects\\antserver\\lib xml-apis.jar org.codehaus.antserver.AntServer testProject C:\\IdeaProjects\\AntServer testProject"); Thread.currentThread().setPriority(Thread.MIN_PRIORITY); OutputStreamWriter out = new OutputStreamWriter(process.getOutputStream()); InputStreamReader in = new InputStreamReader(process.getInputStream()); InputStreamReader err = new InputStreamReader(process.getErrorStream()); out.write("<project>"); out.write("<target name=\"makeDir\"> <mkdir dir=\"testDir\"/> </target>"); out.flush(); out.write("<target name=\"makeDir2\"> <mkdir dir=\"testDir2\"/> </target>"); out.flush(); out.write("</project>"); out.flush(); System.out.println("This is std out for the process"); while (in.ready()) { System.out.write(in.read()); } System.out.println("This is std error for the process"); while (err.ready()) { System.out.write(err.read()); } Thread.currentThread().sleep(10); assertExists("/IdeaProjects/AntServer/testProject/testDir"); assertExists("/IdeaProjects/AntServer/testProject/testDir2"); process.destroy(); } private void assertExists(String location) throws AssertionFailedError { if (location == null || location.trim().length() == 0) { throw new AssertionFailedError("The location is null"); } File locationFile = new File(location); if (!locationFile.exists()) { throw new AssertionFailedError("The location " + locationFile.getAbsolutePath() + " does not exist"); } } private void assertNotExists(String location) throws AssertionFailedError { if (location == null || location.trim().length() == 0) { throw new AssertionFailedError("The location is null"); } File locationFile = new File(location); if (locationFile.exists()) { throw new AssertionFailedError("The location " + locationFile.getAbsolutePath() + " does exist"); } } } <end AntServerTest.java> <begin AntServer.rb> antServer = IO.popen("java -jar antserver.jar testProject testProject","w+"); antServer.sync = true antServer.puts("<project>") antServer.puts('<target name="compile"> <javac srcdir="./test" destdir="./testbuild"/> </target>') antServer.puts("</project>") antServer.close() <end AntServer.rb>
Hide
Permalink
bob mcwhirter added a comment - 28/Oct/03 9:33 AM

After chats with Aslak and Tirsen, we decided to just allow Alex to submit patches for the time being. If true developer access is required, this issue can be re-opened.

Show
bob mcwhirter added a comment - 28/Oct/03 9:33 AM After chats with Aslak and Tirsen, we decided to just allow Alex to submit patches for the time being. If true developer access is required, this issue can be re-opened.

People

  • Assignee:
    Unassigned
    Reporter:
    Alex Jackson
Vote (0)
Watch (0)

Dates

  • Created:
    27/Oct/03 10:45 AM
    Updated:
    28/Oct/03 9:33 AM
    Resolved:
    28/Oct/03 9:33 AM
  • Atlassian JIRA (v5.2.7#850-sha1:b2af0c8)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.