public class JavaExtensionRulesCheckRegistrar implements CheckRegistrar {
@Override
public void register(RegistrarContext registrarContext) {
registrarContext.registerClassesForRepository(RulesList.REPOSITORY_KEY, Arrays.asList(checkClasses()),
Arrays.asList(testCheckClasses()));
}
/**
* Lists all the checks provided by the plugin
*/
public static Class extends JavaCheck>[] checkClasses() {
return new Class[] { ThreadLocalRemoveRule.class };
}
/**
* Lists all the test checks provided by the plugin
*/
public static Class extends JavaCheck>[] testCheckClasses() {
return new Class[] {};
}
}
Failed to execute goal com.mycila.maven-license-plugin:maven-license-plugin:1.10.b1:check (enforce-license-headers) on project threadlocal-plugins: Some files do not have the expected license header -> [H
elp 1]
出现这个错误是因为在打包时会检查每一个类的头部有没有用注释写一段东西,类似于这样:
This bundle contains Java Service Wrapper scripts and binaries version 3.2.3 from Tanukisoftware published
under the following license:
Copyright (c) 2001 Silver Egg Technology
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sub-license, and/or
sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
http://web.archive.org/web/20070622164715/wrapper.tanukisoftware.org/doc/english/license.html
public interface IStack<T> {
//元素出栈,并返回出栈元素
public T pop();
//元素入栈
public void push(T element);
//获取栈顶元素
public T peek();
//判断栈是否为空
public boolean isEmpty