mojohaus / maven-native

https://www.mojohaus.org/maven-native/
MIT License
18 stars 12 forks source link

native-maven-plugin:1.0-alpha-7 - Has the treatment of linkerSecondaryOutputExtensions changed recently? #16

Open minajagi opened 6 years ago

minajagi commented 6 years ago

Hi,

Can you please let me know if the behaviour of this option linkerSecondaryOutputExtensions has been recently changed in the native-maven-plugin?

Our build script used to look like this earlier(see below) with two profiles and used to populate linkerSecondaryOutput with a particular value based on either Profile A or B.In one case it was empty/blank.

The way this used to work a few months ago was it used to always produce the dll and because of lib would install corresponding artifact.lib into my local repo in the install phase. In Profile A linkerSecondaryOutput used to be set to pdb so ${linkerSecondaryOutput} used to do the samething for corresponding artifact.pdb file. For Profile B this was empty so there would be no pdb file.

Now it looks like when the >${linkerSecondaryOutput} has value it seems to overwrite the earlier lib config and thus I end up only getting the pdb in the local repo in this case and not the lib (which earlier used to be installed to my local repo no matter what).

I think I know the workaround now i.e.

  1. knockoff the static lib
  2. in the profile B have ${linkerSecondaryOutput} set to just lib and in profile A have ${linkerSecondaryOutput} set to lib,pdb

I would appreciate if anyone here can let me know if this behavior got changed recently as I can then justify these pom changes to my team. Please let me know if you have any questions so I can try explaining the issue better. Btw, we use Maven 3 and

org.codehaus.mojo native-maven-plugin 1.0-alpha-7

I don’t quite remember if we have maven 2 earlier. Do you think it changed from maven 2 – maven 3.I doubt as we have not changed the version of the native plugin being used.

Regards, Chetan `

B /O2 /MT /GS A /Od /MTd /GS- /DEBUG pdb org.codehaus.mojo native-maven-plugin 1.0-alpha-7 true win32 org.codehaus.mojo.natives.msvc.MSVC2008x86EnvFactory msvc ${basedir} **\*.c ${project.build.directory}/objs/${project.name} /D JVMINFO_EXPORTS ${compilerOptions} lib ${linkerSecondaryOutput} /INCREMENTAL:NO /DLL ${linkerOptions} `  
dantran commented 6 years ago

you mentioned alpha-7, but alpha-8 was out dec/2013.