JUnit扩展在Maven插件中的导出

huangapple 未分类评论50阅读模式
英文:

JUnit extension export in maven plugin

问题

我在一个Maven插件项目中创建了一个JUnit扩展,我想在另一个项目中使用这个插件和JUnit扩展,但我不知道如何导出和导入Maven插件和JUnit扩展的依赖。

我尝试像这样在另一个项目中导入 plugin

<plugins>
        ...
        <plugin>
			<groupId>com.project</groupId>
		    <artifactId>project-maven-plugin</artifactId>
		    <version>1.0-SNAPSHOT</version>
			<executions>
				<execution>				
					<goals>
						<goal>my-goal</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
   ...
</plugins>

但这并没有起作用。
谢谢您的帮助。

英文:

I created a JUnit extension in a maven plugin project and I want to use this plugin and the JUnit extension in another project, but I have no idea how can I export and import dependencies of the maven plugin and the JUnit extension.

I tried to import the plugin in other project like this

&lt;plugins&gt;
        ...
        &lt;plugin&gt;
			&lt;groupId&gt;com.project&lt;/groupId&gt;
		    &lt;artifactId&gt;project-maven-plugin&lt;/artifactId&gt;
		    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
			&lt;executions&gt;
				&lt;execution&gt;				
					&lt;goals&gt;
						&lt;goal&gt;my-goal&lt;/goal&gt;
					&lt;/goals&gt;
				&lt;/execution&gt;
			&lt;/executions&gt;
		&lt;/plugin&gt;
   ...
&lt;/plugins&gt;

But it is not working.
Thank you for the help

huangapple
  • 本文由 发表于 2020年6月5日 21:16:28
  • 转载请务必保留本文链接:https://java.coder-hub.com/62216242.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定