• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

kaspersorensen/dotnet-maven-plugin: A Maven plugin for building dotnet projects ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

kaspersorensen/dotnet-maven-plugin

开源软件地址(OpenSource Url):

https://github.com/kaspersorensen/dotnet-maven-plugin

开源编程语言(OpenSource Language):

Java 95.9%

开源软件介绍(OpenSource Introduction):

dotnet-maven-plugin

A Maven plugin for building dotnet projects based on .csproj or project.json files.

This plugin lets you use the power of Maven to drive .NET core builds.

Build Status: Linux

Features

  • Drives the invocation of dotnet and nuget command line tools for build, test, deploy of .NET core projects.
  • Runs unittests via dotnet test on projects that have a defined Test Runner.
  • Offers a mvn clean option which arguably is currently missing from the dotnet CLI tools.
  • Propagates versioning scheme from Maven parent to the .csproj or project.json files of the modules.
  • Supports two project layouts: A pom-per-dotnet-module or a single-pom-for-all-dotnet-modules approach. See example projects.
  • The plugin has Maven extensions, allowing it to be idiomatically bound to standard Maven phases by declaring certain packging types:
  • <packaging>dotnet</packaging> will bind relevant Maven phases for dotnet component and application projects, including dotnet pack, dotnet publish and dotnet nuget add.
    • If a <repository> element is defined in the projects configuration, dotnet nuget push is also bound to the mvn deploy phase.
  • <packaging>dotnet-library</packaging> will bind relevant Maven phases for dotnet class libraries, i.e. excluding dotnet publish.
  • <packaging>dotnet-test</packaging> will bind relevant Maven phases for dotnet test-only projects, including dotnet test.
  • <packaging>dotnet-integration-test</packaging> will bind Maven phase integration-test to dotnet test and Maven phase to verify to the gathering/evaluation of those results, allowing for post-integration-test clean-up tasks to take place exiting on test failures.
  • All above packaging types also have clean, restore, build bindings

Installing

The plugin leverages the dotnet (required) and nuget (optional) command line tools, which have to be installed prior to usage of the plugin.

The simples use-case it to simply define your project with the packaging type, dotnet and enabled it with a plugin in pom.xml like this:

<project>
  [...]
  <packaging>dotnet</packaging>

  [...]
  <build>
    <plugins>
      <plugin>
        <groupId>org.eobjects.build</groupId>
        <artifactId>dotnet-maven-plugin</artifactId>
        <version>0.24</version>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>
  [...]
</project>

Configuration

Should you want to, you can configure many aspects of the dotnet and nuget invocations. The following should provide a handy overview by example:

<plugin>
  <groupId>org.eobjects.build</groupId>
  <artifactId>dotnet-maven-plugin</artifactId>
  <version>0.23</version>
  <extensions>true</extensions>
  <configuration>
    <buildConfiguration>Release</buildConfiguration>
    <buildEnabled>true</buildEnabled>
    <cleanEnabled>true</cleanEnabled>
    <environment>
      <MY_ENVVAR_1>hello</MY_ENVVAR_1>
      <MY_ENVVAR_2>world</MY_ENVVAR_2>
    </environment>
    <integrationTestRunEnabled>true</integrationTestRunEnabled>
    <integrationTestVerifyEnabled>true</integrationTestVerifyEnabled>
    <nugetAddEnabled>true</nugetAddEnabled>
    <nugetAddSource>~/.nuget/Packages</nugetAddSource>
    <nugetPushEnabled>true</nugetPushEnabled>
    <packEnabled>true</packEnabled>
    <packOutput>bin</packOutput>
    <publishEnabled>true</publishEnabled>
    <publishOutput>bin/my-publish-output</publishOutput>
    <repository>https://path/to/repository</repository>
    <restoreEnabled>true</restoreEnabled>
    <testEnabled>true</testEnabled>
  </configuration>
</plugin>

Take a look at the Example projects for more inspiration.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
mojohaus/appassembler发布时间:2022-08-17
下一篇:
jruby/maven_gem: A RubyGems plugin (and a utility) to install Maven artifacts as ...发布时间:2022-08-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap