Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added net6.0 target to Lucene.Net.Analysis.OpenNLP and changed to using MavenReference #892

Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
3a5e5dd
upgrade targets to target .net core 6, in addition to .net framework
laimis May 11, 2023
87fd563
update net 4.6 version
laimis May 11, 2023
93dbe5f
Lucene.Net.Tests.OpenNLP: Patched IDE behavior to use net48 when net4…
NightOwl888 May 14, 2023
67260bb
publish-test-results-for-test-projects.yml: Added support for net7.0 …
NightOwl888 May 14, 2023
4495865
.github/workflows: Regenerated to add net7.0 as a test framework for …
NightOwl888 May 14, 2023
d2e4503
.build/dependencies.props: Upgrade System.Memory to 4.5.5 to match IK…
NightOwl888 May 14, 2023
98dc38e
.build/dependencies.props: Bumped System.Runtime.CompilerServices.Uns…
NightOwl888 May 16, 2023
fbeeb02
Lucene.Net.csproj: Added direct dependency on System.Runtime.Compiler…
NightOwl888 May 16, 2023
0155ec6
Lucene.Net.Facet.csproj: Added explicit dependency on System.Memory f…
NightOwl888 May 16, 2023
af204a1
Lucene.Net.TestFramework.csproj: Added dependency on System.Text.Json…
NightOwl888 May 16, 2023
47f7608
upgrade targets to target .net core 6, in addition to .net framework
laimis May 11, 2023
4812657
Lucene.Net.Analysis.OpenNLP.csproj, .build/dependencies.props: Change…
NightOwl888 May 16, 2023
ab84c28
.build/dependencies.props: bumped IKVM to 8.7.3 and IKVM.Maven.Sdk to…
NightOwl888 Jan 12, 2024
fedcb53
Lucene.Net.Analysis.OpenNLP.csproj: Removed duplicate TargetFramework…
NightOwl888 Jan 12, 2024
3a39a6d
Lucene.Net.Analysis.OpenNLP: Changed target from net462 > net472, the…
NightOwl888 Jan 12, 2024
64f6c8d
Directory.Build.targets: Updated FEATURE_OPENNLP to be available on .…
NightOwl888 Jan 13, 2024
0c25237
Lucene.Net.Tests.AllProjects: Updated references so we can successful…
NightOwl888 Jan 13, 2024
5dd48e9
.build/dependencies.props: Added OpenNLP MavenReference version so it…
NightOwl888 Jan 13, 2024
57df67c
Lucene.Net.Analysis.OpenNLP: Added Maven dependency on org.osgi.core …
NightOwl888 Jan 13, 2024
95891bd
Lucene.Net.Analysis.OpenNLP: For now, making net472 conditional based…
NightOwl888 Jan 25, 2024
944d8c7
.build/dependencies.props: Reverted back to OpenNLP 1.9.1 because of …
NightOwl888 Jan 30, 2024
a334143
publish-nuget-packages.yml: Remove forward slash
NightOwl888 Jan 30, 2024
2a7bbc9
.build/dependencies.props: Bumped IKVM to 8.7.5
NightOwl888 Jan 31, 2024
e742bbb
Lucene.Net.Analysis.OpenNLP/overview.md: Added missing docs from Luce…
NightOwl888 Jan 31, 2024
79d4610
FEATURE: Lucene.Net.Analysis.Miscellaneous: Added TypeAsSynonymFilter…
NightOwl888 Feb 1, 2024
4e73b61
Lucene.Net.Analysis.Miscellaneous.TestTypeAsSynonymFilterFactory: Add…
NightOwl888 Feb 1, 2024
32d5cc9
Lucene.Net.Analysis.OpenNLP.overview.md: Corrected information about …
NightOwl888 Feb 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .build/TestReferences.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,4 @@
<PackageReference Include="NUnit" Version="$(NUnitPackageVersion)" />
<PackageReference Include="NUnit3TestAdapter" Version="$(NUnit3TestAdapterPackageVersion)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="$(SystemRuntimeCompilerServicesUnsafePackageVersion)" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,28 @@ steps:
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'

# Special case: Only supports net48
# Special case: Only supports net7.0, net6.0 and net48

