kaspersorensen / dotnet-maven-plugin Goto Github PK
View Code? Open in Web Editor NEWA Maven plugin for building dotnet projects based on project.json
License: Apache License 2.0
A Maven plugin for building dotnet projects based on project.json
License: Apache License 2.0
I have created pom.xml.
All my projects are getting build . At the end I get abve error.
Can you please share a sample project as where I need to mentioned the .csproj
With the latest .NET Core SDK it seems project.json is no longer the standard build file, but rather [projectname].csproj
This type of packaging should not perform dotnet publish
.
Hello,
I like this plugin ! ๐
can you please provide an example to package a library ?
Thank you!
I was looking using this plugin in trying to build this sample
https://github.com/MicrosoftEdge/MicrosoftEdge-Extensions-Demos/tree/master/SecureInput
I got stuck on the AppContainerExe and UniversalWindows UAP.
Seemed to be getting stuck on not finding xaml targets in dotnet folders, I think I found eventually that it is just not supported yet for dotnet core.
Seemed to be targeting older VS14 instead of VS15 (2017) but attempting to force version setting min didn't resolve. I didn't see anything for the plugin that would allow to specify, only setting in csproj.
Any hints?
Also tried migrating to new csproj format but couldn't get it to accept UAP build fully and SDKReference wasn't resolving.
It would be really handy for debugging purposes if the executed command lines (eg. dotnet build --flags..
etc) would be printed. To prevent spam during the build, perhaps only when run in debug mode (when Maven's -X
flag is specified).
Hello,
I made some progress, I am able to generate the dll file
However, I am getting "The target "pack" does not exist in the project."
I am not familiar with the .net environment, I looked online:
one of the solutions suggests adding the import project and creating a .sln file as well here.
I tried it as well but didn't work.
I attached my saref.csproj
any ideas?
Thank you for your help,
The ability to specify multiple frameworks would be really really helpful.
Hello
The src/test/java/org.eobjects.build.CsProjFileTest
is using indirectly the java.util.function.Predicate
which is only avalable starting from Java 1.8. Thus the project dotnet-maven-plugin_plugin
does not build.
Hi
When using a code generator of c# code like JavaCC
under maven
, the c# is by default located in target/generated-sources/javacc
, but the plugin does not seem to take this directory into account. So could the dotnet-maven-plugin check for c# code in the so called target directory or could be an options added to specify where are the c# code like sourceDirectory
for exmaple.
Hello,
Is there a way to pass the API KEY argument when pushing to a private myget repo?
Something similar to:
run ..\.nuget\nuget push *.nupkg <API_KEY> -Source https://www.myget.org/F/<FEED_NAME>/api/v2/package
I took a look at the code but not sure where to change in this class
Any suggestions?
Thank you
Coming from a Java world needing to do devops tooling for dotnet projects I am looking into using your plugin to make the projects easily usable with existing Java tooling, including the JIB maven plugin for creating and pushing docker images on hosts without docker.
"mvn clean install" on an existing "X" + "X_test" project gave me the following error. Is this a simple configuration issue or am I using the plugin incorrectly?
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eobjects.build:dotnet-maven-plugin:0.24:nuget-add (default-nuget-add) on project operationa-inforation-ms: Command [nuget add] failed!
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoFailureException: Command [nuget add] failed!
at org.eobjects.build.DotnetNugetAddMojo.execute (DotnetNugetAddMojo.java:43)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.IllegalStateException: Could not find NuGet package! ModuleDir=C:\Users\m86194\git\microsvc-operational-information\Operational_Information, PackageDir=C:\Users\m86194\git\microsvc-operational-information\Operational_Information\bin, PackOutput=bin
at org.eobjects.build.PluginHelper.getNugetPackage (PluginHelper.java:92)
at org.eobjects.build.DotnetNugetAddMojo.execute (DotnetNugetAddMojo.java:39)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
For example make these three examples:
Right now the pom.xml version gets inserted as a "suffix" instead of the * symbol in project.json.
Ideally the pom.xml version should somehow dictate the version that gets published by dotnet/nuget/project.json.
[ERROR] Failed to execute goal org.eobjects.build:dotnet-maven-plugin:0.23:nuget-add (default-nuget-add) on project csharp-sdk: Command [nuget add] failed!: Could not find NuGet package! ModuleDir=/Users/user/csharp-sdk/project.test, PackageDir=/Users/user/csharp-sdk/project.test/bin, PackOutput=bin -> [Help 1]
[INFO]
[INFO] --- dotnet-maven-plugin:0.24:restore (default-restore) @ activeDirectoryDotNetCoreLib --- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for CommonModules Integrated Security 0.0.2-SNAPSHOT: [INFO] [INFO] CommonModules Integrated Security .................. SUCCESS [ 0.012 s] [INFO] CommonModules Integrated Security Go Executable .... SUCCESS [ 6.560 s] [INFO] CommonModules Integrated Security Dynamic Library .. SUCCESS [ 7.807 s] [INFO] CommonModules Integrated Security DotNetCore Lib ... FAILURE [ 0.019 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 20.876 s [INFO] Finished at: 2019-07-17T16:31:43-06:00 [INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eobjects.build:dotnet-maven-plugin:0.24:restore (default-restore) on project activeDirectoryDotNetCoreLib: Could not find any directories with a project/build file. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn -rf :activeDirectoryDotNetCoreLib
Here is my pom.xml ....be gentle I just heard of maven about 2 weeks ago....
CommonModules Integrated Security DotNetCore Lib
Build and deploy
<version>0.0.2-SNAPSHOT</version>
<packaging>dotnet</packaging>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.beckman.particle.commonmodules</groupId>
<artifactId>integrated-security</artifactId>
<version>0.0.2-SNAPSHOT</version>
</parent>
<artifactId>activeDirectoryDotNetCoreLib</artifactId>
<properties>
<target.name>activeDirectoryGroupsDotNet${dynamicLib.extension}</target.name>
<rootPOM>${basedir}${file.separator}..${file.separator}</rootPOM>
</properties>
<build>
<sourceDirectory>${rootPOM}${file.separator}src${file.separator}main${file.separator}csharp</sourceDirectory>
<directory>${rootPOM}${file.separator}bin</directory>
<defaultGoal>Clean restore package</defaultGoal>
<finalName>${target.name}${final.extension}</finalName>
<plugins>
<plugin>
<groupId>org.eobjects.build</groupId>
<artifactId>dotnet-maven-plugin</artifactId>
<version>0.24</version>
<extensions>true</extensions>
<configuration>
<buildConfiguration>Release</buildConfiguration>
<buildEnabled>true</buildEnabled>
<cleanEnabled>true</cleanEnabled>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<preparationGoals>dotnet:update-versions</preparationGoals>
</configuration>
</plugin>
</plugins>
</build>
Version 0.24, new fsproj build files
Seems like neither the solution file .sln
nor the .fsproj
files are inspected. Error reported:
[ERROR] Failed to execute goal org.eobjects.build:dotnet-maven-plugin:0.24:restore (default-restore) on project FsSonarRunner: Could not find any directories with a project/build file. -> [Help 1]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.