Tycho:maven工件,对应于活动目标平台中的p2可安装单元
假设我的目标文件中有这个条目(用作tycho构建中的活动目标):Tycho:maven工件,对应于活动目标平台中的p2可安装单元,maven,target,tycho,p2,artifact,Maven,Target,Tycho,P2,Artifact,假设我的目标文件中有这个条目(用作tycho构建中的活动目标): 我可以引用这个插件作为maven工件(使用maven依赖插件)吗?捆绑包的groupId/artifactId是什么 <project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <
我可以引用这个插件作为maven工件(使用maven依赖插件)吗?捆绑包的groupId/artifactId是什么
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>???</groupId>
<artifactId>javax.servlet</artifactId>
<version>3.0.0.v201112011016</version>
<type>???</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/alternateLocation</outputDirectory>
<destFileName>optional-new-name.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
[...]
</project>
[...]
org.apache.maven.plugins
maven依赖插件
2.8
复制
包裹
复制
???
javax.servlet
3.0.0.v201112011016
???
真的
${project.build.directory}/alternateLocation
可选-new-name.jar
[...]
在这个例子中,我尝试了很多组合,以取代???用一些有意义的东西
我总是遇到同样的错误:
[错误]无法执行目标
插件:maven依赖插件:2.8:copy(copy)on
项目**无法找到???:?的工件版本???在任何一种情况下
依赖项列表或在项目的依赖项管理中。->[帮助1]
非常感谢您的回答。Tycho使用合成groupId
p2将p2存储库中的捆绑依赖项注入Maven模型。eclipse插件
。使用这个groupId和bundle符号名作为artifactId,您应该能够从任何Maven插件引用p2依赖项
顺便说一句,通过添加maven dependency插件的目标,您可以看到注入的依赖项,例如,使用
mvn clean verify dependency:tree
我不得不使用“mvn verify dependency:tree”,因为使用您的命令,我得到“[错误]在当前项目和插件组中找不到前缀为“maven dependency plugin”的插件[org.apache.maven.plugins,org.codehaus.mojo]可从存储库[…]->[Help 1]”中获得。也许我的maven配置不正常。@Jmini我认为长版本和短版本都是一样的。但如果只有短版本有效,我会在答案中说明这一点。
<project>
[...]
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<id>copy</id>
<phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>???</groupId>
<artifactId>javax.servlet</artifactId>
<version>3.0.0.v201112011016</version>
<type>???</type>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/alternateLocation</outputDirectory>
<destFileName>optional-new-name.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
[...]
</project>