mvn archetype:generate -DarchetypeArtifactId=maven-archetype-quickstart -DgroupId=com.example -DartifactId=my-osgi-project -Dversion=1.0-SNAPSHOT <dependencies> <!-- OSGi Test JUnit4 --> <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.test.cases.junit</artifactId> <version>1.0.0</version> <scope>test</scope> </dependency> </dependencies> import org.junit.Test; import org.junit.runner.RunWith; import org.osgi.test.common.annotation.InjectService; import org.osgi.test.junit4.runner.OSGiRunner; @RunWith(OSGiRunner.class) public class PerformanceTest { @InjectService private MyService myService; @Test public void testPerformance() { } } mvn test


上一篇:
下一篇:
切换中文