Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package org.apache.felix.eventadmin.ittests;

import static org.junit.Assert.assertNotNull;
import static org.ops4j.pax.exam.Constants.START_LEVEL_SYSTEM_BUNDLES;
import static org.ops4j.pax.exam.CoreOptions.bundle;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.options;
Expand All @@ -41,7 +40,6 @@
import org.ops4j.pax.exam.CoreOptions;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;
import org.ops4j.pax.exam.options.AbstractDelegateProvisionOption;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.service.event.Event;
Expand Down Expand Up @@ -267,9 +265,7 @@ public static Option[] configuration() {
CoreOptions.bundle( bundleFile.toURI().toString() ),
mavenBundle("org.ops4j.pax.url", "pax-url-mvn", "1.3.5")
),
// below is instead of normal Pax Exam junitBundles() to deal
// with build server issue
new DirectURLJUnitBundlesOption(),
mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit", "4.12_1"),
systemProperty("pax.exam.invoker").value("junit"),
//vmOption("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"),
bundle("link:classpath:META-INF/links/org.ops4j.pax.exam.invoker.junit.link")
Expand Down Expand Up @@ -322,40 +318,4 @@ private void execute() {
}


/**
* Clone of Pax Exam's JunitBundlesOption which uses a direct
* URL to the SpringSource JUnit bundle to avoid some weird
* repository issues on the Apache build server.
*/
private static class DirectURLJUnitBundlesOption
extends AbstractDelegateProvisionOption<DirectURLJUnitBundlesOption> {

/**
* Constructor.
*/
public DirectURLJUnitBundlesOption(){
super(
bundle("http://repository.springsource.com/ivy/bundles/external/org.junit/com.springsource.org.junit/4.9.0/com.springsource.org.junit-4.9.0.jar")
);
noUpdate();
startLevel(START_LEVEL_SYSTEM_BUNDLES);
}

/**
* {@inheritDoc}
*/
@Override
public String toString() {
return String.format("DirectURLJUnitBundlesOption{url=%s}", getURL());
}

/**
* {@inheritDoc}
*/
@Override
protected DirectURLJUnitBundlesOption itself() {
return this;
}

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package org.apache.felix.eventadmin.perftests;

import static org.ops4j.pax.exam.Constants.START_LEVEL_SYSTEM_BUNDLES;
import static org.ops4j.pax.exam.CoreOptions.bundle;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.options;
Expand Down Expand Up @@ -44,7 +43,6 @@
import org.ops4j.pax.exam.CoreOptions;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;
import org.ops4j.pax.exam.options.AbstractDelegateProvisionOption;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.ServiceRegistration;
Expand Down Expand Up @@ -97,9 +95,7 @@ public static Option[] configuration() {
CoreOptions.bundle(bundleFile.toURI().toString()),
mavenBundle("org.ops4j.pax.url", "pax-url-mvn", "1.3.5")
),
// below is instead of normal Pax Exam junitBundles() to deal
// with build server issue
new DirectURLJUnitBundlesOption(),
mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit", "4.12_1"),
systemProperty("pax.exam.invoker").value("junit"),
bundle("link:classpath:META-INF/links/org.ops4j.pax.exam.invoker.junit.link")
);
Expand Down Expand Up @@ -303,37 +299,4 @@ public void unregister() {
registration.unregister();
}
}


private static class DirectURLJUnitBundlesOption
extends AbstractDelegateProvisionOption<DirectURLJUnitBundlesOption> {

/**
* Constructor.
*/
public DirectURLJUnitBundlesOption(){
super(
bundle("http://repository.springsource.com/ivy/bundles/external/org.junit/com.springsource.org.junit/4.9.0/com.springsource.org.junit-4.9.0.jar")
);
noUpdate();
startLevel(START_LEVEL_SYSTEM_BUNDLES);
}

/**
* {@inheritDoc}
*/
@Override
public String toString() {
return String.format("DirectURLJUnitBundlesOption{url=%s}", getURL());
}

/**
* {@inheritDoc}
*/
@Override
protected DirectURLJUnitBundlesOption itself() {
return this;
}

}
}
20 changes: 3 additions & 17 deletions ipojo/distributions/ipojo-webconsole-quicktart/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.ipojo.webconsole</artifactId>
<version>1.7.0-SNAPSHOT</version>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
Expand All @@ -90,8 +90,8 @@
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>com.springsource.javax.servlet</artifactId>
<version>2.4.0</version>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
Expand All @@ -110,20 +110,6 @@
</dependency>
</dependencies>

<!-- Add OW2 repository -->
<repositories>
<repository>
<id>ow2.releases</id>
<url>http://repository.ow2.org/nexus/content/groups/public/</url>
</repository>

<repository>
<id>com.springsource.repository.libraries.external</id>
<name>SpringSource Enterprise Bundle Repository - External Library Releases</name>
<url>http://repository.springsource.com/maven/bundles/external</url>
</repository>
</repositories>

