I set up a working maven project with mvn archetype:create ...
I can compile all the sources with mvn compile
but I want to be able to compile also a single file at time.
There is a way to ask maven to compile an arbitrary single .java file?
Thanks
Updates 1:
I would specify the single file on the command line. I would choose the file at the moment of the command launch. I wouldn't modify the pom.xml.
Update 2:
Why I asked this? Because I would use autotest-java
with the Vim editor.
autotest-java
is an hack/extension of ZenTest (which is a Ruby application that automatically launch unit tests on every save of a Ruby file).
autotest-java
requires a maven project structure and requires that your editor/IDE perform "compile on save". In fact it doesn't recognize when a .java file is modified but instead it monitors for .class files for modifications.
I succesfully used autotest-java with Netbeans (which support "compile on save") but I would use it with Vim.