[ 
https://issues.apache.org/jira/browse/NPANDAY-624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14030353#comment-14030353
 ] 

Greg Domjan commented on NPANDAY-624:
-------------------------------------

I did have a brief look at the code at the ilmerge.AssemblyMerger  but didn't 
dig further because I had no idea why it was getting settings from the 
compiler.  At the moment it is a bit of a magic black box to me :)
I'll certainly have a go at digging further when I next get a chance.

Some other things I noticed while trying to look into this more in relation to 
compile only Vs install ...

I notice with that other sample that there are log lines   
com.somegroup:baz:dotnet-symbols:8.1.0-0-SNAPSHOT  however unless running a 
debug build the symbols are not generated.  This info is a bit noisy, and not 
sure if it is a real issue or not.

When turning on debug symbols 
{code:xml}
          <configuration>
          <isDebug>true</isDebug>
            <attachPdb>true</attachPdb>
          </configuration>
{code}
{noformat}
[DEBUG] NPANDAY-900-016: Attaching pdb project artifact 
E:\Data\Projects\Securelogin\SecureLogin-8-1\SecureLogin\example\baz\target\baz.pdb
[DEBUG] NPANDAY-900-015: Attaching default project artifact 
E:\Data\Projects\Securelogin\SecureLogin-8-1\SecureLogin\example\baz\target\baz.
dll
{noformat}

Still the following process of ilmerge on foo has issue - appears to be 
ignoring the reactor provided artifacts for maven2 during compile only.
{noformat}
[INFO] [ilmerge:merge-assemblies {execution: unpack tools}]
Downloading: 
http://nexus.labs.blr.novell.com:8080/nexus/content/groups/nsl-team/com/somegroup/baz/8.1.0-0-SNAPSHOT/baz-8.1.0-0-SNAPSHOT.pdb

[INFO] Unable to find resource 
'com.somegroup:baz:dotnet-symbols:8.1.0-0-SNAPSHOT' in repository nsl.nexus 
(http://nexus.labs.blr.novell.com
:8080/nexus/content/groups/nsl-team)
Downloading: 
http://nexus.labs.blr.novell.com:8080/nexus/content/groups/public/com/somegroup/baz/8.1.0-0-SNAPSHOT/baz-8.1.0-0-SNAPSHOT.pdb
[INFO] Unable to find resource 
'com.somegroup:baz:dotnet-symbols:8.1.0-0-SNAPSHOT' in repository public 
(http://nexus.labs.blr.novell.com:80
80/nexus/content/groups/public)
[INFO] NPANDAY-148-009: Took 112ms to resolve dependencies for 
com.somegroup:foo:dotnet-executable:8.1.0-0-SNAPSHOT with filter org.apache.m
aven.artifact.resolver.filter.ScopeArtifactFilter@75eee7b7
[WARNING] NPANDAY-065-010: Found multiple matching capabilities; will choose 
the first one: [CompilerCapability [vendorInfo=[Configured Vend
or Info for MICROSOFT 3.0, Framework Version = 3.0], operatingSystem='Windows', 
language='C_SHARP'], CompilerCapability [vendorInfo=[Configu
red Vendor Info for MICROSOFT 3.0, Framework Version = 3.0], 
operatingSystem='Windows', language='C_SHARP'], CompilerCapability [vendorInfo=
[Configured Vendor Info for MICROSOFT 3.0, Framework Version = 3.0], 
operatingSystem='Windows', language='C_SHARP'], CompilerCapability [ven
dorInfo=[Configured Vendor Info for MICROSOFT 3.0, Framework Version = 3.0], 
operatingSystem='Windows', language='C_SHARP']]
[WARNING] NPANDAY-231: previously netDependencyId was used to resolve some 
private bin path...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
        at 
com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
        at com.google.common.base.Objects.firstNonNull(Objects.java:174)
        at 
npanday.executable.impl.CompilerContextImpl.getAssemblyPath(CompilerContextImpl.java:139)
        at 
npanday.executable.compiler.impl.BaseCompiler.getAssemblyPath(BaseCompiler.java:83)
        at 
npanday.executable.compiler.impl.DefaultCompiler.getAssemblyPath(DefaultCompiler.java:48)
        at 
npanday.plugin.ilmerge.AssemblyMerger.execute(AssemblyMerger.java:263)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at 
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16 seconds
{noformat}

So running {quote}mvn install{quote} to make it available, baz with debugging, 
then ilMerge  logs about different missing resources from bar.
Unfortunately I haven't worked out how to make the tlbimport generate pdb yet, 
so that isn't going to be available.
{noformat}
[INFO] [ilmerge:merge-assemblies {execution: unpack tools}]
[INFO] snapshot com.somegroup:bar:8.1.0-0-SNAPSHOT: checking for updates from 
nsl.nexus
[INFO] snapshot com.somegroup:bar:8.1.0-0-SNAPSHOT: checking for updates from 
public
Downloading: 
http://nexus.labs.blr.novell.com:8080/nexus/content/groups/nsl-team/com/somegroup/bar/8.1.0-0-SNAPSHOT/bar-8.1.0-0-SNAPSHOT.pdb

