Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

maven pass -xlint:all to compiler

 
Ranch Hand
Posts: 126
1
Monad Java Linux
  • Mark post as helpful
  • send pies
  • 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: 12419
269
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maven disables compiler warnings by default. This is the configuration you need:
 
Gerard Gauthier
Ranch Hand
Posts: 126
1
Monad Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Stephan.. That worked!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic