You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ace.apache.org by ma...@apache.org on 2012/07/10 16:00:20 UTC

svn commit: r1359676 - in /ace/sandbox/marrs: org.apache.ace.authentication.itest/ org.apache.ace.authentication.itest/.settings/ org.apache.ace.authentication.itest/src/ org.apache.ace.authentication.itest/src/org/ org.apache.ace.authentication.itest/...

Author: marrs
Date: Tue Jul 10 14:00:18 2012
New Revision: 1359676

URL: http://svn.apache.org/viewvc?rev=1359676&view=rev
Log:
ACE-282 Started work on the itests.

Added:
    ace/sandbox/marrs/org.apache.ace.authentication.itest/
    ace/sandbox/marrs/org.apache.ace.authentication.itest/.classpath
    ace/sandbox/marrs/org.apache.ace.authentication.itest/.project
    ace/sandbox/marrs/org.apache.ace.authentication.itest/.settings/
    ace/sandbox/marrs/org.apache.ace.authentication.itest/.settings/org.eclipse.jdt.core.prefs
    ace/sandbox/marrs/org.apache.ace.authentication.itest/bnd.bnd
    ace/sandbox/marrs/org.apache.ace.authentication.itest/build.xml
    ace/sandbox/marrs/org.apache.ace.authentication.itest/src/
    ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/
    ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/
    ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/
    ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/
    ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/
    ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/AuthenticationTestBase.java
    ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java
    ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java
    ace/sandbox/marrs/org.apache.ace.authentication.itest/test/
    ace/sandbox/marrs/org.apache.ace.itest/
    ace/sandbox/marrs/org.apache.ace.itest/.classpath
    ace/sandbox/marrs/org.apache.ace.itest/.project
    ace/sandbox/marrs/org.apache.ace.itest/.settings/
    ace/sandbox/marrs/org.apache.ace.itest/.settings/org.eclipse.jdt.core.prefs
    ace/sandbox/marrs/org.apache.ace.itest/bnd.bnd
    ace/sandbox/marrs/org.apache.ace.itest/build.xml
    ace/sandbox/marrs/org.apache.ace.itest/src/
    ace/sandbox/marrs/org.apache.ace.itest/src/org/
    ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/
    ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/
    ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/
    ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/ExampleTest.java
    ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/IntegrationTestBase.java
    ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/Options.java
    ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/packageinfo
    ace/sandbox/marrs/org.apache.ace.itest/test/

Added: ace/sandbox/marrs/org.apache.ace.authentication.itest/.classpath
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.authentication.itest/.classpath?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.authentication.itest/.classpath (added)
+++ ace/sandbox/marrs/org.apache.ace.authentication.itest/.classpath Tue Jul 10 14:00:18 2012
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" output="bin_test" path="test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: ace/sandbox/marrs/org.apache.ace.authentication.itest/.project
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.authentication.itest/.project?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.authentication.itest/.project (added)
+++ ace/sandbox/marrs/org.apache.ace.authentication.itest/.project Tue Jul 10 14:00:18 2012
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.apache.ace.authentication.itest</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>bndtools.core.bndbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>bndtools.core.bndnature</nature>
+	</natures>
+</projectDescription>

Added: ace/sandbox/marrs/org.apache.ace.authentication.itest/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.authentication.itest/.settings/org.eclipse.jdt.core.prefs?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.authentication.itest/.settings/org.eclipse.jdt.core.prefs (added)
+++ ace/sandbox/marrs/org.apache.ace.authentication.itest/.settings/org.eclipse.jdt.core.prefs Tue Jul 10 14:00:18 2012
@@ -0,0 +1,81 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6

Added: ace/sandbox/marrs/org.apache.ace.authentication.itest/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.authentication.itest/bnd.bnd?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.authentication.itest/bnd.bnd (added)
+++ ace/sandbox/marrs/org.apache.ace.authentication.itest/bnd.bnd Tue Jul 10 14:00:18 2012
@@ -0,0 +1,106 @@
+Test-Cases: ${classes;CONCRETE;EXTENDS;org.apache.ace.it.authentication.AuthenticationTestBase}
+-buildpath: junit.osgi,\
+	osgi.core,\
+	osgi.cmpn,\
+	org.apache.ace.util;version=latest,\
+	org.apache.felix.dependencymanager,\
+	org.apache.ace.itest;version=latest,\
+	org.apache.ace.connectionfactory;version=latest,\
+	org.apache.ace.repository.api;version=latest,\
+	org.apache.ace.log;version=latest,\
+	org.apache.ace.server.log.store;version=latest,\
+	org.apache.ace.client.repository.api;version=latest,\
+	org.apache.ace.repository.impl;version=latest,\
+	org.apache.ace.discovery.api;version=latest,\
+	org.apache.ace.identification.api;version=latest,\
+	org.apache.ace.discovery.property;version=latest,\
+	org.apache.ace.identification.property;version=latest,\
+	org.apache.ace.httplistener;version=latest,\
+	org.apache.ace.obr.storage;version=latest
+-runrequire: bundle:(symbolicname=org.apache.felix.dependencymanager),\
+	bundle:(symbolicname=org.apache.felix.configadmin),\
+	bundle:(symbolicname=org.apache.felix.eventadmin),\
+	bundle:(symbolicname=org.knopflerfish.bundle.useradmin),\
+	bundle:(symbolicname=org.knopflerfish.log),\
+	bundle:(symbolicname=org.apache.ace.authentication),\
+	bundle:(symbolicname=org.apache.ace.authenticationprocessor.basicauth),\
+	bundle:(symbolicname=org.apache.ace.connectionfactory),\
+	bundle:(symbolicname=org.apache.ace.range.api),\
+	bundle:(symbolicname=org.apache.ace.discovery.api),\
+	bundle:(symbolicname=org.apache.ace.discovery.property),\
+	bundle:(symbolicname=org.apache.ace.identification.api),\
+	bundle:(symbolicname=org.apache.ace.identification.property),\
+	bundle:(symbolicname=org.apache.ace.log),\
+	bundle:(symbolicname=org.apache.ace.log.listener),\
+	bundle:(symbolicname=org.apache.ace.log.servlet),\
+	bundle:(symbolicname=org.apache.ace.server.log.store),\
+	bundle:(symbolicname=org.apache.ace.log.task),\
+	bundle:(symbolicname=org.apache.ace.gateway.log),\
+	bundle:(symbolicname=org.apache.ace.gateway.log.store),\
+	bundle:(symbolicname=org.apache.ace.httplistener),\
+	bundle:(symbolicname=org.apache.ace.repository.api),\
+	bundle:(symbolicname=org.apache.ace.repository.impl),\
+	bundle:(symbolicname=org.apache.ace.repository.servlet),\
+	bundle:(symbolicname=org.apache.ace.configurator.serveruseradmin),\
+	bundle:(symbolicname=org.apache.ace.obr.metadata),\
+	bundle:(symbolicname=org.apache.ace.obr.servlet),\
+	bundle:(symbolicname=org.apache.ace.obr.storage),\
+	bundle:(symbolicname=org.apache.ace.client.repository.api),\
+	bundle:(symbolicname=org.apache.ace.client.repository.impl),\
+	bundle:(symbolicname=org.apache.ace.client.repository.helper.base),\
+	bundle:(symbolicname=org.apache.ace.client.repository.helper.bundle),\
+	bundle:(symbolicname=org.apache.ace.client.repository.helper.configuration),\
+	bundle:(symbolicname=org.apache.ace.scheduler),\
+	bundle:(symbolicname=org.apache.ace.resourceprocessor.useradmin),\
+	bundle:(symbolicname=org.apache.ace.configurator.useradmin.task),\
+	bundle:(symbolicname=org.apache.felix.shell.tui),\
+	bundle:(symbolicname=org.apache.ace.itest),\
+	bundle:(symbolicname=org.apache.felix.http.jetty)
+-runfw: org.apache.felix.framework;version='[4,5)'
+-runbundles: org.apache.ace.obr.storage;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.obr.storage/generated/org.apache.ace.obr.storage.jar;version=latest,\
+	org.apache.ace.itest;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.itest/generated/org.apache.ace.itest.jar;version=latest,\
+	org.apache.felix.dependencymanager;resolution=file:/Users/marcel/dev/ace-bndtools/cnf/repo/org.apache.felix.dependencymanager/org.apache.felix.dependencymanager-3.1.0.jar;version='[3.1.0,3.1.1)',\
+	org.apache.felix.shell;resolution=http://bundles.bndtools.org.s3.amazonaws.com/org.apache.felix.shell/org.apache.felix.shell-1.4.2.jar;version='[1.4.2,1.4.3)',\
+	org.knopflerfish.bundle.useradmin;resolution=file:/Users/marcel/dev/ace-bndtools/cnf/repo/org.knopflerfish.bundle.useradmin/org.knopflerfish.bundle.useradmin-2.0.2.jar;version='[2.0.2,2.0.3)',\
+	org.apache.ace.client.repository.helper.configuration;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.client.repository.helper.configuration/generated/org.apache.ace.client.repository.helper.configuration.jar;version=latest,\
+	org.apache.ace.configurator.useradmin.task;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.configurator.useradmin.task/generated/org.apache.ace.configurator.useradmin.task.jar;version=latest,\
+	org.apache.ace.identification.property;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.identification.property/generated/org.apache.ace.identification.property.jar;version=latest,\
+	org.apache.felix.configadmin;resolution=http://bundles.bndtools.org.s3.amazonaws.com/org.apache.felix.configadmin/org.apache.felix.configadmin-1.2.8.jar;version='[1.2.8,1.2.9)',\
+	org.apache.ace.httplistener;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.httplistener/generated/org.apache.ace.httplistener.jar;version=latest,\
+	org.apache.ace.log.listener;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.log.listener/generated/org.apache.ace.log.listener.jar;version=latest,\
+	org.apache.ace.obr.servlet;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.obr.servlet/generated/org.apache.ace.obr.servlet.jar;version=latest,\
+	org.apache.ace.deployment.provider.api;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.deployment.provider.api/generated/org.apache.ace.deployment.provider.api.jar;version=latest,\
+	org.apache.ace.scheduler;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.scheduler/generated/org.apache.ace.scheduler.jar;version=latest,\
+	org.apache.ace.log.servlet;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.log.servlet/generated/org.apache.ace.log.servlet.jar;version=latest,\
+	org.apache.ace.gateway.log;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.gateway.log/generated/org.apache.ace.gateway.log.jar;version=latest,\
+	biz.aQute.junit;resolution=http://bundles.bndtools.org.s3.amazonaws.com/biz.aQute.junit/biz.aQute.junit-1.0.0.jar;version='[1.0.0,1.0.1)',\
+	org.apache.ace.obr.metadata;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.obr.metadata/generated/org.apache.ace.obr.metadata.jar;version=latest,\
+	org.apache.ace.authentication.api;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.authentication.api/generated/org.apache.ace.authentication.api.jar;version=latest,\
+	org.knopflerfish.log;resolution=file:/Users/marcel/dev/ace-bndtools/cnf/repo/org.knopflerfish.log/org.knopflerfish.log-2.0.2.jar;version='[2.0.2,2.0.3)',\
+	org.apache.felix.http.jetty;resolution=http://bundles.bndtools.org.s3.amazonaws.com/org.apache.felix.http.jetty/org.apache.felix.http.jetty-2.2.0.jar;version='[2.2.0,2.2.1)',\
+	org.apache.ace.client.repository.impl;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.client.repository.impl/generated/org.apache.ace.client.repository.impl.jar;version=latest,\
+	org.apache.ace.connectionfactory;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.connectionfactory/generated/org.apache.ace.connectionfactory.jar;version=latest,\
+	org.apache.ace.authentication;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.authentication/generated/org.apache.ace.authentication.jar;version=latest,\
+	org.apache.ace.client.repository.helper.bundle;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.client.repository.helper.bundle/generated/org.apache.ace.client.repository.helper.bundle.jar;version=latest,\
+	org.apache.ace.discovery.api;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.discovery.api/generated/org.apache.ace.discovery.api.jar;version=latest,\
+	org.apache.felix.shell.tui;resolution=http://bundles.bndtools.org.s3.amazonaws.com/org.apache.felix.shell.tui/org.apache.felix.shell.tui-1.4.1.jar;version='[1.4.1,1.4.2)',\
+	org.apache.ace.configurator.serveruseradmin;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.configurator.serveruseradmin/generated/org.apache.ace.configurator.serveruseradmin.jar;version=latest,\
+	org.apache.ace.range.api;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.range.api/generated/org.apache.ace.range.api.jar;version=latest,\
+	org.apache.ace.repository.impl;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.repository.impl/generated/org.apache.ace.repository.impl.jar;version=latest,\
+	org.apache.ace.discovery.property;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.discovery.property/generated/org.apache.ace.discovery.property.jar;version=latest,\
+	org.apache.ace.log.task;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.log.task/generated/org.apache.ace.log.task.jar;version=latest,\
+	org.apache.ace.log;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.log/generated/org.apache.ace.log.jar;version=latest,\
+	osgi.cmpn;resolution=http://bundles.bndtools.org.s3.amazonaws.com/osgi.cmpn/osgi.cmpn-4.2.1.jar;version='[4.2.1,4.2.2)',\
+	org.apache.ace.identification.api;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.identification.api/generated/org.apache.ace.identification.api.jar;version=latest,\
+	org.apache.ace.util;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.util/generated/org.apache.ace.util.jar;version=latest,\
+	org.apache.ace.resourceprocessor.useradmin;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.resourceprocessor.useradmin/generated/org.apache.ace.resourceprocessor.useradmin.jar;version=latest,\
+	org.apache.ace.gateway.log.store;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.gateway.log.store/generated/org.apache.ace.gateway.log.store.jar;version=latest,\
+	org.apache.felix.eventadmin;resolution=file:/Users/marcel/dev/ace-bndtools/cnf/repo/org.apache.felix.eventadmin/org.apache.felix.eventadmin-1.2.14.jar;version='[1.2.14,1.2.15)',\
+	org.apache.ace.authenticationprocessor.basicauth;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.authenticationprocessor.basicauth/generated/org.apache.ace.authenticationprocessor.basicauth.jar;version=latest,\
+	org.apache.ace.client.repository.helper.base;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.client.repository.helper.base/generated/org.apache.ace.client.repository.helper.base.jar;version=latest,\
+	org.apache.ace.managementagent;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.managementagent/generated/org.apache.ace.managementagent.jar;version=latest,\
+	org.apache.ace.repository.api;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.repository.api/generated/org.apache.ace.repository.api.jar;version=latest,\
+	org.apache.ace.client.repository.api;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.client.repository.api/generated/org.apache.ace.client.repository.api.jar;version=latest,\
+	org.apache.ace.server.log.store;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.server.log.store/generated/org.apache.ace.server.log.store.jar;version=latest,\
+	org.apache.ace.repository.servlet;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.repository.servlet/generated/org.apache.ace.repository.servlet.jar;version=latest
+Private-Package: org.apache.ace.it.authentication
\ No newline at end of file

Added: ace/sandbox/marrs/org.apache.ace.authentication.itest/build.xml
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.authentication.itest/build.xml?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.authentication.itest/build.xml (added)
+++ ace/sandbox/marrs/org.apache.ace.authentication.itest/build.xml Tue Jul 10 14:00:18 2012
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="project" default="build"> 
+	<import file="../cnf/build.xml"/>
+</project>