- template: publish-test-results.yml
parameters:
testProjectName: 'Lucene.Net.Tests.Analysis.OpenNLP'
framework: 'net7.0' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
osName: '${{ parameters.osName }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'

- template: publish-test-results.yml
parameters:
testProjectName: 'Lucene.Net.Tests.Analysis.OpenNLP'
framework: 'net6.0' # Since condtions are not supported for templates, we check for the file existence within publish-test-results.yml
vsTestPlatform: '${{ parameters.vsTestPlatform }}'
osName: '${{ parameters.osName }}'
testResultsFormat: '${{ parameters.testResultsFormat }}'
testResultsArtifactName: '${{ parameters.testResultsArtifactName }}'
testResultsFileName: '${{ parameters.testResultsFileName }}'

- template: publish-test-results.yml
parameters:
testProjectName: 'Lucene.Net.Tests.Analysis.OpenNLP'
Expand Down
12 changes: 9 additions & 3 deletions .build/dependencies.props
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
<ICU4NLanguageDataPackageVersion>$(ICU4NPackageVersion)</ICU4NLanguageDataPackageVersion>
<ICU4NRegionDataPackageVersion>$(ICU4NPackageVersion)</ICU4NRegionDataPackageVersion>
<ICU4NTransliteratorPackageVersion>$(ICU4NPackageVersion)</ICU4NTransliteratorPackageVersion>
<IKVMPackageVersion>8.7.3</IKVMPackageVersion>
<IKVMMavenSdkPackageVersion>1.6.7</IKVMMavenSdkPackageVersion>
<J2NPackageVersion>2.0.0</J2NPackageVersion>
<LiquidTestReportsMarkdownPackageVersion>1.0.9</LiquidTestReportsMarkdownPackageVersion>
<MicrosoftAspNetCoreHttpAbstractionsPackageVersion>2.0.0</MicrosoftAspNetCoreHttpAbstractionsPackageVersion>
Expand Down Expand Up @@ -68,19 +70,23 @@
<NewtonsoftJsonPackageVersion>13.0.1</NewtonsoftJsonPackageVersion>
<NUnit3TestAdapterPackageVersion>3.17.0</NUnit3TestAdapterPackageVersion>
<NUnitPackageVersion>3.13.1</NUnitPackageVersion>
<OpenNLPNETPackageVersion>1.9.1.1</OpenNLPNETPackageVersion>
<RandomizedTestingGeneratorsPackageVersion>2.7.8</RandomizedTestingGeneratorsPackageVersion>
<SharpZipLibPackageVersion>1.4.2</SharpZipLibPackageVersion>
<Spatial4nPackageVersion>0.4.1.1</Spatial4nPackageVersion>
<SystemMemoryPackageVersion>4.5.4</SystemMemoryPackageVersion>
<SystemMemoryPackageVersion>4.5.5</SystemMemoryPackageVersion>
<SystemReflectionEmitPackageVersion>4.3.0</SystemReflectionEmitPackageVersion>
<SystemReflectionEmitILGenerationPackageVersion>4.3.0</SystemReflectionEmitILGenerationPackageVersion>
<SystemReflectionTypeExtensionsPackageVersion>4.3.0</SystemReflectionTypeExtensionsPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>5.0.0</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>6.0.0</SystemRuntimeCompilerServicesUnsafePackageVersion>
<SystemRuntimeInteropServicesRuntimeInformationPackageVersion>4.3.0</SystemRuntimeInteropServicesRuntimeInformationPackageVersion>
<SystemSecurityCryptographyXmlPackageVersion>6.0.1</SystemSecurityCryptographyXmlPackageVersion>
<SystemTextEncodingCodePagesPackageVersion>4.3.0</SystemTextEncodingCodePagesPackageVersion>
<SystemTextEncodingCodePagesPackageVersion Condition=" '$(TargetFramework)' == 'net461' ">5.0.0</SystemTextEncodingCodePagesPackageVersion>
<SystemTextJsonPackageVersion>6.0.6</SystemTextJsonPackageVersion>
<TimeZoneConverterPackageVersion>6.1.0</TimeZoneConverterPackageVersion>
</PropertyGroup>
<PropertyGroup Label="Maven Package Reference Versions">
<OpenNLPToolsMavenReferenceVersion>1.9.4</OpenNLPToolsMavenReferenceVersion>
<OSGICoreMavenReferenceVersion>4.2.0</OSGICoreMavenReferenceVersion>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion .github/workflows/Lucene-Net-Tests-Analysis-OpenNLP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
framework: [net48]
framework: [net7.0, net48]
platform: [x64]
configuration: [Release]
exclude:
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@
<DebugType>full</DebugType>
</PropertyGroup>

