You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Gareth Western <ga...@gmail.com> on 2006/03/23 12:02:51 UTC

Disable maven-proxy output

Sorry for this being slightly off topic, but can someone tell me how to
disable the ouput from maven-proxy?

I assume I just need to create a log4j.properties and put it somewhere in
the classpath but i'm not sure where to put it? Do I need to overwrite the
log4j.properties already contained within the maven-proxy-core jar file, or
will an external properties file take precedence?

Thanks,

Gareth

Re: Disable maven-proxy output

Posted by Thorsten Heit <th...@xtramind.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Gareth,

> Sorry for this being slightly off topic, but can someone tell me how to
> disable the ouput from maven-proxy?

If you don't need the output, you can redirect it to /dev/null. But for
security reasons I suggest to redirect it to files so you can check for
any errors.

I've written some short scripts to start/stop the proxy and to clean up
the logs:

$ cat start-proxy.sh
#!/bin/sh
echo "Starting Maven Proxy..."
JAVA_HOME=/usr/local/jdk1.5.0
nohup $JAVA_HOME/bin/java -jar maven-proxy-standalone-0.2-app.jar maven-proxy.properties 2>error.log 1>out.log &


$ cat clean-logs.sh
#!/bin/sh
cp /dev/null error.log
cp /dev/null out.log
cp /dev/null maven-proxy.velocity.log


$ cat stop-proxy.sh
#!/bin/sh
PROCID=`ps auxwww | grep maven-proxy | grep -v grep | sed -e 's:^heit *::g' -e 's: .*$::g'`
if [ ! -z "$PROCID" ]; then
echo "Killing process with id: $PROCID"
  kill $PROCID
else
  echo "Maven Proxy not running"
fi


Scripts running on a FreeBSD machine; on other OSes this should be a bit
different

I guess cleaning the logs should also work when the proxy is running.


HTH

Thorsten
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)

iD8DBQFEIoN9QvObkgCcDe0RAnRMAJ4gQtYscS3tFtDPLVbq8XazgTtNqQCguEF/
Ag+eXaOOMbeUgTH7+LKorYY=
=uumv
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org