NullPointerException after adding a dependency in POM.xml

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

NullPointerException after adding a dependency in POM.xml

divenom
Please suggest a soultion to my problem explained bellow. I am new to Cling, Maven but have managed to build the Stack as explained on Github source code.
 
Whenever I build the stack with maven I get the success messages. Bellow is the Build Summary.

POM.xml resides in "C:\Users\desktop\Desktop\Cling\cling-master\cling-master"

[INFO] Reactor Summary:
[INFO]
[INFO] Cling ............................................. SUCCESS [  0.097 s]
[INFO] Cling Core ........................................ SUCCESS [01:25 min]
[INFO] Cling Demo ........................................ SUCCESS [  0.006 s]
[INFO] Cling Demo Android ................................ SUCCESS [  0.007 s]
[INFO] Cling Demo Android Browser ........................ SUCCESS [ 12.771 s]
[INFO] Cling Demo Android Light .......................... SUCCESS [ 11.293 s]
[INFO] Cling Demo OSGi ................................... SUCCESS [  0.005 s]
[INFO] Cling Demo OSGi Basic Device ...................... SUCCESS [  0.955 s]
[INFO] Cling Demo OSGi Lights ............................ SUCCESS [  1.108 s]
[INFO] Cling Support ..................................... SUCCESS [ 14.635 s]
[INFO] Cling Workbench ................................... SUCCESS [  3.638 s]
[INFO] Cling MediaRenderer ............................... SUCCESS [  1.305 s]
[INFO] Cling OSGi ........................................ SUCCESS [  0.005 s]
[INFO] Cling OSGi Base Driver ............................ SUCCESS [  2.451 s]
[INFO] Cling Website ..................................... SUCCESS [  0.005 s]
[INFO] Cling Distribution ................................ SUCCESS [  8.263 s]
[INFO] Cling OSGi Tests .................................. SUCCESS [  0.004 s]
[INFO] Cling OSGi Test Common Library .................... SUCCESS [  0.655 s]
[INFO] Cling OSGi Test Simple Device ..................... SUCCESS [  0.516 s]
[INFO] Cling OSGi Test Integration ....................... SUCCESS [  0.258 s]
[INFO] -----------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] -----------------------------------------------------------------------
[INFO] Total time: 02:23 min
[INFO] Finished at: 2014-05-28T14:30:11+05:30
[INFO] Final Memory: 39M/103M
[INFO] -----------------------------------------------------------------------
C:\Users\desktop\Desktop\Cling\cling-master\cling-master>


Now I add the following dependancy to the same POM.xml : ( Last step to build Cling@ https://github.com/4thline/cling )

<dependency>
    <groupId>org.fourthline.cling</groupId>
    <artifactId>cling-core</artifactId>
    <version>2.0-SNAPSHOT</version>
  </dependency>


My new POM.xml looks like this now.
.
.
.
 <dependencies>

         <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${testng.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

                <dependency>
                    <groupId>org.fourthline.cling</groupId>
                    <artifactId>cling-core</artifactId>
                    <version>2.0-SNAPSHOT</version>
                </dependency>


    </dependencies>
.
.
.


Now, I again use command "mvn clean install"
C:\Users\desktop\Desktop\Cling\cling-master\cling-master>mvn clean install

Finally, after pressing enter i get the following error:

[INFO] Scanning for projects...
[ERROR] Internal error: java.lang.NullPointerException -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.NullPointerEx
ception
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:167)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
356)
Caused by: java.lang.NullPointerException
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:270)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
        ... 11 more
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/InternalErrorE
xception
C:\Users\desktop\Desktop\Cling\cling-master\cling-master>