<!-- Features in .NET Framework 4.5+ but not in .NET Standard 2.0 -->
<!-- Features in .NET Framework 4.5+ and .NET 6.0+ but not in .NET Standard 2.0 or .NET Standard 2.1 -->
<!-- net461 is used to test .NET Standard 2.0, so we treat it like it is not part of this group -->
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4')) And '$(TargetFramework)' != 'net461'">
<PropertyGroup Condition=" ($(TargetFramework.StartsWith('net4')) And '$(TargetFramework)' != 'net461') Or $(TargetFramework.StartsWith('net6.')) Or $(TargetFramework.StartsWith('net7.'))">

<DefineConstants>$(DefineConstants);FEATURE_OPENNLP</DefineConstants>

Expand Down
15 changes: 11 additions & 4 deletions src/Lucene.Net.Analysis.OpenNLP/Lucene.Net.Analysis.OpenNLP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
<Import Project="$(SolutionDir).build/nuget.props" />

<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<!-- Currently, IKVM doesn't officially support building NetFX on anything but Windows, so we skip it for contributors who may be on various platforms.
We can remove the condition once that has been addressed. See: https://github.com/ikvmnet/ikvm-maven/issues/49 -->
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOsPlatform('Windows'))">$(TargetFrameworks);net472</TargetFrameworks>

<AssemblyTitle>Lucene.Net.Analysis.OpenNLP</AssemblyTitle>
<PackageTags>$(PackageTags);analysis;natural;language;processing;opennlp</PackageTags>
Expand All @@ -39,8 +42,6 @@
<RootNamespace>Lucene.Net.Analysis.OpenNlp</RootNamespace>
</PropertyGroup>



<ItemGroup>
<ProjectReference Include="..\dotnet\Lucene.Net.ICU\Lucene.Net.ICU.csproj" />
<ProjectReference Include="..\Lucene.Net\Lucene.Net.csproj" />
Expand All @@ -49,7 +50,13 @@

<ItemGroup>
<PackageReference Include="ICU4N" Version="$(ICU4NPackageVersion)" />
<PackageReference Include="OpenNLP.NET" Version="$(OpenNLPNETPackageVersion)" />
<PackageReference Include="IKVM" Version="$(IKVMPackageVersion)" />
<PackageReference Include="IKVM.Maven.Sdk" Version="$(IKVMMavenSdkPackageVersion)" />
</ItemGroup>

<ItemGroup>
<MavenReference Include="org.apache.opennlp:opennlp-tools" Version="$(OpenNLPToolsMavenReferenceVersion)" />
<MavenReference Include="org.osgi:org.osgi.core" Version="$(OSGICoreMavenReferenceVersion)" />
</ItemGroup>

</Project>
10 changes: 8 additions & 2 deletions src/Lucene.Net.Facet/Lucene.Net.Facet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@
<NoWarn>$(NoWarn);1591;1573</NoWarn>
</PropertyGroup>



<ItemGroup>
<ProjectReference Include="..\Lucene.Net.Join\Lucene.Net.Join.csproj" />
<ProjectReference Include="..\Lucene.Net.Queries\Lucene.Net.Queries.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Memory" Version="$(SystemMemoryPackageVersion)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="System.Memory" Version="$(SystemMemoryPackageVersion)" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="Lucene.Net.Tests.Facet" />
</ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions src/Lucene.Net.TestFramework/Lucene.Net.TestFramework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@
<PackageReference Include="RandomizedTesting.Generators" Version="$(RandomizedTestingGeneratorsPackageVersion)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<!-- This is a transitive dependency of Microsoft.Extensions.Configuration.Json and IKVM. It is just here to pin the version to avoid conflicts. -->
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonPackageVersion)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<Reference Include="System.IO.Compression" />
<Reference Include="System.Numerics" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,10 @@

</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net48' Or $(TargetFramework.StartsWith('net6.')) Or $(TargetFramework.StartsWith('net7.')) ">
<ProjectReference Include="..\Lucene.Net.Analysis.OpenNLP\Lucene.Net.Analysis.OpenNLP.csproj" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<Reference Include="System" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net461' ">
<Reference Include="System" />
</ItemGroup>

<Import Project="$(SolutionDir).build/TestReferences.Common.targets" />

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,21 @@
<Import Project="$(SolutionDir)TestTargetFramework.props" />

<PropertyGroup>
<TargetFrameworks></TargetFrameworks>
<TargetFramework>net48</TargetFramework>

<!-- Allow specific target framework to flow in from TestTargetFrameworks.props -->
<TargetFrameworks Condition=" '$(TargetFramework)' == '' ">net7.0;net6.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(TargetFramework)' == '' AND $([MSBuild]::IsOsPlatform('Windows')) ">$(TargetFrameworks);net48</TargetFrameworks>

<AssemblyTitle>Lucene.Net.Tests.Analysis.OpenNLP</AssemblyTitle>
<RootNamespace>Lucene.Net.Analysis.OpenNlp</RootNamespace>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net461' Or $(TargetFramework.StartsWith('net5.')) ">
<!-- For CI, we don't publish the projects and exclude them from the test run by setting IsPublishable=false and IsTestProject=false -->
<IsPublishable>false</IsPublishable>
<IsPublishable Condition=" '$(TargetFramework)' == 'net48' ">true</IsPublishable>

<!-- Workaround since there are no targets on non-Windows OS. We need at least 1 TargetFramework
registered or MSBuild's validation will fail, so we explicitly disable it as a test project instead. -->
<IsTestProject>false</IsTestProject>
<IsTestProject Condition="$([MSBuild]::IsOsPlatform('Windows'))">true</IsTestProject>
<!-- For the IDE, the above doesn't work. Redirect to a supported test framework instead. -->
<TargetFramework Condition=" $(TargetFramework.StartsWith('net5.')) ">net7.0</TargetFramework>
<TargetFramework Condition=" '$(TargetFramework)' == 'net461' ">net48</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/Lucene.Net/Lucene.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,14 @@

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
<PackageReference Include="System.Memory" Version="$(SystemMemoryPackageVersion)" />
<!-- NOTE: This is a transitive dependency only, but we are forcing an upgrade to ensure there are no conflicts with dependencies. -->
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="$(SystemRuntimeCompilerServicesUnsafePackageVersion)" />
</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net462' ">
<PackageReference Include="System.Memory" Version="$(SystemMemoryPackageVersion)" />
<!-- NOTE: This is a transitive dependency only, but we are forcing an upgrade to ensure there are no conflicts with dependencies. -->
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="$(SystemRuntimeCompilerServicesUnsafePackageVersion)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@
<PropertyGroup>
<!-- Allow specific target framework to flow in from TestTargetFrameworks.props -->
<TargetFrameworks Condition=" '$(TargetFramework)' == '' ">net7.0;net6.0</TargetFrameworks>
<!-- If .NET Frameowrk is specified, just target the latest version -->
<TargetFramework Condition=" $(TargetFramework.StartsWith('net4')) ">net7.0</TargetFramework>
<AssemblyTitle>Lucene.Net.Tests.Cli</AssemblyTitle>
</PropertyGroup>

<IsPublishable Condition="$(TargetFramework.StartsWith('net4')) Or $(TargetFramework.StartsWith('net5.'))">false</IsPublishable>
<IsTestProject Condition="$(TargetFramework.StartsWith('net4')) Or $(TargetFramework.StartsWith('net5.'))">false</IsTestProject>
<PropertyGroup Condition=" $(TargetFramework.StartsWith('net4')) Or $(TargetFramework.StartsWith('net5.')) ">
<!-- For CI, we don't publish the projects and exclude them from the test run by setting IsPublishable=false and IsTestProject=false -->
<IsPublishable>false</IsPublishable>
<IsTestProject>false</IsTestProject>
<!-- For the IDE, the above doesn't work. Redirect to a supported test framework instead. -->
<TargetFramework>net7.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading