This week's giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP and have Lucian Maly on-line!
See this thread for details.
Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

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: 12825
279
  • 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!
 
If a regular clown is funny, then a larger clown would be funnier. Math. Verified by this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic