xml配置文件
就下列依赖加入xml的配置文件
<!-- test start -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-container-native</artifactId>
<version>3.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-junit4</artifactId>
<version>3.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-link-mvn</artifactId>
<version>3.5.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.url</groupId>
<artifactId>pax-url-aether</artifactId>
<version>2.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.framework</artifactId>
<version>3.2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-inject</artifactId>
<version>3.5.0</version>
</dependency>
<!-- test end -->
<dependency>
<groupId>org.ow2.spec.ee</groupId>
<artifactId>ow2-atinject-1.0-spec</artifactId>
<version>1.0.12</version>
<scope>test</scope>
</dependency>
</dependencies>
java 调用实例
/**
* longload
* 2014年5月20日 上午10:25:08
* version 1.0
*/
package com.sj.workflow.persistence.test;
import static org.junit.Assert.*;
import static org.ops4j.pax.exam.CoreOptions.junitBundles;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.options;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
import javax.inject.Inject;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;
import com.sj.common.vars.CommonVars;
import com.sj.workflow.persistence.api.WorkflowPersistence;
@RunWith(PaxExam.class)
public class WorkflowPersistenceTest {
//@Inject
//BundleContext bc;
@Inject
private WorkflowPersistence workflowPersistence;
Logger logger= Logger.getLogger(this.getClass().getName());
@Configuration
public Option[] config() {
return options(
// mavenBundle("com.sj", "com.sj.mongodb.api", "0.0.1"),
// 从网络下载
//bundle("http://www.example.com/repository/foo-1.2.3.jar"),
systemProperty("pax.exam.logging").value("debug"),
mavenBundle("org.mongodb", "mongo-java-driver").version("2.11.4"),
// common
mavenBundle("com.sj", "com.sj.common.vars").version("0.0.1"),
mavenBundle("com.sj", "com.sj.common.utils").version("0.0.1"),
// api
mavenBundle("com.sj", "com.sj.mongodb.api").version("0.0.1"),
mavenBundle("com.sj","com.sj.workflow.persistence.api").version("0.0.1"),
// impl
mavenBundle("com.sj", "com.sj.mongodb.impl").version("0.0.1"),
mavenBundle("com.sj", "com.sj.workflow.persistence").version("0.0.1"),
junitBundles()
);
}
//@Test
public void revisionWFDefinitions() {
try {
logger.info("----------");
workflowPersistence.revisionWFDefinitions("5379bf04d09bd5136c74d40f");
} catch (Exception e) {
e.printStackTrace();
}
}
}
相关推荐
感谢您关注Pax CDI-OSGi的上下文和依赖注入。 这是OPS4J Pax CDI项目的官方源代码库。 它由OPS4J社区根据Apache Software License 2.0许可。 文献资料 建造 您将需要一台装有Java 6或Java 7和Apache Maven 3的...
PAX-LOGGING 该项目的目标是允许用户和包使用众所周知的日志 API,如 SLF4J 或 Commons-Logging。 日志 API本身不做任何日志,而是需要特定的日志实现(和相关配置)和日志实现本身之间应该有区别。 与上述区别相...
Foobar2000PAX.rar
wiquery-highcharts.zip,wiquery highcharts绑定wiquery-highcharts绑定组件
Pax考试 感谢您关注Pax考试。 这是OPS4J Pax考试项目的官方源代码库,用于发布版本2.x,3.x,4.x和5.x。 它由OPS4J社区根据Apache Software License 2.0许可。 文献资料 贡献 在OPS4J中,邀请所有人参与。 我们不...
Pax.zip
安卓Android源码——Pax.zip
osgi_integration_tests_pax_exam 用于容纳pax考试集成测试项目的存储库
Pax is the archiver described in IEEE P1003.2. It is an archiver which understands both tar and cpio archives and has a new interface.
maven-pax-plugin-1.4.jar
新的pax-web的org.ops4j.pax.web.service.AuthenticatorService现在由Keycloak本身实现,并由pax-web使用服务定位器模式进行检测。 Keycloak附带3个jar,其中包括/META-INF/services/org.ops4j.pax.web.service....
一个好用的正则表达式验证程序源码,可以参考
在felix中使用pax-logging-service pax-logging-api-1.7.3.jar,pax-logging-service-1.7.3.jar,pax-confman-propsloader-0.2.3.jar ...conf\services\org.ops4j.pax.logging.properties 详细包可以下载使用
此存储库已移动请查看ops4j/org.ops4j.pax.web的undertow分支。pax-web-undertow 基于 Undertow 的 OSGi Web 应用程序(实验性)。功能目标实施 Web 应用程序规范 1.0(OSGi Enterprise 5,第 128 节)。 实施 Http ...
maven-pax-plugin-1.5.jar
maven-pax-plugin-1.3.jar
maven-pax-plugin-1.1.jar
maven-pax-plugin-1.0.jar
基于maven够建的OSGI项目,内置pax-runner插件,可以在此基础上进行二次开发。