The @Deprecated annotation is supposed to be ignored if it occurs on a package declaration in a package-info.java file. It usually is, unless a javadoc comment with an @deprecated tag also appears on the same package declaration. Consider this package-info.java file:
========================================
/**
* @deprecated This is a deprecated package.
*/
@Deprecated
package com.example.foobar;
========================================
Compiling this results in the following:
package-info.java:5: error: modifier deprecated not allowed here
package com.example.foobar;
^
1 error