[INFO] Unable to find resource 
'com.somegroup:bar:dotnet-symbols:8.1.0-0-SNAPSHOT' in repository nsl.nexus 
(http://nexus.labs.blr.novell.com
:8080/nexus/content/groups/nsl-team)
Downloading: 
http://nexus.labs.blr.novell.com:8080/nexus/content/groups/public/com/somegroup/bar/8.1.0-0-SNAPSHOT/bar-8.1.0-0-SNAPSHOT.pdb
[INFO] Unable to find resource 
'com.somegroup:bar:dotnet-symbols:8.1.0-0-SNAPSHOT' in repository public 
(http://nexus.labs.blr.novell.com:80
80/nexus/content/groups/public)
[INFO] NPANDAY-148-009: Took 113ms to resolve dependencies for 
com.somegroup:foo:dotnet-executable:8.1.0-0-SNAPSHOT with filter org.apache.m
aven.artifact.resolver.filter.ScopeArtifactFilter@7e217dc8
[WARNING] NPANDAY-065-010: Found multiple matching capabilities; will choose 
the first one: [CompilerCapability [vendorInfo=[Configured Vend
or Info for MICROSOFT 3.0, Framework Version = 3.0], operatingSystem='Windows', 
language='C_SHARP'], CompilerCapability [vendorInfo=[Configu
red Vendor Info for MICROSOFT 3.0, Framework Version = 3.0], 
operatingSystem='Windows', language='C_SHARP'], CompilerCapability [vendorInfo=
[Configured Vendor Info for MICROSOFT 3.0, Framework Version = 3.0], 
operatingSystem='Windows', language='C_SHARP'], CompilerCapability [ven
dorInfo=[Configured Vendor Info for MICROSOFT 3.0, Framework Version = 3.0], 
operatingSystem='Windows', language='C_SHARP']]
[WARNING] NPANDAY-231: previously netDependencyId was used to resolve some 
private bin path...
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
        at 
com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
        at com.google.common.base.Objects.firstNonNull(Objects.java:174)
        at 
npanday.executable.impl.CompilerContextImpl.getAssemblyPath(CompilerContextImpl.java:139)
        at 
npanday.executable.compiler.impl.BaseCompiler.getAssemblyPath(BaseCompiler.java:83)
        at 
npanday.executable.compiler.impl.DefaultCompiler.getAssemblyPath(DefaultCompiler.java:48)
        at 
npanday.plugin.ilmerge.AssemblyMerger.execute(AssemblyMerger.java:263)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at 
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 19 seconds
{noformat}


After checking dependencies I think I'm still stuck at the same point into 
digging in the code from  
npanday.plugin.ilmerge.AssemblyMerger.execute(AssemblyMerger.java:263)