<build>
<plugins>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@
<dependencySet>
<includes>
<include>*:org.apache.felix.*:jar</include>
<include>javax.servlet:com.springsource.javax.servlet:*</include>
<include>javax.servlet:javax.servlet-api:*</include>
<include>org.osgi:org.osgi.compendium:*</include>
<include>org.json:org.ow2.chameleon.commons.json:*</include>
<include>commons-io:commons-io:*</include>
<include>commons-fileupload:*:*</include>
</includes>
Expand All @@ -56,4 +55,4 @@
</dependencySet>
</dependencySets>

</assembly>
</assembly>
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.junit.Before;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.CoreOptions;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;
import org.ops4j.pax.exam.options.CompositeOption;
Expand Down Expand Up @@ -87,12 +86,7 @@ public Option[] config() throws IOException {

public static Option junitAndMockitoBundles() {
return new DefaultCompositeOption(
// Repository required to load harmcrest (OSGi-fied version).
repository("http://repository.springsource.com/maven/bundles/external").id(
"com.springsource.repository.bundles.external"),

// Hamcrest with a version matching the range expected by Mockito
mavenBundle("org.hamcrest", "com.springsource.org.hamcrest.core", "1.1.0"),
mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit", "4.11_2"),

// Mockito core does not includes Hamcrest
mavenBundle("org.mockito", "mockito-core", "1.9.5"),
Expand All @@ -101,11 +95,6 @@ public static Option junitAndMockitoBundles() {
wrappedBundle(mavenBundle("org.objenesis", "objenesis", "1.2"))
.exports("*;version=1.2"),

// The default JUnit bundle also exports Hamcrest, but with an (incorrect) version of
// 4.9 which does not match the Mockito import. When deployed after the hamcrest bundles, it gets
// resolved correctly.
CoreOptions.junitBundles(),

/*
* Felix has implicit boot delegation enabled by default. It conflicts with Mockito:
* java.lang.LinkageError: loader constraint violation in interface itable initialization:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.junit.Before;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.CoreOptions;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;
import org.ops4j.pax.exam.options.CompositeOption;
Expand Down Expand Up @@ -70,12 +69,7 @@ public class Common {

public static Option junitAndMockitoBundles() {
return new DefaultCompositeOption(
// Repository required to load harmcrest (OSGi-fied version).
repository("http://repository.springsource.com/maven/bundles/external").id(
"com.springsource.repository.bundles.external"),

// Hamcrest with a version matching the range expected by Mockito
mavenBundle("org.hamcrest", "com.springsource.org.hamcrest.core", "1.1.0"),
mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit", "4.11_2"),

// Mockito core does not includes Hamcrest
mavenBundle("org.mockito", "mockito-core", "1.9.5"),
Expand All @@ -84,11 +78,6 @@ public static Option junitAndMockitoBundles() {
wrappedBundle(mavenBundle("org.objenesis", "objenesis", "1.2"))
.exports("*;version=1.2"),

// The default JUnit bundle also exports Hamcrest, but with an (incorrect) version of
// 4.9 which does not match the Mockito import. When deployed after the hamcrest bundles, it gets
// resolved correctly.
CoreOptions.junitBundles(),

/*
* Felix has implicit boot delegation enabled by default. It conflicts with Mockito:
* java.lang.LinkageError: loader constraint violation in interface itable initialization:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.junit.Before;
import org.junit.runner.RunWith;
import org.ops4j.pax.exam.Configuration;
import org.ops4j.pax.exam.CoreOptions;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.junit.PaxExam;
import org.ops4j.pax.exam.options.CompositeOption;
Expand Down Expand Up @@ -87,12 +86,7 @@ public Option[] config() throws IOException {

public static Option junitAndMockitoBundles() {
return new DefaultCompositeOption(
// Repository required to load harmcrest (OSGi-fied version).
repository("http://repository.springsource.com/maven/bundles/external").id(
"com.springsource.repository.bundles.external"),

// Hamcrest with a version matching the range expected by Mockito
mavenBundle("org.hamcrest", "com.springsource.org.hamcrest.core", "1.1.0"),
mavenBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.junit", "4.11_2"),

// Mockito core does not includes Hamcrest
mavenBundle("org.mockito", "mockito-core", "1.9.5"),
Expand All @@ -101,11 +95,6 @@ public static Option junitAndMockitoBundles() {
wrappedBundle(mavenBundle("org.objenesis", "objenesis", "1.2"))
.exports("*;version=1.2"),

// The default JUnit bundle also exports Hamcrest, but with an (incorrect) version of
// 4.9 which does not match the Mockito import. When deployed after the hamcrest bundles, it gets
// resolved correctly.
CoreOptions.junitBundles(),

/*
* Felix has implicit boot delegation enabled by default. It conflicts with Mockito:
* java.lang.LinkageError: loader constraint violation in interface itable initialization:
Expand Down