ikvmnet / ikvm-maven

Support for adding dependencies on Maven artifacts to .NET projects, using IKVM.
MIT License
53 stars 5 forks source link

Build problem for package updated to 1.6.8/8.7.5 #59

Closed martin-honnen closed 7 months ago

martin-honnen commented 7 months ago

I have run into problems using my own package https://www.nuget.org/packages/SaxonHE12s9apiExtensions/ updated to use use IKVM 8.7.5 and IKVM.Maven.Sdk 1.6.8, I get build errors I can't explain or solve:

PS C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701> dotnet build --configuration Release
MSBuild-Version 17.9.6+a4ecab324 für .NET
  Wiederherzustellende Projekte werden ermittelt...
  Alle Projekte sind für die Wiederherstellung auf dem neuesten Stand.
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018: Unerwarteter Fehler bei der MavenReferenceItemImport-Aufgabe. [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018: System.ArgumentNullException->Microsoft.Build
.Framework.BuildException.GenericBuildTransferredExeption: Value cannot be null. (Parameter 'source') [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701
\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector) [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at IKVM.Maven.Sdk.Tasks.MavenReferenceItem
Metadata.Save(MavenReferenceItem item, ITaskItem task) in /_/src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemMetadata.cs:line 44 [C:\Users\marti\source\repos\Saxon
HE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at IKVM.Maven.Sdk.Tasks.MavenReferenceItem
Import.ToTaskItem(MavenReferenceItem item) in /_/src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemImport.cs:line 126 [C:\Users\marti\source\repos\SaxonHE12ApiTest20
24032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at System.Linq.Enumerable.SelectListIterat
or`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func) [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at System.Linq.Enumerable.SelectListIterat
or`2.ToArray() [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at IKVM.Maven.Sdk.Tasks.MavenReferenceItem
Import.Execute() in /_/src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemImport.cs:line 108 [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2
024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at Microsoft.Build.CommandLine.OutOfProcTa
skAppDomainWrapperBase.InstantiateAndExecuteTask(IBuildEngine oopTaskHostNode, LoadedType taskType, String taskName, String taskLocation, String taskFile, Int
32 taskLine, Int32 taskColumn, IDictionary`2 taskParams) [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]

Fehler beim Buildvorgang.

C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018: Unerwarteter Fehler bei der MavenReferenceItemImport-Aufgabe. [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018: System.ArgumentNullException->Microsoft.Build
.Framework.BuildException.GenericBuildTransferredException: Value cannot be null. (Parameter 'source') [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701
\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector) [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at IKVM.Maven.Sdk.Tasks.MavenReferenceItem
Metadata.Save(MavenReferenceItem item, ITaskItem task) in /_/src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemMetadata.cs:line 44 [C:\Users\marti\source\repos\Saxon
HE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at IKVM.Maven.Sdk.Tasks.MavenReferenceItem
Import.ToTaskItem(MavenReferenceItem item) in /_/src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemImport.cs:line 126 [C:\Users\marti\source\repos\SaxonHE12ApiTest20
24032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at System.Linq.Enumerable.SelectListIterat
or`2.Fill(ReadOnlySpan`1 source, Span`1 destination, Func`2 func) [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at System.Linq.Enumerable.SelectListIterat
or`2.ToArray() [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at IKVM.Maven.Sdk.Tasks.MavenReferenceItem
Import.Execute() in /_/src/IKVM.Maven.Sdk.Tasks/MavenReferenceItemImport.cs:line 108 [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2
024032701.csproj]
C:\Users\marti\.nuget\packages\ikvm.maven.sdk\1.6.8\buildTransitive\IKVM.Maven.Sdk.targets(38,9): error MSB4018:    at Microsoft.Build.CommandLine.OutOfProcTa
skAppDomainWrapperBase.InstantiateAndExecuteTask(IBuildEngine oopTaskHostNode, LoadedType taskType, String taskName, String taskLocation, String taskFile, Int
32 taskLine, Int32 taskColumn, IDictionary`2 taskParams) [C:\Users\marti\source\repos\SaxonHE12ApiTest2024032701\SaxonHE12ApiTest2024032701.csproj]
    0 Warnung(en)
    1 Fehler

Verstrichene Zeit 00:00:01.94

Doing this on Windows 11 x64.

Sample project is at https://github.com/martin-honnen/SaxonHE12ApiTest2024032701

Any insight as to what is wrong appreciated.

wasabii commented 7 months ago

Figured it out. The addition of Exclusions had an issue. When an existing POM file without exclusions was being parsed, it wasn't checking for null.

martin-honnen commented 7 months ago

Great, @wasabii coming to rescue, keep up the good work. Any idea whether I will encounter the same problem with the 8.8.0-pre.1 release?

wasabii commented 7 months ago

Yes. IT's a bug in ikvm-maven, not in IKVM. In fact I should move this there.