It's not exactly the same problem, but here is what I get from my resolver
groove grapes :
General error during conversion: Error grabbing Grapes --
[unresolved dependency: org.restlet.jse#org.restlet.lib.org.json;2.0:
several problems occurred while resolving dependency:
org.restlet.jse#org.restlet.lib.org.json;2.0 {compile=[compile(*),
master(*)], runtime=[runtime(*)]}:
java.text.ParseException: inconsistent module descriptor file found in '
http://maven.restlet.org/org/restlet/jse/org.restlet.lib.org.json/2.0/*
org.restlet.lib.org.json-2.0.pom*': *bad organisation:
expected='org.restlet.jse' found='org.restlet';*
If you want to test, you will need to install groovy :
http://groovy.codehaus.org/Download (30 seconds)
and then launch the enclosed file like this :
groovy httpsServer.groovy
Thanks
Romain
2010/10/14 Bartosz Kowalewski <[email protected]>
> Hi Thierry,
>
> Thanks a lot for the update.
>
> When do you envision these changes being released?
>
> Thanks again!
> Bartek
>
> ------------------------------------------------------
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2672023
>
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2693383@GrabResolver(name='restlet', root='http://maven.restlet.org')
@Grab(group='org.restlet.jse', module='org.restlet', version='2.0.3')
@Grab(group='org.restlet.jse', module='org.restlet.ext.jaxrs', version='2.0.3')
@Grab(group='org.restlet.jse', module='org.restlet.ext.ssl', version='2.0.3')
@Grab(group='org.restlet.jse', module='org.restlet.ext.jetty', version='2.0.3')
import org.restlet.*;
import org.restlet.data.*;
import org.restlet.ext.jaxrs.*;
import org.restlet.security.*;
import javax.ws.rs.core.Application;
def createHTTPSServer(Application restletApplication){
Component webComponent = new Component();
Server httpServer = webComponent.getServers().add(Protocol.HTTPS, 8443);
def restletParams = [:]
restletParams.maxThreads=200
restletParams.persistingConnections=false
restletParams.sslContextFactory=org.restlet.ext.ssl.PkixSslContextFactory
restletParams.keyStore="path to my keyStore.jks"
restletParams.keyStorePassword="my keystore password"
restletParams.hostname="localhost"
restletParams.keyPassword="my key Password"
restletParams.keystoreType="JKS"
restletParams.truststorePath="/etc/java-6-sun/security/cacerts"
restletParams.truststorePassword=changeit
restletParams.truststoreType=JKS
restletParams.disabledCipherSuites="SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA SSL_DHE_DSS_EXPORT_WITH_DES_40_CBC_SHA SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA SSL_DHE_DSS_WITH_DES_CBC_SHA SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA SSL_DHE_RSA_EXPORT_WITH_DES_40_CBC_SHA SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA SSL_DHE_RSA_WITH_DES_CBC_SHA SSL_DH_ANON_EXPORT_WITH_DES40_CBC_SHA SSL_DH_ANON_EXPORT_WITH_DES_40_CBC_SHA SSL_DH_ANON_EXPORT_WITH_RC4_40_MD5 SSL_DH_ANON_WITH_3DES_EDE_CBC_SHA SSL_DH_ANON_WITH_DES_CBC_SHA SSL_DH_ANON_WITH_RC4_MD5 SSL_DH_DSS_EXPORT_WITH_DES_40_CBC_SHA SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA SSL_DH_DSS_WITH_DES_CBC_SHA SSL_DH_RSA_EXPORT_WITH_DES_40_CBC_SHA SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA SSL_DH_RSA_WITH_DES_CBC_SHA SSL_RSA_EXPORT_WITH_DES40_CBC_SHA SSL_RSA_EXPORT_WITH_DES_40_CBC_SHA SSL_RSA_EXPORT_WITH_RC2_40_CBC_MD5 SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 SSL_RSA_EXPORT_WITH_RC4_40_MD5 SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA SSL_RSA_FIPS_WITH_DES_CBC_SHA SSL_RSA_WITH_3DES_EDE_CBC_MD5 SSL_RSA_WITH_3DES_EDE_CBC_SHA SSL_RSA_WITH_DES_CBC_MD5 SSL_RSA_WITH_DES_CBC_SHA SSL_RSA_WITH_NULL_MD5 SSL_RSA_WITH_NULL_SHA SSL_RSA_WITH_RC2_CBC_MD5 SSL_RSA_WITH_RC4_MD5 SSL_RSA_WITH_RC4_SHA TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA TLS_KRB5_EXPORT_WITH_RC4_40_MD5 TLS_KRB5_EXPORT_WITH_RC4_40_SHA TLS_KRB5_WITH_3DES_EDE_CBC_MD5 TLS_KRB5_WITH_3DES_EDE_CBC_SHA TLS_KRB5_WITH_DES_CBC_MD5 TLS_KRB5_WITH_DES_CBC_SHA SSL_CK_DES_64_CBC_WITH_MD5"
restletParams.each{ k,v ->
httpServer.getContext().getParameters().add(k, v);
}
Context context = webComponent.getContext().createChildContext();
JaxRsApplication application = new JaxRsApplication(context);
/* SET BASIC AUTH */
MemoryRealm realm = new MemoryRealm();
application.getContext().setDefaultEnroler(realm.getEnroler());
application.getContext().setDefaultVerifier(realm.getVerifier());
realm.getUsers().add(new User(login, password.toCharArray()));
ChallengeAuthenticator guard = new ChallengeAuthenticator(
application.getContext(), false, ChallengeScheme.HTTP_BASIC,
"My WebService");
RestletRoleChecker roleChecker = new RestletRoleChecker();
application.setAuthentication(guard, roleChecker);
application.add();
// Attach the application to the component and start it
webComponent.getDefaultHost().attach(application);
webComponent.start(restletApplication);
}
createHTTPSServer(new RestletApplication());
class RestletApplication extends Application {
@Override
public Set<Class<?>> getClasses() {
Set<Class<?>> rrcs = new HashSet<Class<?>>();
rrcs.add(MyRessource.class);
return rrcs;
}
}
/**
* Class needed for BASIC AUTH.
*/
@SuppressWarnings("deprecation")
class RestletRoleChecker implements RoleChecker {
public boolean isInRole(Principal principal, String role) {
throw new RuntimeException("[isInRole] was called. We don't know why this class is needed.");
}
}