> NPE in ilMerge
> --------------
>
>                 Key: NPANDAY-624
>                 URL: https://issues.apache.org/jira/browse/NPANDAY-624
>             Project: NPanday
>          Issue Type: Bug
>          Components: Maven Plugins
>    Affects Versions: 1.5.0-incubating
>         Environment: Windows, VS2005, VS2012, Platform SDK 6,7,7.1,8.0,8.1
> Using npanday.settings to select mininmal framework version 3.0
> Maven 2.2.1
>            Reporter: Greg Domjan
>
> ilMerge appears to be looking for the compiler details to select the 
> appropriate ilMerge app.  The compiler list is returning multiple options, 
> but then ilMerge gets NPE on following call to 
> {code}File assemblyPath = compilerExecutable.getAssemblyPath();{code}
> {noformat}
> [DEBUG] NPANDAY-102-003: Apply 
> rule:npanday.vendor.impl.VendorInfoTransitionRuleFactory$8@38c9aa93
> [DEBUG] NPANDAY-103-017: Entering State = FFF
> [DEBUG] NPANDAY-103-052: Set defaults: 3.0
> [DEBUG] NPANDAY-102-004: Vendor info requirement after 
> rule:[VendorRequirement for vendor MICROSOFT version 3.0, Framework Version = 
> 3.0]
> [DEBUG] NPANDAY-065-008: Found vendor [Configured Vendor Info for MICROSOFT 
> 3.0, Framework Version = 3.0] for requirement [VendorRequirement for vendor 
> MICROSOFT version 3.0, Framework Version = 3.0]
> [DEBUG] NPANDAY-065-001: Found matching capability: CompilerCapability 
> [vendorInfo=[Configured Vendor Info for MICROSOFT 3.0, Framework Version = 
> 3.0], operatingSystem='Windows', language='C_SHARP']
> [DEBUG] NPANDAY-065-009: Failed to match policy: 
> ExecutableMatchPolicy[profile: 'FULL']
> [DEBUG] NPANDAY-065-005: Capability doesn't match: CompilerCapability 
> [vendorInfo=[Configured Vendor Info for MICROSOFT 3.0, Framework Version = 
> 3.0], operatingSystem='Windows', language='C_SHARP']
> [DEBUG] NPANDAY-065-001: Found matching capability: CompilerCapability 
> [vendorInfo=[Configured Vendor Info for MICROSOFT 3.0, Framework Version = 
> 3.0], operatingSystem='Windows', language='C_SHARP']
> [DEBUG] NPANDAY-065-001: Found matching capability: CompilerCapability 
> [vendorInfo=[Configured Vendor Info for MICROSOFT 3.0, Framework Version = 
> 3.0], operatingSystem='Windows', language='C_SHARP']
> [DEBUG] NPANDAY-065-001: Found matching capability: CompilerCapability 
> [vendorInfo=[Configured Vendor Info for MICROSOFT 3.0, Framework Version = 
> 3.0], operatingSystem='Windows', language='C_SHARP']
> [DEBUG] NPANDAY-065-009: Failed to match policy: 
> ExecutableMatchPolicy[language: 'C_SHARP']
> [DEBUG] NPANDAY-065-005: Capability doesn't match: CompilerCapability 
> [vendorInfo=[Configured Vendor Info for MICROSOFT 3.0, Framework Version = 
> 3.0], operatingSystem='Windows', language='VB']
> [DEBUG] NPANDAY-065-009: Failed to match policy: 
> ExecutableMatchPolicy[language: 'C_SHARP']
> [DEBUG] NPANDAY-065-005: Capability doesn't match: CompilerCapability 
> [vendorInfo=[Configured Vendor Info for MICROSOFT 3.0, Framework Version = 
> 3.0], operatingSystem='Windows', language='ASP']
> [WARNING] NPANDAY-065-010: Found multiple matching capabilities; will choose 
> the first one: [CompilerCapability [vendorInfo=[Configured Vendor Info for 
> MICROSOFT 3.0, Framework Version = 3.0], operatingSystem='Windows', 
> language='C_SHARP'], CompilerCapability [vendorInfo=[Configured Vendor Info 
> for MICROSOFT 3.0, Framework Version = 3.0], operatingSystem='Windows', 
> language='C_SHARP'], CompilerCapability [vendorInfo=[Configured Vendor Info 
> for MICROSOFT 3.0, Framework Version = 3.0], operatingSystem='Windows', 
> language='C_SHARP'], CompilerCapability [vendorInfo=[Configured Vendor Info 
> for MICROSOFT 3.0, Framework Version = 3.0], operatingSystem='Windows', 
> language='C_SHARP']]
> [DEBUG] NPANDAY-061-006: Artifact Type:gac_msil
> [DEBUG] NPANDAY-061-007: Artifact Type:false
> [DEBUG] NPANDAY-061-006: Artifact Type:dotnet-library
> [DEBUG] NPANDAY-061-007: Artifact Type:false
> [DEBUG] NPANDAY-061-006: Artifact Type:dotnet-library
> [DEBUG] NPANDAY-061-007: Artifact Type:false
> [DEBUG] NPANDAY-061-006: Artifact Type:gac_msil
> [DEBUG] NPANDAY-061-007: Artifact Type:false
> [DEBUG] NPANDAY-061-006: Artifact Type:gac_msil
> [DEBUG] NPANDAY-061-007: Artifact Type:false
> [WARNING] NPANDAY-231: previously netDependencyId was used to resolve some 
> private bin path...
> {noformat}
> {noformat}
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] FATAL ERROR
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] null
> [INFO] 
> ------------------------------------------------------------------------
> [DEBUG] Trace
> java.lang.NullPointerException
>         at 
> com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
>         at com.google.common.base.Objects.firstNonNull(Objects.java:174)
>         at 
> npanday.executable.impl.CompilerContextImpl.getAssemblyPath(CompilerContextImpl.java:139)
>         at 
> npanday.executable.compiler.impl.BaseCompiler.getAssemblyPath(BaseCompiler.java:83)
>         at 
> npanday.executable.compiler.impl.DefaultCompiler.getAssemblyPath(DefaultCompiler.java:48)
>         at 
> npanday.plugin.ilmerge.AssemblyMerger.execute(AssemblyMerger.java:263)
>         at 
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
>         at 
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
>         at 
> org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at 
> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to