[英]Maven pom.xml in META-INF vs pom.xml in Maven repository
I'm trying to produce a Maven-compatible artefact using bazel . 我正在尝试使用bazel生成与Maven兼容的人工制品。 I noticed that
mvn
puts some files inside META-INF
directory in JAR archive ( file.jar/META-INF/maven/groupId/artifactId/pom.xml
and file.jar/META-INF/maven/groupId/artifactId/pom.properties
) 我注意到
mvn
将一些文件放在JAR存档中的META-INF
目录中( file.jar/META-INF/maven/groupId/artifactId/pom.xml
和file.jar/META-INF/maven/groupId/artifactId/pom.properties
)
Questions: 问题:
pom.xml
ref , which leads me to believe that you don't. pom.xml
ref中的配置选项禁用它们,这让我相信你没有。 mvn
in any case whatsoever? mvn
都使用它们吗? pom.xml
inside on the JAR instead of pom.xml
near my artifact in Maven repo? pom.xml
在瓶子内 ,而不是 pom.xml
靠近我在Maven的回购神器? We have several jars in your Maven repository that do not contain a pom.xml. 我们在Maven存储库中有几个不包含pom.xml的jar。 For maven, the revelant pom.xml is the one that is outside your artifact.
对于maven,重要的pom.xml是你工件之外的那个。 In Nexus, you deploy a jar always along with a pom.xml and that is the one that counts.
在Nexus中,您总是将一个jar与pom.xml一起部署,这就是重要的一个。
So you need to publish a pom.xml along with your jar if you want to use it from Maven, but you do not need to put it inside. 因此,如果要从Maven中使用它,则需要与jar一起发布pom.xml,但不需要将其放入其中。 AFAIK you cannot change this behaviour.
AFAIK你无法改变这种行为。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.