Added: ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/AuthenticationTestBase.java
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/AuthenticationTestBase.java?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/AuthenticationTestBase.java (added)
+++ ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/AuthenticationTestBase.java Tue Jul 10 14:00:18 2012
@@ -0,0 +1,114 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.ace.it.authentication;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+
+import org.apache.ace.connectionfactory.ConnectionFactory;
+import org.apache.ace.it.IntegrationTestBase;
+import org.apache.ace.repository.Repository;
+import org.osgi.service.useradmin.UserAdmin;
+
+/**
+ * Provides a common base class for all authentication integration tests.
+ */
+public class AuthenticationTestBase extends IntegrationTestBase {
+
+    /**
+     * Imports a single user into the user repository.
+     * 
+     * @param userName the name of the user to import;
+     * @param password the password of the user to import.
+     * @throws Exception in case of exceptions during the import.
+     */
+    protected final void importSingleUser(Repository userRepository, String userName, String password) throws Exception {
+        ByteArrayInputStream bis = new ByteArrayInputStream((
+            "<roles>" +
+                "<user name=\"" + userName + "\">" +
+                "<properties><username>" + userName + "</username></properties>" +
+                "<credentials><password type=\"String\">" + password + "</password></credentials>" +
+                "</user>" +
+            "</roles>").getBytes());
+
+        assertTrue("Committing test user data failed!", userRepository.commit(bis, userRepository.getRange().getHigh()));
+    }
+
+    /**
+     * Waits for a HTTP URL to become 'available', will retry every 100 milliseconds until it is available or timeout
+     * has been exceeded. Available in this context means the specified status code is returned when accessing the URL.
+     *
+     * @param url HTTP URL that should be tested for availability.
+     * @param responseCode The response code to be expected on the specified URL when it is available.
+     * @param timeout Amount of milliseconds to keep trying to access the URL.
+     * @return True if the response of the URL has the specified status code within the specified timeout delay, false otherwise.
+     * @throws IllegalArgumentException If the specified URL does not use the HTTP protocol.
+     */
+    protected final boolean waitForURL(ConnectionFactory connectionFactory, URL url, int responseCode, int timeout) {
+        long deadline = System.currentTimeMillis() + timeout;
+        while (System.currentTimeMillis() < deadline) {
+            try {
+                URLConnection connection = connectionFactory.createConnection(url);
+
+                connection.connect();
+
+                if (connection instanceof HttpURLConnection) {
+                    int respCode = ((HttpURLConnection) connection).getResponseCode();
+                    if (respCode == responseCode) {
+                        return true;
+                    }
+                    else {
+                        System.err.println("Got response code " + respCode + " for " + url);
+                    }
+                }
+            } catch (ClassCastException cce) {
+                throw new IllegalArgumentException("Expected url to be an HTTP url, not: " + url.toString(), cce);
+            }
+            catch (IOException ioe) {
+                // retry
+            }
+            try {
+                Thread.sleep(100);
+            }
+            catch (InterruptedException ie) {
+                return false;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Waits until a user with a given name appears in the user admin.
+     * 
+     * @param userAdmin the user admin to use;
+     * @param userName the name of the user to wait for.
+     * @throws Exception in case of exceptions during the wait.
+     */
+    protected final void waitForUser(UserAdmin userAdmin, String userName) throws Exception {
+        int count = 0;
+        while ((userAdmin.getRole(userName) == null) && (count++ < 60)) {
+            Thread.sleep(100);
+        }
+        assertTrue("Failed to obtain user from userAdmin!", count != 60);
+    }
+}

Added: ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java (added)
+++ ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/LogAuthenticationTest.java Tue Jul 10 14:00:18 2012
@@ -0,0 +1,298 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.it.authentication;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+import org.apache.ace.client.repository.SessionFactory;
+import org.apache.ace.connectionfactory.ConnectionFactory;
+import org.apache.ace.http.listener.constants.HttpConstants;
+import org.apache.ace.log.Log;
+import org.apache.ace.log.LogDescriptor;
+import org.apache.ace.log.LogEvent;
+import org.apache.ace.repository.Repository;
+import org.apache.ace.repository.impl.constants.RepositoryConstants;
+import org.apache.ace.discovery.property.constants.*;
+import org.apache.ace.identification.property.constants.*;
+import org.apache.ace.server.log.store.LogStore;
+import org.apache.ace.test.constants.TestConstants;
+import org.apache.felix.dm.Component;
+import org.osgi.framework.Constants;
+import org.osgi.service.http.HttpService;
+import org.osgi.service.useradmin.UserAdmin;
+
+/**
+ * Integration tests for the audit log. Both a server and a target are setup
+ * on the same machine. The audit log is run and we check if it is indeed
+ * replicated to the server.
+ */
+public class LogAuthenticationTest extends AuthenticationTestBase {
+
+    private static final String AUDITLOG_ENDPOINT = "/auditlog";
+
+    private static final String HOST = "localhost";
+    private static final String TARGET_ID = "target-id";
+
+    private volatile Log m_auditLog;
+    private volatile LogStore m_serverStore;
+    private volatile Runnable m_auditLogSyncTask;
+    private volatile Repository m_userRepository;
+    private volatile UserAdmin m_userAdmin;
+    private volatile ConnectionFactory m_connectionFactory;
+
+    /**
+     * @return the PAX Exam configuration options, never <code>null</code>.
+     */
+//    @Configuration
+//    public Option[] configuration() {
+//        return options(
+//            systemProperty("org.osgi.service.http.port").value("" + TestConstants.PORT),
+//            new CleanCachesOption(),
+//            junitBundles(),
+//            provision(
+//                // Misc bundles...
+//                Osgi.compendium(),
+//                Felix.dependencyManager(),
+//                jetty(),
+//                Felix.configAdmin(),
+//                Felix.preferences(),
+//                Felix.eventAdmin(),
+//                Knopflerfish.useradmin(),
+//                Knopflerfish.log(),
+//                // ACE core bundles...
+//                Ace.util(),
+//                Ace.authentication(),
+//                Ace.authenticationProcessorBasicAuth(),
+//                Ace.connectionFactory(),
+//                Ace.rangeApi(),
+//                Ace.discoveryApi(),
+//                Ace.discoveryProperty(),
+//                Ace.identificationApi(),
+//                Ace.identificationProperty(),
+//                Ace.log(),
+//                Ace.logListener(),
+//                Ace.logServlet(),
+//                Ace.serverLogStore(),
+//                Ace.logTask(),
+//                Ace.targetLog(),
+//                Ace.targetLogStore(),
+//                Ace.httplistener(),
+//                Ace.repositoryApi(),
+//                Ace.repositoryImpl(),
+//                Ace.repositoryServlet(),
+//                Ace.configuratorServeruseradmin(),
+//                Ace.obrMetadata(),
+//                Ace.obrServlet(),
+//                Ace.obrStorage(),
+//                Ace.clientRepositoryApi(),
+//                Ace.clientRepositoryImpl(),
+//                Ace.clientRepositoryHelperBase(),
+//                Ace.clientRepositoryHelperBundle(),
+//                Ace.clientRepositoryHelperConfiguration(),
+//                Ace.scheduler(),
+//                Ace.resourceprocessorUseradmin(),
+//                Ace.configuratorUseradminTask()
+//            )
+//        );
+//    }
+
+    public void setUp() throws Exception {
+        super.setUp();
+
+        String baseURL = "http://" + HOST + ":" + TestConstants.PORT;
+
+        URL testURL = new URL(baseURL.concat(AUDITLOG_ENDPOINT));
+        assertTrue("Failed to access auditlog in time!", waitForURL(m_connectionFactory, testURL, 401, 15000));
+
+        String userName = "d";
+        String password = "f";
+
+        importSingleUser(m_userRepository, userName, password);
+        waitForUser(m_userAdmin, userName);
+
+        configureFactory("org.apache.ace.connectionfactory", 
+            "authentication.baseURL", baseURL.concat(AUDITLOG_ENDPOINT), 
+            "authentication.type", "basic",
+            "authentication.user.name", userName,
+            "authentication.user.password", password);
+
+        assertTrue("Failed to access auditlog in time!", waitForURL(m_connectionFactory, testURL, 200, 15000));
+    }
+
+    /**
+     * Tests that accessing the log servlet with authentication works when given the right credentials.
+     */
+    public void testAccessLogServletWithCorrectCredentialsOk() throws Exception {
+        String tid1 = "42";
+        String tid2 = "47";
+
+        // prepare the store
+        List<LogEvent> events = new ArrayList<LogEvent>();
+        events.add(new LogEvent(tid1, 1, 1, 1, 1, new Properties()));
+        events.add(new LogEvent(tid2, 1, 1, 1, 1, new Properties()));
+        m_serverStore.put(events);
+
+        List<String> result = getResponse("http://localhost:" + TestConstants.PORT + "/auditlog/query");
+        assert result.size() > 1 : "We expect at least two logs on the server.";
+    }
+
+    /**
+     * Tests that the log synchronization works when the log servlet has authentication enabled.
+     */
+    public void testLogSynchronizationOk() throws Exception {
+        final int type = 12345;
+        
+        // now log another event
+        Properties props = new Properties();
+        props.put("one", "value1");
+        props.put("two", "value2");
+        m_auditLog.log(type, props);
+
+        boolean found = false;
+        
+        long startTime = System.currentTimeMillis();
+        long waitTime = 5000; // milliseconds
+        
+        while (!found && ((System.currentTimeMillis() - startTime) < waitTime)) {
+            // synchronize again
+            m_auditLogSyncTask.run();
+
+            // get and evaluate results (note that there is some concurrency that might interfere with this test)
+            List<LogDescriptor> ranges2 = m_serverStore.getDescriptors();
+            if (ranges2.isEmpty()) {
+                continue;
+            }
+
+            List<LogEvent> events = m_serverStore.get(ranges2.get(0));
+            for (LogEvent event : events) {
+                if (event.getType() == type) {
+                    Dictionary properties = event.getProperties();
+                    assertEquals("value1", properties.get("one"));
+                    assertEquals("value2", properties.get("two"));
+                    found = true;
+                    break;
+                }
+            }
+
+            // wait if we have not found anything yet
+            if (!found) {
+                TimeUnit.MILLISECONDS.sleep(100);
+            }
+        }
+
+        assertTrue("We could not retrieve our audit log event (after 5 seconds).", found);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void before() throws Exception {
+        
+        String baseURL = "http://" + HOST + ":" + TestConstants.PORT;
+
+        getService(SessionFactory.class).createSession("test-session-ID");
+
+        configureFactory("org.apache.ace.server.repository.factory",
+            RepositoryConstants.REPOSITORY_NAME, "users",
+            RepositoryConstants.REPOSITORY_CUSTOMER, "apache",
+            RepositoryConstants.REPOSITORY_MASTER, "true");
+
+        configure("org.apache.ace.configurator.useradmin.task.UpdateUserAdminTask",
+            "repositoryName", "users",
+            "repositoryCustomer", "apache");
+        
+        configure("org.apache.ace.scheduler",
+            "org.apache.ace.configurator.useradmin.task.UpdateUserAdminTask", "100");
+
+        configure(DiscoveryConstants.DISCOVERY_PID,
+            DiscoveryConstants.DISCOVERY_URL_KEY, baseURL);
+        configure(IdentificationConstants.IDENTIFICATION_PID,
+            IdentificationConstants.IDENTIFICATION_TARGETID_KEY, TARGET_ID);
+
+        configureFactory("org.apache.ace.target.log.store.factory",
+            "name", "auditlog");
+        configureFactory("org.apache.ace.target.log.factory",
+            "name", "auditlog");
+        configureFactory("org.apache.ace.target.log.sync.factory",
+            "name", "auditlog");
+        configureFactory("org.apache.ace.server.log.servlet.factory",
+            "name", "auditlog",
+            HttpConstants.ENDPOINT, AUDITLOG_ENDPOINT,
+            "authentication.enabled", "true");
+        configureFactory("org.apache.ace.server.log.store.factory",
+            "name", "auditlog");
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Component[] getDependencies() {
+        return new Component[] {
+            createComponent()
+                .setImplementation(this)
+                .add(createServiceDependency().setService(UserAdmin.class).setRequired(true))
+                .add(createServiceDependency()
+                    .setService(Repository.class, "(&(" + RepositoryConstants.REPOSITORY_NAME + "=users)(" + RepositoryConstants.REPOSITORY_CUSTOMER + "=apache))")
+                    .setRequired(true))
+                .add(createServiceDependency().setService(ConnectionFactory.class).setRequired(true))
+                .add(createServiceDependency().setService(HttpService.class).setRequired(true))
+                .add(createServiceDependency().setService(Log.class, "(&(" + Constants.OBJECTCLASS + "=" + Log.class.getName() + ")(name=auditlog))").setRequired(true))
+                .add(createServiceDependency().setService(LogStore.class, "(&(" + Constants.OBJECTCLASS + "=" + LogStore.class.getName() + ")(name=auditlog))").setRequired(true))
+                .add(createServiceDependency().setService(Runnable.class, "(&(" + Constants.OBJECTCLASS + "=" + Runnable.class.getName() + ")(taskName=auditlog))").setRequired(true))
+        };
+    }
+
+    private List<String> getResponse(String request) throws IOException {
+        List<String> result = new ArrayList<String>();
+        InputStream in = null;
+        try {
+            in = m_connectionFactory.createConnection(new URL(request)).getInputStream();
+            byte[] response = new byte[in.available()];
+            in.read(response);
+
+            StringBuilder element = new StringBuilder();
+            for (byte b : response) {
+                switch(b) {
+                    case '\n' :
+                        result.add(element.toString());
+                        element = new StringBuilder();
+                        break;
+                    default :
+                        element.append(b);
+                }
+            }
+        }
+        finally {
+            try {
+                in.close();
+            }
+            catch (Exception e) {
+                // no problem.
+            }
+        }
+        return result;
+    }
+}

Added: ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java (added)
+++ ace/sandbox/marrs/org.apache.ace.authentication.itest/src/org/apache/ace/it/authentication/ObrAuthenticationTest.java Tue Jul 10 14:00:18 2012
@@ -0,0 +1,316 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.ace.it.authentication;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.jar.Attributes;
+import java.util.jar.JarOutputStream;
+import java.util.jar.Manifest;
+
+import org.apache.ace.client.repository.SessionFactory;
+import org.apache.ace.client.repository.helper.bundle.BundleHelper;
+import org.apache.ace.client.repository.repository.ArtifactRepository;
+import org.apache.ace.connectionfactory.ConnectionFactory;
+import org.apache.ace.obr.storage.file.constants.OBRFileStoreConstants;
+import org.apache.ace.repository.Repository;
+import org.apache.ace.repository.impl.constants.RepositoryConstants;
+import org.apache.ace.test.constants.TestConstants;
+import org.apache.ace.test.utils.FileUtils;
+import org.apache.ace.test.utils.NetUtils;
+import org.apache.felix.dm.Component;
+import org.osgi.framework.Constants;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.useradmin.UserAdmin;
+
+/**
+ * Provides a test case in which the OBR has authentication enabled, and the 
+ * rest of ACE has to remain function correctly.
+ */
+public class ObrAuthenticationTest extends AuthenticationTestBase {
+    
+    private volatile String m_endpoint;
+    private volatile File m_storeLocation;
+    private volatile String m_authConfigPID;
+    
+    /* Injected by dependency manager */
+    private volatile ArtifactRepository m_artifactRepository; 
+    private volatile Repository m_userRepository;
+    private volatile UserAdmin m_userAdmin;
+    private volatile ConfigurationAdmin m_configAdmin;
+    private volatile ConnectionFactory m_connectionFactory;
+
+    /**
+     * @return the PAX Exam configuration options, never <code>null</code>.
+     */
+//    @Configuration
+//    public Option[] configuration() {
+//        return options(
+//            systemProperty("org.osgi.service.http.port").value("" + TestConstants.PORT),
+//            new CleanCachesOption(),
+//            junitBundles(),
+//            provision(
+//                // Misc bundles...
+//                Osgi.compendium(),
+//                Felix.dependencyManager(),
+//                jetty(),
+//                Felix.configAdmin(),
+//                Felix.preferences(),
+//                Felix.eventAdmin(),
+//                Knopflerfish.useradmin(),
+//                Knopflerfish.log(),
+//                // ACE core bundles...
+//                Ace.util(),
+//                Ace.authentication(),
+//                Ace.authenticationProcessorBasicAuth(),
+//                Ace.connectionFactory(),
+//                Ace.rangeApi(),
+//                Ace.log(),
+//                Ace.serverLogStore(),
+//                Ace.httplistener(),
+//                Ace.repositoryApi(),
+//                Ace.repositoryImpl(),
+//                Ace.repositoryServlet(),
+//                Ace.configuratorServeruseradmin(),
+//                Ace.obrMetadata(),
+//                Ace.obrServlet(),
+//                Ace.obrStorage(),
+//                Ace.clientRepositoryApi(),
+//                Ace.clientRepositoryImpl(),
+//                Ace.clientRepositoryHelperBase(),
+//                Ace.clientRepositoryHelperBundle(),
+//                Ace.clientRepositoryHelperConfiguration(),
+//                Ace.scheduler(),
+//                Ace.resourceprocessorUseradmin(),
+//                Ace.configuratorUseradminTask()
+//            )
+//        );
+//    }
+
+    @Override
+    public void setUp() throws Exception {
+        m_endpoint = "/obr";
+        
+        String tmpDir = System.getProperty("java.io.tmpdir");
+        m_storeLocation = new File(tmpDir, "store");
+        m_storeLocation.delete();
+        m_storeLocation.mkdirs();
+        
+        super.setUp();
+
+        String userName = "d";
+        String password = "f";
+
+        importSingleUser(m_userRepository, userName, password);
+        waitForUser(m_userAdmin, userName);
+
+        URL obrURL = new URL("http://localhost:" + TestConstants.PORT + m_endpoint + "/");
+        m_artifactRepository.setObrBase(obrURL);
+
+        URL testURL = new URL(obrURL, "repository.xml");
+
+        assertTrue("Failed to access OBR in time!", waitForURL(m_connectionFactory, testURL, 401, 15000));
+
+        m_authConfigPID = configureFactory("org.apache.ace.connectionfactory", 
+                "authentication.baseURL", obrURL.toExternalForm(), 
+                "authentication.type", "basic",
+                "authentication.user.name", userName,
+                "authentication.user.password", password);
+
+        assertTrue("Failed to access auditlog in time!", waitForURL(m_connectionFactory, testURL, 200, 15000));
+    }
+
+    /**
+     * Tears down the set up of the test case.
+     * 
+     * @throws java.lang.Exception not part of this test case.
+     */
+    public void tearDown() throws Exception {
+        FileUtils.removeDirectoryWithContent(m_storeLocation);
+    }
+
+    /**
+     * Test that we can retrieve the 'repository.xml' from the OBR.
+     */
+    public void testAccessObrRepositoryWithCredentialsOk() throws IOException {
+        URL url = new URL("http://localhost:" + TestConstants.PORT + m_endpoint + "/repository.xml");
+        
+        URLConnection conn = m_connectionFactory.createConnection(url);
+        assertNotNull(conn);
+
+        Object content = conn.getContent();
+        assertNotNull(content);
+    }
+
+    /**
+     * Test that we cannot retrieve the 'repository.xml' from the OBR without any credentials.
+     */
+    //@Test(expected = IOException.class)
+    public void testAccessObrRepositoryWithoutCredentialsFail() throws IOException {
+        URL url = new URL("http://localhost:" + TestConstants.PORT + m_endpoint + "/repository.xml");
+        
+        // do NOT use connection factory as it will supply the credentials for us...
+        URLConnection conn = url.openConnection();
+        assertNotNull(conn);
+
+        // we expect a 401 for this URL...
+        NetUtils.waitForURL(url, 401, 15000);
+
+        // ...causing all other methods on URLConnection to fail...
+        conn.getContent(); // should fail!
+    }
+
+    /**
+     * Test that we cannot retrieve the 'repository.xml' from the OBR with incorrect credentials.
+     */
+    //@Test(expected = IOException.class)
+    public void testAccessObrRepositoryWithWrongCredentialsFail() throws IOException {
+        org.osgi.service.cm.Configuration configuration = m_configAdmin.getConfiguration(m_authConfigPID);
+        assertNotNull(configuration);
+
+        // Simulate incorrect credentials by updating the config of the connection factory...
+        configuration.getProperties().put("authentication.user.name", "foo");
+        
+        configuration.update();
+
+        URL url = new URL("http://localhost:" + TestConstants.PORT + m_endpoint + "/repository.xml");
+        
+        // do NOT use connection factory as it will supply the credentials for us...
+        URLConnection conn = url.openConnection();
+        assertNotNull(conn);
+
+        // we expect a 401 for this URL...
+        NetUtils.waitForURL(url, 401, 15000);
+
+        // ...causing all other methods on URLConnection to fail...
+        conn.getContent(); // should fail!
+    }
+
+    /**
+     * Test that an import of an artifact through the API of ACE works, making sure they can access an authenticated OBR as well.
+     */
+    public void testImportArtifactWithCredentialsOk() throws Exception {
+        // Use a valid JAR file, without a Bundle-SymbolicName header.
+        Manifest manifest = new Manifest();
+        Attributes attributes = manifest.getMainAttributes();
+        attributes.putValue(Attributes.Name.MANIFEST_VERSION.toString(), "1");
+        attributes.putValue(Constants.BUNDLE_MANIFESTVERSION, "2");
+        attributes.putValue(BundleHelper.KEY_SYMBOLICNAME, "org.apache.ace.test");
+
+        File temp = File.createTempFile("org.apache.ace.test", ".jar");
+        temp.deleteOnExit();
+        JarOutputStream jos = new JarOutputStream(new FileOutputStream(temp), manifest);
+        jos.close();
+
+        m_artifactRepository.importArtifact(temp.toURI().toURL(), true /* upload */);
+
+        assertEquals(1, m_artifactRepository.get().size());
+        assertTrue(m_artifactRepository.getResourceProcessors().isEmpty());
+
+        // Create a JAR file which looks like a resource processor supplying bundle.
+        attributes.putValue(BundleHelper.KEY_RESOURCE_PROCESSOR_PID, "someProcessor");
+        attributes.putValue(BundleHelper.KEY_VERSION, "1.0.0.processor");
+
+        temp = File.createTempFile("org.apache.ace.test", ".jar");
+        temp.deleteOnExit();
+        jos = new JarOutputStream(new FileOutputStream(temp), manifest);
+        jos.close();
+
+        m_artifactRepository.importArtifact(temp.toURI().toURL(), true);
+
+        assertEquals(1, m_artifactRepository.get().size());
+        assertEquals(1, m_artifactRepository.getResourceProcessors().size());
+    }
+
+    /**
+     * Test that an import of an artifact through the API of ACE works, making sure they can access an authenticated OBR as well.
+     */
+    //@Test(expected = IOException.class)
+    public void testImportArtifactWithoutCredentialsFail() throws Exception {
+        org.osgi.service.cm.Configuration configuration = m_configAdmin.getConfiguration(m_authConfigPID);
+        assertNotNull(configuration);
+
+        // Delete the credentials for the OBR-URL, thereby simulating wrong credentials for the OBR...
+        configuration.delete();
+
+        // Use a valid JAR file, without a Bundle-SymbolicName header.
+        Manifest manifest = new Manifest();
+        Attributes attributes = manifest.getMainAttributes();
+        attributes.putValue(Attributes.Name.MANIFEST_VERSION.toString(), "1");
+        attributes.putValue(Constants.BUNDLE_MANIFESTVERSION, "2");
+        attributes.putValue(BundleHelper.KEY_SYMBOLICNAME, "org.apache.ace.test");
+
+        File temp = File.createTempFile("org.apache.ace.test", ".jar");
+        temp.deleteOnExit();
+        JarOutputStream jos = new JarOutputStream(new FileOutputStream(temp), manifest);
+        jos.close();
+
+        m_artifactRepository.importArtifact(temp.toURI().toURL(), true /* upload */); // should fail!
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void before() throws Exception {
+        final String fileLocation = m_storeLocation.getAbsolutePath();
+
+        getService(SessionFactory.class).createSession("test-session-ID");
+
+        configureFactory("org.apache.ace.server.repository.factory",
+            RepositoryConstants.REPOSITORY_NAME, "users",
+            RepositoryConstants.REPOSITORY_CUSTOMER, "apache",
+            RepositoryConstants.REPOSITORY_MASTER, "true");
+        configure("org.apache.ace.configurator.useradmin.task.UpdateUserAdminTask",
+            "repositoryName", "users",
+            "repositoryCustomer", "apache");
+        configure("org.apache.ace.scheduler",
+            "org.apache.ace.configurator.useradmin.task.UpdateUserAdminTask", "100");
+
+        configure("org.apache.ace.obr.servlet", 
+            "OBRInstance", "singleOBRServlet", 
+            "org.apache.ace.server.servlet.endpoint", m_endpoint, 
+            "authentication.enabled", "true");
+        configure("org.apache.ace.obr.storage.file", 
+            "OBRInstance", "singleOBRStore",
+            OBRFileStoreConstants.FILE_LOCATION_KEY, fileLocation);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Component[] getDependencies() {
+        return new Component[] {
+            createComponent()
+                .setImplementation(this)
+                .add(createServiceDependency().setService(ArtifactRepository.class).setRequired(true))
+                .add(createServiceDependency().setService(ConnectionFactory.class).setRequired(true))
+                .add(createServiceDependency().setService(ConfigurationAdmin.class).setRequired(true))
+                .add(createServiceDependency().setService(UserAdmin.class).setRequired(true))
+                .add(createServiceDependency()
+                    .setService(Repository.class, "(&(" + RepositoryConstants.REPOSITORY_NAME + "=users)(" + RepositoryConstants.REPOSITORY_CUSTOMER + "=apache))")
+                    .setRequired(true))
+        };
+    }
+}

Added: ace/sandbox/marrs/org.apache.ace.itest/.classpath
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.itest/.classpath?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.itest/.classpath (added)
+++ ace/sandbox/marrs/org.apache.ace.itest/.classpath Tue Jul 10 14:00:18 2012
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" output="bin_test" path="test"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: ace/sandbox/marrs/org.apache.ace.itest/.project
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.itest/.project?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.itest/.project (added)
+++ ace/sandbox/marrs/org.apache.ace.itest/.project Tue Jul 10 14:00:18 2012
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.apache.ace.itest</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>bndtools.core.bndbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>bndtools.core.bndnature</nature>
+	</natures>
+</projectDescription>

Added: ace/sandbox/marrs/org.apache.ace.itest/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.itest/.settings/org.eclipse.jdt.core.prefs?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.itest/.settings/org.eclipse.jdt.core.prefs (added)
+++ ace/sandbox/marrs/org.apache.ace.itest/.settings/org.eclipse.jdt.core.prefs Tue Jul 10 14:00:18 2012
@@ -0,0 +1,11 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6

Added: ace/sandbox/marrs/org.apache.ace.itest/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.itest/bnd.bnd?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.itest/bnd.bnd (added)
+++ ace/sandbox/marrs/org.apache.ace.itest/bnd.bnd Tue Jul 10 14:00:18 2012
@@ -0,0 +1,18 @@
+-buildpath: osgi.core,\
+	osgi.cmpn,\
+	org.apache.ace.util;version=latest,\
+	org.apache.felix.dependencymanager,\
+	junit.osgi
+Export-Package: org.apache.ace.it
+-runrequire: bundle:(symbolicname=org.apache.felix.dependencymanager),\
+	bundle:(symbolicname=osgi.cmpn),\
+	bundle:(symbolicname=org.apache.felix.shell.tui)
+-runfw: org.apache.felix.framework;version='[4,5)'
+-runee: JavaSE-1.6
+-runbundles: org.apache.ace.util;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.util/generated/org.apache.ace.util.jar;version=latest,\
+	org.apache.felix.shell;resolution=http://bundles.bndtools.org.s3.amazonaws.com/org.apache.felix.shell/org.apache.felix.shell-1.4.2.jar;version='[1.4.2,1.4.3)',\
+	org.apache.felix.dependencymanager;resolution=file:/Users/marcel/dev/ace-bndtools/cnf/repo/org.apache.felix.dependencymanager/org.apache.felix.dependencymanager-3.1.0.jar;version='[3.1.0,3.1.1)',\
+	org.apache.ace.deployment.provider.api;resolution=file:/Users/marcel/dev/ace-bndtools/org.apache.ace.deployment.provider.api/generated/org.apache.ace.deployment.provider.api.jar;version=latest,\
+	org.apache.felix.shell.tui;resolution=http://bundles.bndtools.org.s3.amazonaws.com/org.apache.felix.shell.tui/org.apache.felix.shell.tui-1.4.1.jar;version='[1.4.1,1.4.2)',\
+	biz.aQute.junit;resolution=http://bundles.bndtools.org.s3.amazonaws.com/biz.aQute.junit/biz.aQute.junit-1.0.0.jar;version='[1.0.0,1.0.1)',\
+	osgi.cmpn;resolution=http://bundles.bndtools.org.s3.amazonaws.com/osgi.cmpn/osgi.cmpn-4.2.1.jar;version='[4.2.1,4.2.2)'

Added: ace/sandbox/marrs/org.apache.ace.itest/build.xml
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.itest/build.xml?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.itest/build.xml (added)
+++ ace/sandbox/marrs/org.apache.ace.itest/build.xml Tue Jul 10 14:00:18 2012
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="project" default="build"> 
+	<import file="../cnf/build.xml"/>
+</project>

Added: ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/ExampleTest.java
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/ExampleTest.java?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/ExampleTest.java (added)
+++ ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/ExampleTest.java Tue Jul 10 14:00:18 2012
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.it;
+
+import java.io.IOException;
+
+import junit.framework.Assert;
+
+import org.apache.felix.dm.Component;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+/**
+ * This class serves as a minimal example of our integration tests. Also, if this test fails, something is likely
+ * wrong with the environment
+ */
+public class ExampleTest extends IntegrationTestBase {
+
+//    @Configuration
+//    public Option[] configuration() {
+//        return options(
+//            // you can add additional directives, e.g. systemProperty or VMOptions here
+//            junitBundles(),
+//            provision(
+//                Osgi.compendium(),
+//                Felix.dependencyManager()
+//                // add additional bundles here
+//            )
+//        );
+//    }
+
+    protected void before() throws IOException {
+        // configure the services you need; you cannot use the injected members yet
+    }
+
+    protected Component[] getDependencies() {
+        return new Component[] {
+                // create Dependency Manager components that should be started before the
+                // test starts.
+                createComponent()
+                    .setImplementation(this)
+                    .add(createServiceDependency()
+                        .setService(PackageAdmin.class)
+                        .setRequired(true))
+        };
+    }           
+
+    // You can inject services as usual.
+    private volatile PackageAdmin m_packageAdmin;
+
+    public void testExample() throws Exception {
+        Assert.assertEquals("Hey, who stole my package!",
+                0,
+                m_packageAdmin.getExportedPackage("org.osgi.framework").getExportingBundle().getBundleId());
+    }
+}

Added: ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/IntegrationTestBase.java
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/IntegrationTestBase.java?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/IntegrationTestBase.java (added)
+++ ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/IntegrationTestBase.java Tue Jul 10 14:00:18 2012
@@ -0,0 +1,244 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.it;
+
+import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.apache.ace.test.utils.Util.properties;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import junit.framework.TestCase;
+
+import static junit.framework.Assert.*;
+
+import org.apache.felix.dm.Component;
+import org.apache.felix.dm.ComponentDependencyDeclaration;
+import org.apache.felix.dm.ComponentStateListener;
+import org.apache.felix.dm.DependencyManager;
+import org.apache.felix.dm.ServiceDependency;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * Base class for integration tests. There is no technical reason to use this, but it might make
+ * your life easier.<br>
+ * <br>
+ * {@link org.apache.ace.it.ExampleTest} shows a minimal example of an integration test.
+ *
+ */
+public class IntegrationTestBase extends TestCase {
+    /**
+     * If we have to wait for a service, wait this amount of seconds.
+     */
+    private static final int SERVICE_TIMEOUT = 5;
+
+    protected BundleContext m_bundleContext = FrameworkUtil.getBundle(this.getClass()).getBundleContext();
+    protected DependencyManager m_dependencyManager;
+
+    /**
+     * The 'before' callback will be called after the components from {@link #getDependencies} have been
+     * added, but you cannot necessarily rely on injected members here. You can use the {@link #configure} and
+     * {@link #configureFactory} methods, as well as the {@link #getService} methods.<br>
+     * <br>
+     * The {@link #before} callback is most useful for configuring services that have been provisioned
+     * in the 'configuration' method.
+     */
+    protected void before() throws Exception {}
+
+    /**
+     * Gets a list of components that must be started before the test is started; this useful to
+     * (a) add additional services, e.g. services that should be picked up by the service under
+     * test, or (b) to declare 'this' as a component, and get services injected.
+     */
+    protected Component[] getDependencies() {
+        return new Component[0];
+    }
+
+    /**
+     * Write configuration for a single service. For example,
+     * <pre>
+     *   configure("org.apache.felix.http",
+     *     "org.osgi.service.http.port", "1234");
+     * </pre>
+     */
+    protected void configure(String pid, String... configuration) throws IOException {
+        Properties props = properties(configuration);
+        Configuration config = getConfiguration(pid);
+        config.update(props);
+    }
+
+    /**
+     * Creates a factory configuration with the given properties, just like {@link #configure}.
+     * @return The PID of newly created configuration.
+     */
+    protected String configureFactory(String factoryPid, String... configuration) throws IOException {
+        Properties props = properties(configuration);
+        Configuration config = createFactoryConfiguration(factoryPid);
+        config.update(props);
+        return config.getPid();
+    }
+
+    public void setUp() throws Exception {
+    	System.out.println("setup");
+        m_dependencyManager = new DependencyManager(m_bundleContext);
+        Component[] components = getDependencies();
+        ComponentCounter listener = new ComponentCounter(components);
+
+        // Register our listener for all the services...
+        for (Component component : components) {
+            component.addStateListener(listener);
+        }
+
+        // Then give them to the dependency manager...
+        for (Component component : components) {
+            m_dependencyManager.add(component);
+        }
+
+        // Call back the implementation...
+        before();
+
+        // And wait for all components to come online.
+        try {
+            if (!listener.waitForEmpty(SERVICE_TIMEOUT, SECONDS)) {
+                fail("Not all components were started. Still missing the following:\n" + listener.componentsString());
+            }
+        }
+        catch (InterruptedException e) {
+            fail("Interrupted while waiting for services to get started.");
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    protected <T> T getService(Class<T> serviceClass, String filterString) throws InvalidSyntaxException {
+        T serviceInstance = null;
+
+        ServiceTracker serviceTracker;
+        if (filterString == null) {
+            serviceTracker = new ServiceTracker(m_bundleContext, serviceClass.getName(), null);
+        }
+        else {
+            String classFilter = "(" + Constants.OBJECTCLASS + "=" + serviceClass.getName() + ")";
+            filterString = "(&" + classFilter + filterString + ")";
+            serviceTracker = new ServiceTracker(m_bundleContext, m_bundleContext.createFilter(filterString), null);
+        }
+        serviceTracker.open();
+        try {
+            serviceInstance = (T) serviceTracker.waitForService(SERVICE_TIMEOUT * 1000);
+
+            if (serviceInstance == null) {
+                fail(serviceClass + " service not found.");
+            }
+            else {
+                return serviceInstance;
+            }
+        }
+        catch (InterruptedException e) {
+            e.printStackTrace();
+            fail(serviceClass + " service not available: " + e.toString());
+        }
+
+        return serviceInstance;
+    }
+
+    protected <T> T getService(Class<T> serviceClass) {
+        try {
+            return getService(serviceClass, null);
+        }
+        catch (InvalidSyntaxException e) {
+            return null;
+            // Will not happen, since we don't pass in a filter.
+        }
+    }
+
+    private Configuration getConfiguration(String pid) throws IOException {
+        ConfigurationAdmin admin = getService(ConfigurationAdmin.class);
+        return admin.getConfiguration(pid, null);
+    }
+
+    private Configuration createFactoryConfiguration(String factoryPid) throws IOException {
+        ConfigurationAdmin admin = getService(ConfigurationAdmin.class);
+        return admin.createFactoryConfiguration(factoryPid, null);
+    }
+
+    // Dependency Manager bridge methods
+
+    protected Component createComponent() {
+        return m_dependencyManager.createComponent();
+    }
+
+    protected ServiceDependency createServiceDependency() {
+        return m_dependencyManager.createServiceDependency();
+    }
+
+
+    private static class ComponentCounter implements ComponentStateListener {
+        private final List<Component> m_components = new ArrayList<Component>();
+        private final CountDownLatch m_latch;
+
+        public ComponentCounter(Component[] components) {
+            m_components.addAll(Arrays.asList(components));
+            m_latch = new CountDownLatch(components.length);
+        }
+
+        public void starting(Component component) {
+        }
+
+        public void started(Component component) {
+            m_components.remove(component);
+            m_latch.countDown();
+        }
+
+        public void stopping(Component component) {
+        }
+
+        public void stopped(Component component) {
+        }
+
+        public boolean waitForEmpty(long timeout, TimeUnit unit) throws InterruptedException {
+            return m_latch.await(timeout, unit);
+        }
+
+        public String componentsString() {
+            StringBuilder result = new StringBuilder();
+            for (Component component : m_components) {
+                result.append(component).append('\n');
+                for (ComponentDependencyDeclaration dependency : (List<ComponentDependencyDeclaration>) component.getDependencies()) {
+                    result.append("  ")
+                            .append(dependency.toString())
+                            .append(" ")
+                            .append(ComponentDependencyDeclaration.STATE_NAMES[dependency.getState()])
+                            .append('\n');
+                }
+                result.append('\n');
+            }
+            return result.toString();
+        }
+    };
+}

Added: ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/Options.java
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/Options.java?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/Options.java (added)
+++ ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/Options.java Tue Jul 10 14:00:18 2012
@@ -0,0 +1,277 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ace.it;
+
+
+/**
+ * This class contains a set of Pax Exam options, intended for typo-free provisioning of bundles.
+ */
+public class Options {
+//    public static class Osgi {
+//        public static MavenArtifactProvisionOption compendium() {
+//            return maven("org.osgi.compendium");
+//        }
+//
+//        private static MavenArtifactProvisionOption maven(String artifactId) {
+//            return Options.maven("org.osgi", artifactId);
+//        }
+//    }
+//
+//    public static class Felix {
+//        public static MavenArtifactProvisionOption preferences() {
+//            return maven("org.apache.felix.prefs");
+//        }
+//
+//        public static MavenArtifactProvisionOption dependencyManager() {
+//            return maven("org.apache.felix.dependencymanager");
+//        }
+//
+//        public static MavenArtifactProvisionOption configAdmin() {
+//            return maven("org.apache.felix.configadmin");
+//        }
+//
+//        public static MavenArtifactProvisionOption eventAdmin() {
+//            return maven("org.apache.felix.eventadmin");
+//        }
+//
+//        public static MavenArtifactProvisionOption deploymentAdmin() {
+//            return maven("org.apache.felix.deploymentadmin");
+//        }
+//
+//        private static MavenArtifactProvisionOption maven(String artifactId) {
+//            return Options.maven("org.apache.felix", artifactId);
+//        }
+//    }
+//
+//    public static class Ace {
+//        public static WrappedUrlProvisionOption util() {
+//            // we do this because we need access to some test classes that aren't exported
+//            return wrappedBundle(mavenBundle("org.apache.ace", "org.apache.ace.util")).overwriteManifest(WrappedUrlProvisionOption.OverwriteMode.FULL);
+//        }
+//        
+//        public static Option enableDebugger() {
+//            return enableDebugger(true, 8787);
+//        }
+//        
+//        public static Option enableDebugger(boolean suspend, int port) {
+//            return new VMOption("-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=" + (suspend ? "y" : "n") + ",address=" + port);
+//        }
+//
+//        public static MavenArtifactProvisionOption authenticationApi() {
+//            return maven("org.apache.ace.authentication.api");
+//        }
+//
+//        public static MavenArtifactProvisionOption authentication() {
+//            return maven("org.apache.ace.authentication");
+//        }
+//
+//        public static MavenArtifactProvisionOption authenticationProcessorBasicAuth() {
+//            return maven("org.apache.ace.authenticationprocessor.basicauth");
+//        }
+//
+//        public static MavenArtifactProvisionOption authenticationProcessorClientCert() {
+//            return maven("org.apache.ace.authenticationprocessor.clientcert");
+//        }
+//
+//        public static MavenArtifactProvisionOption authenticationProcessorPassword() {
+//            return maven("org.apache.ace.authenticationprocessor.password");
+//        }
+//
+//        public static MavenArtifactProvisionOption connectionFactory() {
+//            return maven("org.apache.ace.connectionfactory");
+//        }
+//
+//        public static MavenArtifactProvisionOption rangeApi() {
+//            return maven("org.apache.ace.range.api");
+//        }
+//
+//        public static MavenArtifactProvisionOption discoveryApi() {
+//            return maven("org.apache.ace.discovery.api");
+//        }
+//
+//        public static MavenArtifactProvisionOption discoveryProperty() {
+//            return maven("org.apache.ace.discovery.property");
+//        }
+//
+//        public static MavenArtifactProvisionOption identificationApi() {
+//            return maven("org.apache.ace.identification.api");
+//        }
+//
+//        public static MavenArtifactProvisionOption identificationProperty() {
+//            return maven("org.apache.ace.identification.property");
+//        }
+//
+//        public static MavenArtifactProvisionOption scheduler() {
+//            return maven("org.apache.ace.scheduler");
+//        }
+//
+//        public static MavenArtifactProvisionOption httplistener() {
+//            return maven("org.apache.ace.httplistener");
+//        }
+//
+//        public static MavenArtifactProvisionOption repositoryApi() {
+//            return maven("org.apache.ace.repository.api");
+//        }
+//
+//        public static MavenArtifactProvisionOption repositoryExt() {
+//            return maven("org.apache.ace.repository.ext");
+//        }
+//
+//        public static MavenArtifactProvisionOption repositoryImpl() {
+//            return maven("org.apache.ace.repository.impl");
+//        }
+//
+//        public static MavenArtifactProvisionOption repositoryServlet() {
+//            return maven("org.apache.ace.repository.servlet");
+//        }
+//
+//        public static MavenArtifactProvisionOption repositoryTask() {
+//            return maven("org.apache.ace.repository.task");
+//        }
+//
+//        public static MavenArtifactProvisionOption resourceprocessorUseradmin() {
+//            return maven("org.apache.ace.resourceprocessor.useradmin");
+//        }
+//
+//        public static MavenArtifactProvisionOption configuratorServeruseradmin() {
+//            return maven("org.apache.ace.configurator.serveruseradmin");
+//        }
+//
+//        public static MavenArtifactProvisionOption configuratorUseradminTask() {
+//            return maven("org.apache.ace.configurator.useradmin.task");
+//        }
+//
+//        public static MavenArtifactProvisionOption deploymentApi() {
+//            return maven("org.apache.ace.deployment.api");
+//        }
+//
+//        public static MavenArtifactProvisionOption deploymentDeploymentAdmin() {
+//            return maven("org.apache.ace.deployment.deploymentadmin");
+//        }
+//
+//        public static MavenArtifactProvisionOption deploymentServlet() {
+//            return maven("org.apache.ace.deployment.servlet");
+//        }
+//
+//        public static MavenArtifactProvisionOption deploymentTaskBase() {
+//            return maven("org.apache.ace.deployment.task.base");
+//        }
+//
+//        public static MavenArtifactProvisionOption deploymentTask() {
+//            return maven("org.apache.ace.deployment.task");
+//        }
+//
+//        public static MavenArtifactProvisionOption deploymentStreamgenerator() {
+//            return maven("org.apache.ace.deployment.streamgenerator");
+//        }
+//
+//        public static MavenArtifactProvisionOption deploymentProviderApi() {
+//            return maven("org.apache.ace.deployment.provider.api");
+//        }
+//
+//        public static MavenArtifactProvisionOption deploymentProviderFilebased() {
+//            return maven("org.apache.ace.deployment.provider.filebased");
+//        }
+//
+//        public static MavenArtifactProvisionOption log() {
+//            return maven("org.apache.ace.log");
+//        }
+//
+//        public static MavenArtifactProvisionOption logListener() {
+//            return maven("org.apache.ace.log.listener");
+//        }
+//
+//        public static MavenArtifactProvisionOption logServlet() {
+//            return maven("org.apache.ace.log.servlet");
+//        }
+//
+//        public static MavenArtifactProvisionOption serverLogStore() {
+//            return maven("org.apache.ace.server.log.store");
+//        }
+//
+//        public static MavenArtifactProvisionOption logTask() {
+//            return maven("org.apache.ace.log.task");
+//        }
+//
+//        public static MavenArtifactProvisionOption targetLog() {
+//            return maven("org.apache.ace.gateway.log"); // TODO rename!
+//        }
+//
+//        public static MavenArtifactProvisionOption targetLogStore() {
+//            return maven("org.apache.ace.gateway.log.store"); // TODO rename!
+//        }
+//
+//        public static MavenArtifactProvisionOption obrMetadata() {
+//            return maven("org.apache.ace.obr.metadata");
+//        }
+//
+//        public static MavenArtifactProvisionOption obrServlet() {
+//            return maven("org.apache.ace.obr.servlet");
+//        }
+//
+//        public static MavenArtifactProvisionOption obrStorage() {
+//            return maven("org.apache.ace.obr.storage");
+//        }
+//
+//        public static MavenArtifactProvisionOption clientRepositoryApi() {
+//            return maven("org.apache.ace.client.repository.api");
+//        }
+//
+//        public static MavenArtifactProvisionOption clientRepositoryImpl() {
+//            return maven("org.apache.ace.client.repository.impl");
+//        }
+//
+//        public static MavenArtifactProvisionOption clientRepositoryHelperBase() {
+//            return maven("org.apache.ace.client.repository.helper.base");
+//        }
+//
+//        public static MavenArtifactProvisionOption clientRepositoryHelperBundle() {
+//            return maven("org.apache.ace.client.repository.helper.bundle");
+//        }
+//
+//        public static MavenArtifactProvisionOption clientRepositoryHelperConfiguration() {
+//            return maven("org.apache.ace.client.repository.helper.configuration");
+//        }
+//
+//        public static MavenArtifactProvisionOption clientAutomation() {
+//            return maven("org.apache.ace.client.automation");
+//        }
+//
+//        public static MavenArtifactProvisionOption maven(String artifactId) {
+//            return Options.maven("org.apache.ace", artifactId);
+//        }
+//    }
+//
+//    public static class Knopflerfish {
+//        public static MavenArtifactProvisionOption useradmin() {
+//            return maven("org.knopflerfish.bundle", "useradmin");
+//        }
+//        public static MavenArtifactProvisionOption log() {
+//            return maven("org.knopflerfish", "log");
+//        }
+//    }
+//
+//    public static MavenArtifactProvisionOption jetty() {
+//        return maven("org.ops4j.pax.web", "pax-web-jetty-bundle");
+//    }
+//
+//    private static MavenArtifactProvisionOption maven(String groupId, String artifactId) {
+//        return mavenBundle().groupId(groupId).artifactId(artifactId).versionAsInProject();
+//    }
+}

Added: ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/packageinfo
URL: http://svn.apache.org/viewvc/ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/packageinfo?rev=1359676&view=auto
==============================================================================
--- ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/packageinfo (added)
+++ ace/sandbox/marrs/org.apache.ace.itest/src/org/apache/ace/it/packageinfo Tue Jul 10 14:00:18 2012
@@ -0,0 +1 @@
+version 1.0
\ No newline at end of file