The simple answer is you can't. This is because you are deleting a file but those remaining files have not been modified. It is always a good idea to have a clean build once you delete a source file. So that obsolete class is not polluted you build.
On Tue, Mar 1, 2011 at 11:15 AM, jy hu <[email protected]> wrote: > Hi everyone, > > I met a problem in maven. for example , there is a project including 7 java > files. I will gain 7 class files after executing the Mvn compile in cmd. > and > then I deleted or removed a java file of all, the rest 6 java files had > not been changed in the project. I executed Mvn compile again, ' Nothing to > compile - all classes are up to date' was gaven. 7 class files which came > from the first time were in Class folder. I would have 6 new class files of > course If executing the Mvn clean before running the Mvn compile. > > So my question is how can I gain the new class every time without Mvn > clean. > Does any hint? many thanks! > > -- > ** > *Warm wishes,* > *Jaina(hu jun ying)* >
