[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :flume-ng-elasticsearch-sink
重点是上述红色标记的地方,因为最近项目要从nginx获取数据实时导入到elasticsearch中,flume自带的elasticsearch-sink不能满足我们要求,所以要自定义。在里面flume-ng-elasticsearch-sink中新增了一些类和测试配置文件,本想重新打包发布的。可以一maven打包就报上述异常。
解决办法:
配置文件第一行加如下内容:
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. #
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */
请看根目录的pom配置:
<groupId>org.apache.rat</groupId> <artifactId>apache-rat-plugin</artifactId> <version>0.7</version> <executions> <execution> <id>verify.rat</id> <phase>verify</phase> <goals> <goal>check</goal> </goals> <configuration> <excludes> <exclude>**/.idea/</exclude> <exclude>**/*.iml</exclude> <exclude>**/nb-configuration.xml</exclude> <exclude>.git/</exclude> <exclude>patchprocess/</exclude> <exclude>.gitignore</exclude> <!-- ASF jenkins box puts the Maven repo in our root directory. --> <exclude>.repository/</exclude> <exclude>**/*.diff</exclude> <exclude>**/*.patch</exclude> <exclude>**/*.avsc</exclude> <exclude>**/*.avro</exclude> <exclude>**/docs/**</exclude> <exclude>**/test/resources/**</exclude> <exclude>**/.settings/*</exclude> <exclude>**/.classpath</exclude> <exclude>**/.project</exclude> <exclude>**/target/**</exclude> <exclude>**/derby.log</exclude> <exclude>**/metastore_db/</exclude> </excludes> </configuration> </execution> </executions>