Please report this to jira. Make sure to provide Eclipse project and pom.xml as well as all steps that can be used to reproduce this issue.

 Thanks

 Eugene


Gautham Pamu wrote:
Hi,

I have recently installed M2Eclipse plugin in Eclipse. Our build environment requires ftp wagon support so I was unable to connect to our repository. So I updated the component.xml file in maven-embedder-2.0.4 jar in the IDE plugin and also add all the required classes for the ftp wagon component. After updating the plugin, it is able to use the ftp wagon but maven runtime is throwing exception because the password is null. I was able compile the same project outside eclipse using the command line mvn runtime. So it appears like the embedder runtime is not reading settings.xml. Are there options to enable maven embedder runtime
to read the settings.xml file.

I had added debug statements to the AbstractWagon.connect method which actually creates the AuthenticationInfo object. From the trace it appears that it is not gettings the username and password from the settings.xml file.


public void connect( Repository repository, AuthenticationInfo authenticationInfo, ProxyInfo proxyInfo )
        throws ConnectionException, AuthenticationException
    {
        if ( repository == null )
        {
throw new IllegalStateException( "The repository specified cannot be null." );
        }

        this.repository = repository;

        if ( authenticationInfo == null )
        {
            authenticationInfo = new AuthenticationInfo();
        }

        if ( authenticationInfo.getUserName() == null )
        {
System.out.println("Abstract Wagon Repository username " + repository.getUsername()); System.out.println("Abstract Wagon Repository Id " + repository.getId());
            System.out.println("Abstract Wagon Username is null");
            // Get user/pass that were encoded in the URL.
            if ( repository.getUsername() != null )
            {
authenticationInfo.setUserName( repository.getUsername() ); System.out.println("Abstract Wagon UserName " + authenticationInfo.getUserName()); if ( repository.getPassword() != null && authenticationInfo.getPassword() == null )
                {
authenticationInfo.setPassword( repository.getPassword() ); System.out.println("Abstract Wagon Password " + authenticationInfo.getPassword());
                }
            }
        }

Trace...

Abstract Wagon Repository username null
Abstract Wagon Repository Id centralFtpRepository
Abstract Wagon Username is null
 Print the username Administrator
 Print the password null
java.lang.NullPointerException
at org.apache.maven.wagon.providers.ftp.FtpWagon.openConnection(FtpWagon.java:131) at org.apache.maven.wagon.AbstractWagon.connect(AbstractWagon.java:147) at org.apache.maven.artifact.manager.DefaultWagonManager.getRemoteFile (DefaultWagonManager.java:354)

--
-Gautham Pamu


---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to