• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

maven pass -xlint:all to compiler

 
Ranch Hand
Posts: 127
2
Monad Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I can't get the maven's compile phase to display the warning below(Note: If I compile with javac -Xlint:all [path to NothingHere file] then I get the warning).


warning: [serial] serializable class NothingHere has no definition of serialVersionUID
final public class NothingHere extends Exception {



I tried updating the pom.xml with


But when I call mvn compile or package I get no warning message.. Any pointers?

Also: I'm using maven's quickstart.
 
Saloon Keeper
Posts: 14663
330
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maven disables compiler warnings by default. This is the configuration you need:
 
Gerard Gauthier
Ranch Hand
Posts: 127
2
Monad Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Stephan.. That worked!
 
reply
    Bookmark Topic Watch Topic
  • New Topic