File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

recompile maven project

 
Rakesh Basani
Ranch Hand
Posts: 38
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys..

I am working on a spring maven project. Is it necessary to compile my project again if I change pom.xml. And exaplain the reason.


Thanks in advance
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your POM defines how a project is built. If you change it, typically you are changing something about how the projects gets built. Therefore it's only logical that you would rebuild the project (recompile) to reflect those changes.
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess it depends on the change that you made and what your end goal is.

Did you add a dependency? Then maybe. I assume that the project built and the tests ran without it, so adding it might not have that much of an impact. But if you are packing your project using the asembly plugin and you noted that that dependency was missing, then yes re-run the build so that it gets included in the package.

Did you change the artifact's description? Then only if you plan to regenerate the site would you need to build again.

Did you add or change a plugin? Then yes because you have changed how the project gets built.

Did you change the version number. Then maybe. If other projects are already referencing yoru artifact by the new number then yes you must rebuild. If not, then you don't have to.

I could go on, but you probably get the idea.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic