• 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
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

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: 13248
291
  • 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!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic