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

Targets of mases.jnet.targets shall be renamed with a name that is specific for this project #499

Closed
masesdevelopers opened this issue Jul 29, 2024 · 0 comments · Fixed by #500

Comments

@masesdevelopers
Copy link
Contributor

masesdevelopers commented Jul 29, 2024

Currently the missing JAR is not a direct problem for KEFCore, however the latest version of JNet introduced, with #479, a check on needed JARs and the issue is raised.
The missing JAR is related to the import chain of *.targets files, i.e. JNet defines a mases.jnet.targets with the following content:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <jnet_jars Include="$(MSBuildThisFileDirectory)\jars\*.*" />
  </ItemGroup>

  <Target Name="CopyFilesNative" BeforeTargets="Build">
    <Copy SourceFiles="@(jnet_jars)" DestinationFolder="$(TargetDir)\jars" />
  </Target>
  
  <Target Name="CopyFilesNativePublish" BeforeTargets="Publish">
    <Copy SourceFiles="@(jnet_jars)" DestinationFolder="$(PublishDir)\jars" />
  </Target>
</Project>

and KNet defines a mases.knet.targets with the following content:

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <ItemGroup>
    <knet_jars Include="$(MSBuildThisFileDirectory)\jars\*.*" />
    <knet_config Include="$(MSBuildThisFileDirectory)\config\*.*" />
    <knet_configKraft Include="$(MSBuildThisFileDirectory)\config\kraft\*.*" />
  </ItemGroup>

  <Target Name="CopyFilesNative" BeforeTargets="Build">
    <Copy SourceFiles="@(knet_jars)" DestinationFolder="$(TargetDir)/jars" />
    <Copy SourceFiles="@(knet_config)" DestinationFolder="$(TargetDir)/config" />
    <Copy SourceFiles="@(knet_configKraft)" DestinationFolder="$(TargetDir)/config/kraft" />
  </Target>
  
  <Target Name="CopyFilesNativePublish" BeforeTargets="Publish">
    <Copy SourceFiles="@(knet_jars)" DestinationFolder="$(PublishDir)/jars" />
    <Copy SourceFiles="@(knet_config)" DestinationFolder="$(PublishDir)/config" />
    <Copy SourceFiles="@(knet_configKraft)" DestinationFolder="$(PublishDir)/config/kraft" />
  </Target>
</Project>

From both files it is possible to highlight that Targets have the same name, so chaining the *.targets the latest one replace the previous one.
Replacing lacally the Targets of mases.jnet.targets with another name the build chain works fine.
So, to avoid confusion Targets of mases.(jnet/knet).targets shall be renamed with a name that is specific for each project.

Originally posted by @masesdevelopers in masesgroup/KEFCore#268 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant