Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
FW: FW: [mylar-dev] Username and Password Mylar Test

For the purpose of security Mylar stores credentials in the Eclipse platform’s key ring.  It looks like you are trying to run use Trac in a headless (i.e. no Eclipse UI) environment without org.eclipse.core.runtime on the classpath.  For more information on running headless refer to:

 

http://wiki.eclipse.org/index.php/Mylar_Integrator_Reference#Headless_Frameworks_.26_APIs

 

And let us know if that doesn’t resolve the problem.  Please feel free to add any clarifications or additional steps you had to take to the above wiki docs.

 

Also, note the updated instructions on setting up the unit test credentials: http://wiki.eclipse.org/index.php/Mylar_Contributor_Reference#Running_tests

 

Mik

 

 


From: Samuel Félix [mailto:felixcomputer@xxxxxxxxx]
Sent: Wednesday, November 22, 2006 6:08 AM
To: Mik Kersten
Subject: Re: FW: [mylar-dev] Username and Password Mylar Test

 

Hello Mik,

I found this page inside the Mylar source code,  I'm trying to connect with Trac through Mylar, but when i was reading the source code, in the TracRepositoryConnectorTest class, i needed a username and password, look:

        Credentials credentials = MylarTestUtils.readCredentials();
        String kind = TracCorePlugin.REPOSITORY_KIND;
        repository = new TaskRepository(kind, " http://trac.edgewall.org");
       
        //This line i have some problems****
        repository.setAuthenticationCredentials(credentials.username, credentials.password);

        repository.setTimeZoneId (ITracClient.TIME_ZONE);
        repository.setCharacterEncoding(ITracClient.CHARSET);
        //repository.setVersion(version.name());
       
        manager.addRepository(repository, TasksUiPlugin.getDefault ().getRepositoriesFilePath());
        AbstractRepositoryConnector abstractConnector = manager.getRepositoryConnector(kind);
        System.out.println(abstractConnector.getRepositoryType());

        connector = (TracRepositoryConnector) abstractConnector;
        TasksUiPlugin.getSynchronizationManager().setForceSyncExec(true);


**** In that line, i suppose that it calls MylarTestUtils, but throws the Exception "username or password not found in <plug-in dir>/credentials.properties, make sure file is valid");

When i put the username and password in the code, i have a NullPointerException

Exception in thread "main" java.lang.NullPointerException
    at org.eclipse.core.internal.runtime.auth.AuthorizationHandler.loadKeyring (AuthorizationHandler.java:42)
    at org.eclipse.core.internal.runtime.auth.AuthorizationHandler.getAuthorizationInfo(AuthorizationHandler.java:175)
    at org.eclipse.core.runtime.Platform.getAuthorizationInfo(Platform.java :608)
    at org.eclipse.mylar.tasks.core.TaskRepository.getAuthInfo(TaskRepository.java:172)
    at org.eclipse.mylar.tasks.core.TaskRepository.setAuthenticationCredentials(TaskRepository.java:134)
    at trac.TracRepositorySamuel .<init>(TracRepositorySamuel.java:88)
    at trac.TracRepositorySamuel.main(TracRepositorySamuel.java:144)

Samuel

2006/11/21, Mik Kersten < beatmik@xxxxxxx >: 


From: mylar-dev-bounces@xxxxxxxxxxx [mailto: mylar-dev-bounces@xxxxxxxxxxx] On Behalf Of Samuel Félix
Sent: Tuesday, November 21, 2006 5:22 AM
To: mylar-dev@xxxxxxxxxxx
Subject: [mylar-dev] Username and Password Mylar Test

 

I was reading the Mylar FAQ and I'd like an username and a password to put them in credentials.properties to make some tests with Mylar,
Thanks

Running tests

Each component has it's own All<Component>Tests suite, and all can be run via org.eclipse.mylar.tests.AllTests. 

  • Add the following to the test configuration under Arguments -> VM Arguments: -enableassertions -Xmx384M
  • Add a credentials.properties file to org.eclipse.mylar.bugzilla.tests, and define "username: xxx" and "password: yyy" in it. Email mylar-dev@xxxxxxxxxx for a username and password.






--
Samuel Félix de Sousa Júnior
Graduando em Ciência da Computação
http://www.samuelfelix.cjb.net


Back to the top