[ http://jira.codehaus.org/browse/WAGON-285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=191343#action_191343 ]
Nicolas Frenay commented on WAGON-285: -------------------------------------- Just got hit by this problem again. Is someone from the project watching this? > Repository constructor NPE should be more verbose > ------------------------------------------------- > > Key: WAGON-285 > URL: http://jira.codehaus.org/browse/WAGON-285 > Project: Maven Wagon > Issue Type: Improvement > Components: wagon-provider-api > Reporter: Nicolas Frenay > Fix For: 1.0 > > > After having the following problem while trying to maven install my project, > I suggest that the Repository constructor should be more verbose in case the > "id" or "url" are null. > {code:none} > [INFO] Scanning for projects... > [INFO] > ------------------------------------------------------------------------ > [ERROR] FATAL ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] id can not be null > [INFO] > ------------------------------------------------------------------------ > [INFO] Trace > java.lang.NullPointerException: id can not be null > at > org.apache.maven.wagon.repository.Repository.<init>(Repository.java:81) > at > org.apache.maven.artifact.repository.DefaultArtifactRepository.<init>(DefaultArtifactRepository.java:70) > at > org.apache.maven.artifact.repository.DefaultArtifactRepositoryFactory.createDeploymentArtifactRepository(DefaultArtifactRepositoryFactory.java:44) > at > org.apache.maven.project.ProjectUtils.buildDeploymentArtifactRepository(ProjectUtils.java:80) > at > org.apache.maven.project.DefaultMavenProjectBuilder.processProjectLogic(DefaultMavenProjectBuilder.java:1029) > at > org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMavenProjectBuilder.java:880) > at > org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:508) > at > org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200) > at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604) > at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487) > at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:560) > at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:560) > at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272) > 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) > {code} > I haven't created a patch because I currently don't have the SVN plugin > installed on my Eclipse (and I'm running out of time), but it should as > simple as changing the Repository.java constructor to: > {code} > public Repository( String id, String url ) > { > if ( id == null ) > { > throw new NullPointerException( "id can not be null for > Repository with url=" + url ); > } > > setId( id ); > if ( url == null ) > { > throw new NullPointerException( "url can not be null for > Repository with id=" + id ); > } > > setUrl( url ); > } > {code} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira