Automatically commit SVN with Java

I run many of my projects to work using

java name.java

I was wondering if there is a way to add a hook to it, where will it communicate with SVN after running this command?

Thank!

+3
source share
3 answers

Yes, Ant and Maven are preferable, but if you insist on doing it manually:

Linux: java Some.java && svn commit -m "baz" [..other args]

Windows: java Some.java & svn commit [..args]

+1
source

Unable to attach java executable itself.

, Ant Maven ( make) - , , , , ... .

+2

shutdownHook Java-,

Runtime.getRuntime().addShutdownHook(new Thread() {
  ....do something...
}

... , ...

, , , ? ?

0

Source: https://habr.com/ru/post/1750309/


All Articles