chrisprice / phonegap-build

This project aims to provide a stand-alone Java API for communicating with the PhoneGap Build REST API and a Maven Plugin which makes use of the API to turn WAR projects into binaries for mobile platforms.
http://chrisprice.github.com/phonegap-build/phonegap-build-maven-plugin
Apache License 2.0
11 stars 18 forks source link

NPE on configuration mismatch #25

Open fiveop opened 9 years ago

fiveop commented 9 years ago

If my config.xml contains entries for just one platform (in my case android) and the plugin configuration in my pom.xml mentions two platforms (in my case android and windows phone), I get the following exception:

Caused by: java.lang.NullPointerException
        at com.github.chrisprice.phonegapbuild.api.managers.AppsManagerImpl.downloadApp(AppsManagerImpl.java:107)
        at com.github.chrisprice.phonegapbuild.plugin.utils.AppDownloaderImpl.downloadArtifacts(AppDownloaderImpl.java:33)
        at com.github.chrisprice.phonegapbuild.plugin.BuildMojo.execute(BuildMojo.java:342)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)

(Just in case it matters: I had windows phone in the config.xml previously for a few weeks and then commented it out)

chrisprice commented 9 years ago

Thanks for the report @fiveop. As I'm not using the plugin myself anymore and you've found a workaround I won't be fixing it. However, I'll leave the issue open in case it helps anyone else or someone feels inspired to fix it.