Thanks Eugene. Someone already reported the problem on JIRA. I checked out
the latest version and updated the embedder with ftp wagon classes and it
worked for me.

http://jira.codehaus.org/browse/MNGECLIPSE-230

Can M2Eclipse team also add ftp wagon provider with maven embedder so that
we don't have to patch it.

Thanks
Gautham

On 1/19/07, Eugene Kuleshov <[EMAIL PROTECTED]> wrote:


  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




--
-Gautham Pamu

Reply via email to