hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <http-as...@dubioso.net>
Subject [HttpCore-NIO] package rename + conversion instructions
Date Sat, 03 Feb 2007 18:14:24 GMT
Hi all,

I've changed the package names from nio.impl. to impl.nio.
Here are the instructions for converting your code, tested
on the HttpCore-NIO sources, tests, and examples. It's more
than a one-liner, since IO redirection for sed within a
find -exec command line is beyond my escaping skills ;-)

This works on Linux from a tcsh, and should be easy to apply
on other Linux/Unix shells. On Windows+Cygwin, the only
problem should be to make the shell skript an executable.
If you've got problems, replace the direct invocation of the
script with one of the shell, giving the script as argument.

Save the following into a text file named "mvnio.sh" and
make the file executable:
----- skript starts in next line -----
#!/bin/sh
echo mvnio: $1
mv -i $1 $1.orig
sed < $1.orig > $1 -e 's/org.apache.http.nio.impl/org.apache.http.impl.nio/g'
----- end of the script, don't forget the trailing newline -----

To convert your Java source code, go to the root directory
of your source tree and execute the command:
	find . -name \*.java -exec /path/to/mvnio.sh \{} \;
where /path/to/mvnio.sh is the absolute path to the script file
you created above. The .java files will be converted, and the
original file contents remains available as .java.orig

If something went wrong, the modified files can be restored
to the original contents as follows:
	find . -name \*.java -exec mv -vf \{}.orig \{} \;

hope that helps,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message