- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
编辑
好的,我现在可以更具体一些:
我的 scr/main/resources 中有一个文件夹 META-INF,其中包含 services/javax.annotation.processing.Processor
我的 pom 还是一样(有注释)。如果我执行“mvn clean install”,输出 jar 将只包含 META-INF 文件夹。
但是如果我重命名文件夹 services,输出 jar 包含我的类和 META-INF 文件夹以及新重命名的文件夹及其内容。
我有 - 我想 - 对于普通 maven2 用户来说是一个简单的问题。我有一个简单的子项目的简单 pom
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>aida</groupId>
<version>0.0.1-SNAPSHOT</version>
<artifactId>aida-annotationProcessors</artifactId>
<packaging>jar</packaging>
<name>AIDA Annotation Processors</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
<!-- <resources> -->
<!-- <resource> -->
<!-- <directory>src/main/resources/services</directory> -->
<!-- <targetPath>META-INF/services</targetPath> -->
<!-- </resource> -->
<!-- </resources> -->
</build>
<dependencies>
</dependencies>
</project>
我的目标很简单:我只想将我的 src/main/resources/services/javax.annotation.processing.Processor 文件复制到我生成的 jar 的 {root}/META-INF/services 文件夹中。
但是如果我取消注释资源部分,我的 jar 将只包含一个没有类的 META-INF 文件夹!
你能帮帮我吗?
最佳答案
这是 Maven 编译器插件中的错误/功能。
http://jira.codehaus.org/browse/MCOMPILER-97
解决方法是为包含处理器的项目禁用注释处理,-proc:none。
关于maven-2 - Maven 将 src/main/resources/services 文件夹复制到/META-INF,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10320078/
我最近发现了 python 中的元类。 基本上,python 中的元类是创建类的类。有很多有用的理由可以解释为什么要这样做——例如任何类型的类初始化。在工厂上注册类、复杂的属性验证、改变继承的工作方式
我已经从 Intellij 为 Spark+ scala 代码创建了 jar 并尝试在开发集群中运行该 jar,但最终出现以下错误: Exception in thread "main" java.l
我看到许多 Web 开发人员包含在标签中 我不明白这个元标记的目的是什么 最佳答案 它可能用于旨在增加 SEO 的 schema.org 微格式。 “Schema.org 提供了一组共享词汇,网
当我尝试使用 Java(在 GAE 服务器中)解析 XML 文件时,有时会遇到以下错误: Parse: org.xml.sax.SAXParseException; lineNumber: 10; c
我正在尝试解释 Web 应用程序的基础知识。我在 META-INF 和 WEB-INF 上遇到了这个问题。这些目录是如何获得这些名称的? 最佳答案 Jar 文件实际上是 ZIP 文件,带有额外的信息和
w3C验证器可以很好地使用以下代码: 如果我将property属性替换为name,则验证程序会说og:site_name未注册。 今天突然间,它显示了此错误: Error Line 7, Colum
安装vue-meta后,我的浏览器控制台出现错误。 为什么会出现这个错误?是我的代码还是bug?我正在使用 vue-meta@2.4.0和 Vue 3。 主文件 createApp(App) .u
我正在开发一个以通用模式运行 Nuxt 的网站。我们与另一位开发人员一起为此工作了几个月。我们使用 Git 在不同的分支上进行协作,然后在发布网站新版本时的某些时刻进行集成。 从昨天开始,我们遇到了一
根据这次更新... https://developers.facebook.com/blog/post/2013/06/19/platform-updates--new-open-graph-tags
如果元描述和元关键字相同,这对搜索引擎来说是否被认为是“坏的”? 最佳答案 元描述和元关键字标签并未被主要搜索引擎用作其排名算法的一部分,因此这个问题确实没有实际意义。 (该关键字通常被忽略,并被广泛
在 Django 中,很多东西都在 request.META 中,我当前的代码会检查 request.META 中的 HTTP_TOKEN 之类的东西,所以在发送请求时我需要将请求发送到该 url,以
在 Django 中,很多东西都在 request.META 中,我当前的代码会检查 request.META 中的 HTTP_TOKEN 之类的东西,所以在发送请求时我需要将请求发送到该 url,以
我正在构建一个 Wordpress 主题,我们将与 Yoast 一起构建所有的 SEO。 所以,我想知道如何在 index.php/category.php 和其他页面中从帖子中获取 Yoast Me
如何在资源管理器中隐藏这些文件?我尝试在 settings.json 中使用此代码: // Place your settings in this file to overwrite default
我有一个 Raspberry 4 型号 B,并试图从 Ubuntu 构建 Yocoto linux 以进行安装。我在关注 https://medium.com/@shantanoodesai/run-
我正在尝试将 XML 转换为 PDF 文档。使用 XSL 解析 XML 来生成用于 PDF 创建的 HTML。 HTML 不包含 结束标记,因此出现以下错误 Exception in thread
直接在 MongoDB 上运行以下文本搜索不会产生任何问题: db.getCollection('schools').find({ $text: { $search: 'som
一般来说,我是微观基准测试的新手。当我在我的项目中执行 JMH 任务时,我得到“错误:无法找到资源:/META-INF/BenchmarkList”,我相信是由 jmh-generator-annpr
有人可以帮我重新映射org-shiftmetaright | org-shiftmetaleft至[shift-select-meta]left-word | [shift-select-meta]r
我有一个 Android 应用程序,它使用 actionbarsherlock和库下的下一个 jar 文件夹: android-support-v4.jar gson-2.2.4.jar libGoo
我是一名优秀的程序员,十分优秀!