You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-dev@incubator.apache.org by "Brett Porter (JIRA)" <ji...@apache.org> on 2014/07/02 04:19:25 UTC

[jira] [Commented] (NPANDAY-624) NPE in ilMerge

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

Brett Porter commented on NPANDAY-624:
--------------------------------------

That plugin has been unloved for a while - it looks like what you need to add is:

{code:xml}
<profileAssemblyPath>C:\Path\To\ILMerge\bin</profileAssemblyPath>
{code}

Does that help?

What should be done to the plugin is to replace the compiler lookup with {{netExecutableFactory.getExecutable}}, trim out the parameters, and perhaps add a default path / registry based path into {{executable-plugins.xml}}. An example of how this is done is in {{AbstractCSPackDeployMojo.java}} in the {{azure-maven-plugin}}.

> 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)