You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Christian Eugster <c....@docuteam.ch> on 2015/03/12 20:32:55 UTC

Pax exam Test does not run in Karaf container

Hi,

I have built a bundle with test class. When I run mvn test or mvn install, I got no errors (-> BUILD SUCCESS), but the tests do not run: 

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in ch.eugster.ingest.sip.identification.KarafContainerTest

I have the same dependencies in pom.xml as in another project, where the tests run through successfully. Does anybody have an idea, what does go wrong? Thank you!

The whole log is:

[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for ch.eugster.ingest:sip-identification-processor:bundle:0.0.1-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.ops4j.pax.exam:pax-exam-junit4:jar -> duplicate declaration of version ${pax.exam.version} @ ch.eugster.ingest:ingest-engine:0.0.1-SNAPSHOT, /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/pom.xml, line 56, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.felix:maven-bundle-plugin is missing. @ line 29, column 12
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building A Camel Blueprint Route 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- depends-maven-plugin:1.2:generate-depends-file (generate-depends-file) @ sip-identification-processor ---
[INFO] Created: /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/classes/META-INF/maven/dependencies.properties
[INFO] 
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ sip-identification-processor ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ sip-identification-processor ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ sip-identification-processor ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 7 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ sip-identification-processor ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.18:test (default-test) @ sip-identification-processor ---
[INFO] Surefire report directory: /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/christian/.m2/repository/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/christian/.m2/repository/org/apache/karaf/org.apache.karaf.client/3.0.3/org.apache.karaf.client-3.0.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/christian/.m2/repository/org/ops4j/pax/logging/pax-logging-api/1.8.1/pax-logging-api-1.8.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
[                          main] DefaultExamSystem              INFO  Pax Exam System (Version: 4.4.0) created.
[                          main] ProbeRunner                    INFO  creating PaxExam runner for class ch.eugster.ingest.sip.identification.KarafContainerTest
Running ch.eugster.ingest.sip.identification.KarafContainerTest
[                          main] ProbeRunner                    INFO  creating PaxExam runner for class ch.eugster.ingest.sip.identification.KarafContainerTest
[                          main] ProbeRunner                    INFO  running test class ch.eugster.ingest.sip.identification.KarafContainerTest
[                          main] ReactorManager                 INFO  suite finished
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in ch.eugster.ingest.sip.identification.KarafContainerTest

Results :




Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.244 s
[INFO] Finished at: 2015-03-12T20:28:10+01:00
[INFO] Final Memory: 17M/225M
[INFO] ------------------------------------------------------------------------


Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugster@docuteam.ch






Re: Pax exam Test does not run in Karaf container

Posted by Christian Eugster <c....@docuteam.ch>.
Hi Achim,

sorry for missing code, here it is and after that the dependencies. I hope that helps:

package ch.eugster.ingest.sip.identification;

import static org.junit.Assert.assertNotNull;
import static org.ops4j.pax.exam.CoreOptions.maven;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.karafDistributionConfiguration;
import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.keepRuntimeFolder;

import java.io.File;

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 org.ops4j.pax.exam.options.MavenArtifactUrlReference;
import org.ops4j.pax.exam.options.MavenUrlReference;
import org.osgi.framework.BundleContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@RunWith(PaxExam.class)
public class KarafContainerTest
{
	protected transient Logger log = LoggerFactory.getLogger(getClass());
	
	@Inject
	protected BundleContext bundleContext;
	
	@Configuration
	protected Option[] configuration()
	{
		MavenArtifactUrlReference karafUrl = maven()
				.groupId("org.apache.karaf").artifactId("apache-karaf")
				.version("3.0.0").type("tar.gz");
		MavenUrlReference karafStandardRepo = maven()
				.groupId("org.apache.karaf.features").artifactId("standard")
				.classifier("features").type("xml").versionAsInProject();
		return new Option[] {
				// KarafDistributionOption.debugConfiguration("5005", true),
				karafDistributionConfiguration().frameworkUrl(karafUrl)
						.unpackDirectory(new File("target/exam"))
						.useDeployFolder(false),
				keepRuntimeFolder(),
				features(karafStandardRepo, "scr"),
				mavenBundle().groupId("ch.eugster.ingest")
						.artifactId("sip-connector-api")
						.versionAsInProject(),
				mavenBundle().groupId("ch.eugster.ingest")
						.artifactId("sip-connector-matterhorn")
						.versionAsInProject()
				};
	}
	
	@Test
	public void test() throws Exception
	{
		log.info("running-test");
		assertNotNull(this.bundleContext);
	}

}

	<dependencies>
		<!-- OSGi dependencies -->
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.core</artifactId>
			<version>6.0.0</version>
		</dependency>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.compendium</artifactId>
			<version>5.0.0</version>
		</dependency>
		<!-- Test dependencies pax exam -->
		<dependency>
			<groupId>org.ops4j.pax.exam</groupId>
			<artifactId>pax-exam-junit4</artifactId>
			<version>${pax.exam.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.ops4j.pax.exam</groupId>
			<artifactId>pax-exam-container-karaf</artifactId>
			<version>${pax.exam.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.ops4j.pax.exam</groupId>
			<artifactId>pax-exam-junit4</artifactId>
			<version>${pax.exam.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.ops4j.pax.exam</groupId>
			<artifactId>pax-exam</artifactId>
			<version>${pax.exam.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.ops4j.pax.url</groupId>
			<artifactId>pax-url-aether</artifactId>
			<version>1.6.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
			<version>1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.karaf</groupId>
			<artifactId>apache-karaf</artifactId>
			<version>3.0.3</version>
			<type>pom</type>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- Needed if you use versionAsInProject() -->
			<plugin>
				<groupId>org.apache.servicemix.tooling</groupId>
				<artifactId>depends-maven-plugin</artifactId>
				<version>1.2</version>
				<executions>
					<execution>
						<id>generate-depends-file</id>
						<goals>
							<goal>generate-depends-file</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>


Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugster@docuteam.ch





> Am 12.03.2015 um 20:43 schrieb Achim Nierbeck <bc...@googlemail.com>:
> 
> Hi, 
> 
> it's a bit hard to see the issue without any source. It's like calling the doc on the phone, "I think I got flu" :-)
> So I'm doing some wild guesses here :-)
> 
> Your Testclass doesn't contain any testmethods?
> For example is missing a @Test annotation?
> You added an @Ignore to the test method?
> 
> regards, Achim 
> 
> 
> 2015-03-12 20:32 GMT+01:00 Christian Eugster <c.eugster@docuteam.ch <ma...@docuteam.ch>>:
> Hi,
> 
> I have built a bundle with test class. When I run mvn test or mvn install, I got no errors (-> BUILD SUCCESS), but the tests do not run: 
> 
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in ch.eugster.ingest.sip.identification.KarafContainerTest
> 
> I have the same dependencies in pom.xml as in another project, where the tests run through successfully. Does anybody have an idea, what does go wrong? Thank you!
> 
> The whole log is:
> 
> [INFO] Scanning for projects...
> [WARNING] 
> [WARNING] Some problems were encountered while building the effective model for ch.eugster.ingest:sip-identification-processor:bundle:0.0.1-SNAPSHOT
> [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.ops4j.pax.exam:pax-exam-junit4:jar -> duplicate declaration of version ${pax.exam.version} @ ch.eugster.ingest:ingest-engine:0.0.1-SNAPSHOT, /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/pom.xml, line 56, column 15
> [WARNING] 'build.plugins.plugin.version' for org.apache.felix:maven-bundle-plugin is missing. @ line 29, column 12
> [WARNING] 
> [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
> [WARNING] 
> [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
> [WARNING] 
> [INFO] 
> [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
> [INFO]                                                                         
> [INFO] ------------------------------------------------------------------------
> [INFO] Building A Camel Blueprint Route 0.0.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- depends-maven-plugin:1.2:generate-depends-file (generate-depends-file) @ sip-identification-processor ---
> [INFO] Created: /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/classes/META-INF/maven/dependencies.properties
> [INFO] 
> [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ sip-identification-processor ---
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 2 resources
> [INFO] 
> [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ sip-identification-processor ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO] 
> [INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ sip-identification-processor ---
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO] 
> [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ sip-identification-processor ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO] 
> [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ sip-identification-processor ---
> [INFO] Surefire report directory: /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/surefire-reports
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in [jar:file:/Users/christian/.m2/repository/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/Users/christian/.m2/repository/org/apache/karaf/org.apache.karaf.client/3.0.3/org.apache.karaf.client-3.0.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/Users/christian/.m2/repository/org/ops4j/pax/logging/pax-logging-api/1.8.1/pax-logging-api-1.8.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings <http://www.slf4j.org/codes.html#multiple_bindings> for an explanation.
> SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
> [                          main] DefaultExamSystem              INFO  Pax Exam System (Version: 4.4.0) created.
> [                          main] ProbeRunner                    INFO  creating PaxExam runner for class ch.eugster.ingest.sip.identification.KarafContainerTest
> Running ch.eugster.ingest.sip.identification.KarafContainerTest
> [                          main] ProbeRunner                    INFO  creating PaxExam runner for class ch.eugster.ingest.sip.identification.KarafContainerTest
> [                          main] ProbeRunner                    INFO  running test class ch.eugster.ingest.sip.identification.KarafContainerTest
> [                          main] ReactorManager                 INFO  suite finished
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in ch.eugster.ingest.sip.identification.KarafContainerTest
> 
> Results :
> 
> 
> 
> 
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4.244 s
> [INFO] Finished at: 2015-03-12T20:28:10+01:00
> [INFO] Final Memory: 17M/225M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Christian Eugster
> Docuteam GmbH
> Langacker 16
> Postfach
> CH-5405 Baden-Dättwil
> +41 (0)56 470 03 37 <tel:%2B41%20%280%2956%20470%2003%2037>
> c.eugster@docuteam.ch <ma...@docuteam.ch>
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> Apache Member
> Apache Karaf <http://karaf.apache.org/ <http://karaf.apache.org/>> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/ <http://wiki.ops4j.org/display/paxweb/Pax+Web/>> Committer & Project Lead
> blog <http://notizblog.nierbeck.de/ <http://notizblog.nierbeck.de/>>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS <http://bit.ly/1ps9rkS>>
> 
> Software Architect / Project Manager / Scrum Master 
> 


Re: Pax exam Test does not run in Karaf container

Posted by Achim Nierbeck <bc...@googlemail.com>.
Great, it would have been my next suggestion :-)

Regards, Achim

2015-03-13 8:18 GMT+01:00 Christian Eugster <c....@docuteam.ch>:

> Hi,
>
> Yes, recipe 2 of chapter 10 is working. I will compare each detail with my
> own implementation. Maybe I will find something. Thank you.
>
> Regards Christian
>
> Christian Eugster
> Docuteam GmbH
> Langacker 16
> Postfach
> CH-5405 Baden-Dättwil
> +41 (0)56 470 03 37
> c.eugster@docuteam.ch
>
>
>
>
>
> Am 12.03.2015 um 21:43 schrieb Achim Nierbeck <bc...@googlemail.com>:
>
> Hi,
>
> just as sanity-check, recipe2 of chapter 10 is working for you?
>
> regards, Achim
>
>
> 2015-03-12 21:37 GMT+01:00 Christian Eugster <c....@docuteam.ch>:
>
>> Hi Achim,
>>
>> I did as you proposed, no effect, still no test run. Do I miss any mvn
>> plugins?
>>
>> Regards Christian
>>
>> Christian Eugster
>> Docuteam GmbH
>> Langacker 16
>> Postfach
>> CH-5405 Baden-Dättwil
>> +41 (0)56 470 03 37
>> c.eugster@docuteam.ch
>>
>>
>>
>>
>>
>> Am 12.03.2015 um 21:20 schrieb Achim Nierbeck <bc...@googlemail.com>:
>>
>> features(maven().groupId("org.apache.karaf.features").artifactId(
>> "standard").type("xml").classifier("features"
>> ).versionAsInProject(),"eventadmin")
>>
>>
>>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Pax exam Test does not run in Karaf container

Posted by Christian Eugster <c....@docuteam.ch>.
Hi,

Yes, recipe 2 of chapter 10 is working. I will compare each detail with my own implementation. Maybe I will find something. Thank you.

Regards Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugster@docuteam.ch





> Am 12.03.2015 um 21:43 schrieb Achim Nierbeck <bc...@googlemail.com>:
> 
> Hi, 
> 
> just as sanity-check, recipe2 of chapter 10 is working for you?
> 
> regards, Achim 
> 
> 
> 2015-03-12 21:37 GMT+01:00 Christian Eugster <c.eugster@docuteam.ch <ma...@docuteam.ch>>:
> Hi Achim, 
> 
> I did as you proposed, no effect, still no test run. Do I miss any mvn plugins?
> 
> Regards Christian
> 
> Christian Eugster
> Docuteam GmbH
> Langacker 16
> Postfach
> CH-5405 Baden-Dättwil
> +41 (0)56 470 03 37 <tel:%2B41%20%280%2956%20470%2003%2037>
> c.eugster@docuteam.ch <ma...@docuteam.ch>
> 
> 
> 
> 
> 
>> Am 12.03.2015 um 21:20 schrieb Achim Nierbeck <bcanhome@googlemail.com <ma...@googlemail.com>>:
>> 
>> features(maven().groupId("org.apache.karaf.features").artifactId("standard").type("xml").classifier("features").versionAsInProject(),"eventadmin")
> 
> 
> 
> 
> -- 
> 
> Apache Member
> Apache Karaf <http://karaf.apache.org/ <http://karaf.apache.org/>> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/ <http://wiki.ops4j.org/display/paxweb/Pax+Web/>> Committer & Project Lead
> blog <http://notizblog.nierbeck.de/ <http://notizblog.nierbeck.de/>>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS <http://bit.ly/1ps9rkS>>
> 
> Software Architect / Project Manager / Scrum Master 
> 


Re: Pax exam Test does not run in Karaf container

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

just as sanity-check, recipe2 of chapter 10 is working for you?

regards, Achim


2015-03-12 21:37 GMT+01:00 Christian Eugster <c....@docuteam.ch>:

> Hi Achim,
>
> I did as you proposed, no effect, still no test run. Do I miss any mvn
> plugins?
>
> Regards Christian
>
> Christian Eugster
> Docuteam GmbH
> Langacker 16
> Postfach
> CH-5405 Baden-Dättwil
> +41 (0)56 470 03 37
> c.eugster@docuteam.ch
>
>
>
>
>
> Am 12.03.2015 um 21:20 schrieb Achim Nierbeck <bc...@googlemail.com>:
>
> features(maven().groupId("org.apache.karaf.features").artifactId(
> "standard").type("xml").classifier("features"
> ).versionAsInProject(),"eventadmin")
>
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Pax exam Test does not run in Karaf container

Posted by Christian Eugster <c....@docuteam.ch>.
Hi Achim, 

I did as you proposed, no effect, still no test run. Do I miss any mvn plugins?

Regards Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugster@docuteam.ch





> Am 12.03.2015 um 21:20 schrieb Achim Nierbeck <bc...@googlemail.com>:
> 
> features(maven().groupId("org.apache.karaf.features").artifactId("standard").type("xml").classifier("features").versionAsInProject(),"eventadmin")


Re: Pax exam Test does not run in Karaf container

Posted by Achim Nierbeck <bc...@googlemail.com>.
Thanks for adding the code/pom.
As Andreas already said you have a discrepancy between code and pom on the
version of Karaf,
though I'm not 100% sure it's the cause of your issue :)

Could you try with the following for referencing the Karaf distribution, as
taken from recipe 2 of chapter 10:

karafDistributionConfiguration().frameworkUrl(maven().groupId(
"org.apache.karaf").artifactId("apache-karaf").type("zip"
).versionAsInProject()).unpackDirectory(new File("target/paxexam/unpack/"
)).useDeployFolder(false),

instead of using the mvnUrl object.

same for referencing the feature:

  features(maven().groupId("org.apache.karaf.features").artifactId(
"standard").type("xml").classifier("features"
).versionAsInProject(),"eventadmin")


regards, Achim



2015-03-12 20:57 GMT+01:00 Andreas Kuhtz <an...@gmail.com>:

> Hi,
>
> You should change the version of karaf to 3.0.3 here:
>
> MavenArtifactUrlReference karafUrl = maven()
> .groupId("org.apache.karaf").artifactId("apache-karaf")
> .version("3.0.0").type("tar.gz");
>
>
> 2015-03-12 20:51 GMT+01:00 Christian Eugster <c....@docuteam.ch>:
>
>> So I have one test method annotated with @Test. In pom there is no skip
>> test entry in surefire plugin. May be there is a missing dependency?
>>
>> Thanks a lot!
>>
>> Christian
>>
>> Christian Eugster
>> Docuteam GmbH
>> Langacker 16
>> Postfach
>> CH-5405 Baden-Dättwil
>> +41 (0)56 470 03 37
>> c.eugster@docuteam.ch
>>
>>
>>
>>
>>
>> Am 12.03.2015 um 20:43 schrieb Achim Nierbeck <bc...@googlemail.com>:
>>
>> Hi,
>>
>> it's a bit hard to see the issue without any source. It's like calling
>> the doc on the phone, "I think I got flu" :-)
>> So I'm doing some wild guesses here :-)
>>
>> Your Testclass doesn't contain any testmethods?
>> For example is missing a @Test annotation?
>> You added an @Ignore to the test method?
>>
>> regards, Achim
>>
>>
>> 2015-03-12 20:32 GMT+01:00 Christian Eugster <c....@docuteam.ch>:
>>
>>> Hi,
>>>
>>> I have built a bundle with test class. When I run mvn test or mvn
>>> install, I got no errors (-> BUILD SUCCESS), but the tests do not run:
>>>
>>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005
>>> sec - in ch.eugster.ingest.sip.identification.KarafContainerTest
>>>
>>> I have the same dependencies in pom.xml as in another project, where the
>>> tests run through successfully. Does anybody have an idea, what does go
>>> wrong? Thank you!
>>>
>>> The whole log is:
>>>
>>> [INFO] Scanning for projects...
>>> [WARNING]
>>> [WARNING] Some problems were encountered while building the effective
>>> model for
>>> ch.eugster.ingest:sip-identification-processor:bundle:0.0.1-SNAPSHOT
>>> [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)'
>>> must be unique: org.ops4j.pax.exam:pax-exam-junit4:jar -> duplicate
>>> declaration of version ${pax.exam.version} @
>>> ch.eugster.ingest:ingest-engine:0.0.1-SNAPSHOT,
>>> /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/pom.xml,
>>> line 56, column 15
>>> [WARNING] 'build.plugins.plugin.version' for
>>> org.apache.felix:maven-bundle-plugin is missing. @ line 29, column 12
>>> [WARNING]
>>> [WARNING] It is highly recommended to fix these problems because they
>>> threaten the stability of your build.
>>> [WARNING]
>>> [WARNING] For this reason, future Maven versions might no longer support
>>> building such malformed projects.
>>> [WARNING]
>>> [INFO]
>>> [INFO] Using the builder
>>> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder
>>> with a thread count of 1
>>> [INFO]
>>>
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Building A Camel Blueprint Route 0.0.1-SNAPSHOT
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO]
>>> [INFO] --- depends-maven-plugin:1.2:generate-depends-file
>>> (generate-depends-file) @ sip-identification-processor ---
>>> [INFO] Created:
>>> /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/classes/META-INF/maven/dependencies.properties
>>> [INFO]
>>> [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @
>>> sip-identification-processor ---
>>> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
>>> resources, i.e. build is platform dependent!
>>> [INFO] Copying 2 resources
>>> [INFO]
>>> [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @
>>> sip-identification-processor ---
>>> [INFO] Nothing to compile - all classes are up to date
>>> [INFO]
>>> [INFO] --- maven-resources-plugin:2.7:testResources
>>> (default-testResources) @ sip-identification-processor ---
>>> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
>>> resources, i.e. build is platform dependent!
>>> [INFO] Copying 7 resources
>>> [INFO]
>>> [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @
>>> sip-identification-processor ---
>>> [INFO] Nothing to compile - all classes are up to date
>>> [INFO]
>>> [INFO] --- maven-surefire-plugin:2.18:test (default-test) @
>>> sip-identification-processor ---
>>> [INFO] Surefire report directory:
>>> /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/surefire-reports
>>>
>>> -------------------------------------------------------
>>>  T E S T S
>>> -------------------------------------------------------
>>> SLF4J: Class path contains multiple SLF4J bindings.
>>> SLF4J: Found binding in
>>> [jar:file:/Users/christian/.m2/repository/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: Found binding in
>>> [jar:file:/Users/christian/.m2/repository/org/apache/karaf/org.apache.karaf.client/3.0.3/org.apache.karaf.client-3.0.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: Found binding in
>>> [jar:file:/Users/christian/.m2/repository/org/ops4j/pax/logging/pax-logging-api/1.8.1/pax-logging-api-1.8.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>> explanation.
>>> SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
>>> [                          main] DefaultExamSystem              INFO
>>> Pax Exam System (Version: 4.4.0) created.
>>> [                          main] ProbeRunner                    INFO
>>> creating PaxExam runner for class
>>> ch.eugster.ingest.sip.identification.KarafContainerTest
>>> Running ch.eugster.ingest.sip.identification.KarafContainerTest
>>> [                          main] ProbeRunner                    INFO
>>> creating PaxExam runner for class
>>> ch.eugster.ingest.sip.identification.KarafContainerTest
>>> [                          main] ProbeRunner                    INFO
>>> running test class ch.eugster.ingest.sip.identification.KarafContainerTest
>>> [                          main] ReactorManager                 INFO
>>> suite finished
>>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005
>>> sec - in ch.eugster.ingest.sip.identification.KarafContainerTest
>>>
>>> Results :
>>>
>>>
>>>
>>>
>>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>>>
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] BUILD SUCCESS
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Total time: 4.244 s
>>> [INFO] Finished at: 2015-03-12T20:28:10+01:00
>>> [INFO] Final Memory: 17M/225M
>>> [INFO]
>>> ------------------------------------------------------------------------
>>>
>>>
>>> Christian Eugster
>>> Docuteam GmbH
>>> Langacker 16
>>> Postfach
>>> CH-5405 Baden-Dättwil
>>> +41 (0)56 470 03 37
>>> c.eugster@docuteam.ch
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>> --
>>
>> Apache Member
>> Apache Karaf <http://karaf.apache.org/> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer
>> & Project Lead
>> blog <http://notizblog.nierbeck.de/>
>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>>
>> Software Architect / Project Manager / Scrum Master
>>
>>
>>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Re: Pax exam Test does not run in Karaf container

Posted by Christian Eugster <c....@docuteam.ch>.
Hi Andreas,

I changed to 3.0.3, updated project and restarted, same result. Any ideas?

Regards Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugster@docuteam.ch





> Am 12.03.2015 um 20:57 schrieb Andreas Kuhtz <an...@gmail.com>:
> 
> Hi,
> 
> You should change the version of karaf to 3.0.3 here:
> 
> MavenArtifactUrlReference karafUrl = maven()
> 				.groupId("org.apache.karaf").artifactId("apache-karaf")
> 				.version("3.0.0").type("tar.gz");
> 
> 
> 2015-03-12 20:51 GMT+01:00 Christian Eugster <c.eugster@docuteam.ch <ma...@docuteam.ch>>:
> So I have one test method annotated with @Test. In pom there is no skip test entry in surefire plugin. May be there is a missing dependency?
> 
> Thanks a lot!
> 
> Christian
> 
> Christian Eugster
> Docuteam GmbH
> Langacker 16
> Postfach
> CH-5405 Baden-Dättwil
> +41 (0)56 470 03 37 <tel:%2B41%20%280%2956%20470%2003%2037>
> c.eugster@docuteam.ch <ma...@docuteam.ch>
> 
> 
> 
> 
> 
>> Am 12.03.2015 um 20:43 schrieb Achim Nierbeck <bcanhome@googlemail.com <ma...@googlemail.com>>:
>> 
>> Hi, 
>> 
>> it's a bit hard to see the issue without any source. It's like calling the doc on the phone, "I think I got flu" :-)
>> So I'm doing some wild guesses here :-)
>> 
>> Your Testclass doesn't contain any testmethods?
>> For example is missing a @Test annotation?
>> You added an @Ignore to the test method?
>> 
>> regards, Achim 
>> 
>> 
>> 2015-03-12 20:32 GMT+01:00 Christian Eugster <c.eugster@docuteam.ch <ma...@docuteam.ch>>:
>> Hi,
>> 
>> I have built a bundle with test class. When I run mvn test or mvn install, I got no errors (-> BUILD SUCCESS), but the tests do not run: 
>> 
>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in ch.eugster.ingest.sip.identification.KarafContainerTest
>> 
>> I have the same dependencies in pom.xml as in another project, where the tests run through successfully. Does anybody have an idea, what does go wrong? Thank you!
>> 
>> The whole log is:
>> 
>> [INFO] Scanning for projects...
>> [WARNING] 
>> [WARNING] Some problems were encountered while building the effective model for ch.eugster.ingest:sip-identification-processor:bundle:0.0.1-SNAPSHOT
>> [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.ops4j.pax.exam:pax-exam-junit4:jar -> duplicate declaration of version ${pax.exam.version} @ ch.eugster.ingest:ingest-engine:0.0.1-SNAPSHOT, /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/pom.xml, line 56, column 15
>> [WARNING] 'build.plugins.plugin.version' for org.apache.felix:maven-bundle-plugin is missing. @ line 29, column 12
>> [WARNING] 
>> [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
>> [WARNING] 
>> [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
>> [WARNING] 
>> [INFO] 
>> [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
>> [INFO]                                                                         
>> [INFO] ------------------------------------------------------------------------
>> [INFO] Building A Camel Blueprint Route 0.0.1-SNAPSHOT
>> [INFO] ------------------------------------------------------------------------
>> [INFO] 
>> [INFO] --- depends-maven-plugin:1.2:generate-depends-file (generate-depends-file) @ sip-identification-processor ---
>> [INFO] Created: /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/classes/META-INF/maven/dependencies.properties
>> [INFO] 
>> [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ sip-identification-processor ---
>> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
>> [INFO] Copying 2 resources
>> [INFO] 
>> [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ sip-identification-processor ---
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] 
>> [INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ sip-identification-processor ---
>> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
>> [INFO] Copying 7 resources
>> [INFO] 
>> [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ sip-identification-processor ---
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] 
>> [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ sip-identification-processor ---
>> [INFO] Surefire report directory: /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/surefire-reports
>> 
>> -------------------------------------------------------
>>  T E S T S
>> -------------------------------------------------------
>> SLF4J: Class path contains multiple SLF4J bindings.
>> SLF4J: Found binding in [jar:file:/Users/christian/.m2/repository/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: Found binding in [jar:file:/Users/christian/.m2/repository/org/apache/karaf/org.apache.karaf.client/3.0.3/org.apache.karaf.client-3.0.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: Found binding in [jar:file:/Users/christian/.m2/repository/org/ops4j/pax/logging/pax-logging-api/1.8.1/pax-logging-api-1.8.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings <http://www.slf4j.org/codes.html#multiple_bindings> for an explanation.
>> SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
>> [                          main] DefaultExamSystem              INFO  Pax Exam System (Version: 4.4.0) created.
>> [                          main] ProbeRunner                    INFO  creating PaxExam runner for class ch.eugster.ingest.sip.identification.KarafContainerTest
>> Running ch.eugster.ingest.sip.identification.KarafContainerTest
>> [                          main] ProbeRunner                    INFO  creating PaxExam runner for class ch.eugster.ingest.sip.identification.KarafContainerTest
>> [                          main] ProbeRunner                    INFO  running test class ch.eugster.ingest.sip.identification.KarafContainerTest
>> [                          main] ReactorManager                 INFO  suite finished
>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in ch.eugster.ingest.sip.identification.KarafContainerTest
>> 
>> Results :
>> 
>> 
>> 
>> 
>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>> 
>> [INFO] ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESS
>> [INFO] ------------------------------------------------------------------------
>> [INFO] Total time: 4.244 s
>> [INFO] Finished at: 2015-03-12T20:28:10+01:00
>> [INFO] Final Memory: 17M/225M
>> [INFO] ------------------------------------------------------------------------
>> 
>> 
>> Christian Eugster
>> Docuteam GmbH
>> Langacker 16
>> Postfach
>> CH-5405 Baden-Dättwil
>> +41 (0)56 470 03 37 <tel:%2B41%20%280%2956%20470%2003%2037>
>> c.eugster@docuteam.ch <ma...@docuteam.ch>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> -- 
>> 
>> Apache Member
>> Apache Karaf <http://karaf.apache.org/ <http://karaf.apache.org/>> Committer & PMC
>> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/ <http://wiki.ops4j.org/display/paxweb/Pax+Web/>> Committer & Project Lead
>> blog <http://notizblog.nierbeck.de/ <http://notizblog.nierbeck.de/>>
>> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS <http://bit.ly/1ps9rkS>>
>> 
>> Software Architect / Project Manager / Scrum Master 
>> 
> 
> 


Re: Pax exam Test does not run in Karaf container

Posted by Andreas Kuhtz <an...@gmail.com>.
Hi,

You should change the version of karaf to 3.0.3 here:

MavenArtifactUrlReference karafUrl = maven()
.groupId("org.apache.karaf").artifactId("apache-karaf")
.version("3.0.0").type("tar.gz");


2015-03-12 20:51 GMT+01:00 Christian Eugster <c....@docuteam.ch>:

> So I have one test method annotated with @Test. In pom there is no skip
> test entry in surefire plugin. May be there is a missing dependency?
>
> Thanks a lot!
>
> Christian
>
> Christian Eugster
> Docuteam GmbH
> Langacker 16
> Postfach
> CH-5405 Baden-Dättwil
> +41 (0)56 470 03 37
> c.eugster@docuteam.ch
>
>
>
>
>
> Am 12.03.2015 um 20:43 schrieb Achim Nierbeck <bc...@googlemail.com>:
>
> Hi,
>
> it's a bit hard to see the issue without any source. It's like calling the
> doc on the phone, "I think I got flu" :-)
> So I'm doing some wild guesses here :-)
>
> Your Testclass doesn't contain any testmethods?
> For example is missing a @Test annotation?
> You added an @Ignore to the test method?
>
> regards, Achim
>
>
> 2015-03-12 20:32 GMT+01:00 Christian Eugster <c....@docuteam.ch>:
>
>> Hi,
>>
>> I have built a bundle with test class. When I run mvn test or mvn
>> install, I got no errors (-> BUILD SUCCESS), but the tests do not run:
>>
>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
>> - in ch.eugster.ingest.sip.identification.KarafContainerTest
>>
>> I have the same dependencies in pom.xml as in another project, where the
>> tests run through successfully. Does anybody have an idea, what does go
>> wrong? Thank you!
>>
>> The whole log is:
>>
>> [INFO] Scanning for projects...
>> [WARNING]
>> [WARNING] Some problems were encountered while building the effective
>> model for
>> ch.eugster.ingest:sip-identification-processor:bundle:0.0.1-SNAPSHOT
>> [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)'
>> must be unique: org.ops4j.pax.exam:pax-exam-junit4:jar -> duplicate
>> declaration of version ${pax.exam.version} @
>> ch.eugster.ingest:ingest-engine:0.0.1-SNAPSHOT,
>> /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/pom.xml,
>> line 56, column 15
>> [WARNING] 'build.plugins.plugin.version' for
>> org.apache.felix:maven-bundle-plugin is missing. @ line 29, column 12
>> [WARNING]
>> [WARNING] It is highly recommended to fix these problems because they
>> threaten the stability of your build.
>> [WARNING]
>> [WARNING] For this reason, future Maven versions might no longer support
>> building such malformed projects.
>> [WARNING]
>> [INFO]
>> [INFO] Using the builder
>> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder
>> with a thread count of 1
>> [INFO]
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building A Camel Blueprint Route 0.0.1-SNAPSHOT
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO]
>> [INFO] --- depends-maven-plugin:1.2:generate-depends-file
>> (generate-depends-file) @ sip-identification-processor ---
>> [INFO] Created:
>> /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/classes/META-INF/maven/dependencies.properties
>> [INFO]
>> [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @
>> sip-identification-processor ---
>> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
>> resources, i.e. build is platform dependent!
>> [INFO] Copying 2 resources
>> [INFO]
>> [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @
>> sip-identification-processor ---
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO]
>> [INFO] --- maven-resources-plugin:2.7:testResources
>> (default-testResources) @ sip-identification-processor ---
>> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
>> resources, i.e. build is platform dependent!
>> [INFO] Copying 7 resources
>> [INFO]
>> [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @
>> sip-identification-processor ---
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO]
>> [INFO] --- maven-surefire-plugin:2.18:test (default-test) @
>> sip-identification-processor ---
>> [INFO] Surefire report directory:
>> /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/surefire-reports
>>
>> -------------------------------------------------------
>>  T E S T S
>> -------------------------------------------------------
>> SLF4J: Class path contains multiple SLF4J bindings.
>> SLF4J: Found binding in
>> [jar:file:/Users/christian/.m2/repository/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: Found binding in
>> [jar:file:/Users/christian/.m2/repository/org/apache/karaf/org.apache.karaf.client/3.0.3/org.apache.karaf.client-3.0.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: Found binding in
>> [jar:file:/Users/christian/.m2/repository/org/ops4j/pax/logging/pax-logging-api/1.8.1/pax-logging-api-1.8.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>> explanation.
>> SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
>> [                          main] DefaultExamSystem              INFO  Pax
>> Exam System (Version: 4.4.0) created.
>> [                          main] ProbeRunner                    INFO
>> creating PaxExam runner for class
>> ch.eugster.ingest.sip.identification.KarafContainerTest
>> Running ch.eugster.ingest.sip.identification.KarafContainerTest
>> [                          main] ProbeRunner                    INFO
>> creating PaxExam runner for class
>> ch.eugster.ingest.sip.identification.KarafContainerTest
>> [                          main] ProbeRunner                    INFO
>> running test class ch.eugster.ingest.sip.identification.KarafContainerTest
>> [                          main] ReactorManager                 INFO
>> suite finished
>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
>> - in ch.eugster.ingest.sip.identification.KarafContainerTest
>>
>> Results :
>>
>>
>>
>>
>> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESS
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 4.244 s
>> [INFO] Finished at: 2015-03-12T20:28:10+01:00
>> [INFO] Final Memory: 17M/225M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>>
>> Christian Eugster
>> Docuteam GmbH
>> Langacker 16
>> Postfach
>> CH-5405 Baden-Dättwil
>> +41 (0)56 470 03 37
>> c.eugster@docuteam.ch
>>
>>
>>
>>
>>
>>
>
>
> --
>
> Apache Member
> Apache Karaf <http://karaf.apache.org/> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
> Project Lead
> blog <http://notizblog.nierbeck.de/>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
>
> Software Architect / Project Manager / Scrum Master
>
>
>

Re: Pax exam Test does not run in Karaf container

Posted by Christian Eugster <c....@docuteam.ch>.
So I have one test method annotated with @Test. In pom there is no skip test entry in surefire plugin. May be there is a missing dependency?

Thanks a lot!

Christian

Christian Eugster
Docuteam GmbH
Langacker 16
Postfach
CH-5405 Baden-Dättwil
+41 (0)56 470 03 37
c.eugster@docuteam.ch





> Am 12.03.2015 um 20:43 schrieb Achim Nierbeck <bc...@googlemail.com>:
> 
> Hi, 
> 
> it's a bit hard to see the issue without any source. It's like calling the doc on the phone, "I think I got flu" :-)
> So I'm doing some wild guesses here :-)
> 
> Your Testclass doesn't contain any testmethods?
> For example is missing a @Test annotation?
> You added an @Ignore to the test method?
> 
> regards, Achim 
> 
> 
> 2015-03-12 20:32 GMT+01:00 Christian Eugster <c.eugster@docuteam.ch <ma...@docuteam.ch>>:
> Hi,
> 
> I have built a bundle with test class. When I run mvn test or mvn install, I got no errors (-> BUILD SUCCESS), but the tests do not run: 
> 
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in ch.eugster.ingest.sip.identification.KarafContainerTest
> 
> I have the same dependencies in pom.xml as in another project, where the tests run through successfully. Does anybody have an idea, what does go wrong? Thank you!
> 
> The whole log is:
> 
> [INFO] Scanning for projects...
> [WARNING] 
> [WARNING] Some problems were encountered while building the effective model for ch.eugster.ingest:sip-identification-processor:bundle:0.0.1-SNAPSHOT
> [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.ops4j.pax.exam:pax-exam-junit4:jar -> duplicate declaration of version ${pax.exam.version} @ ch.eugster.ingest:ingest-engine:0.0.1-SNAPSHOT, /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/pom.xml, line 56, column 15
> [WARNING] 'build.plugins.plugin.version' for org.apache.felix:maven-bundle-plugin is missing. @ line 29, column 12
> [WARNING] 
> [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
> [WARNING] 
> [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
> [WARNING] 
> [INFO] 
> [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
> [INFO]                                                                         
> [INFO] ------------------------------------------------------------------------
> [INFO] Building A Camel Blueprint Route 0.0.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- depends-maven-plugin:1.2:generate-depends-file (generate-depends-file) @ sip-identification-processor ---
> [INFO] Created: /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/classes/META-INF/maven/dependencies.properties
> [INFO] 
> [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ sip-identification-processor ---
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 2 resources
> [INFO] 
> [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @ sip-identification-processor ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO] 
> [INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ sip-identification-processor ---
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO] 
> [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @ sip-identification-processor ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO] 
> [INFO] --- maven-surefire-plugin:2.18:test (default-test) @ sip-identification-processor ---
> [INFO] Surefire report directory: /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/surefire-reports
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in [jar:file:/Users/christian/.m2/repository/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/Users/christian/.m2/repository/org/apache/karaf/org.apache.karaf.client/3.0.3/org.apache.karaf.client-3.0.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in [jar:file:/Users/christian/.m2/repository/org/ops4j/pax/logging/pax-logging-api/1.8.1/pax-logging-api-1.8.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings <http://www.slf4j.org/codes.html#multiple_bindings> for an explanation.
> SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
> [                          main] DefaultExamSystem              INFO  Pax Exam System (Version: 4.4.0) created.
> [                          main] ProbeRunner                    INFO  creating PaxExam runner for class ch.eugster.ingest.sip.identification.KarafContainerTest
> Running ch.eugster.ingest.sip.identification.KarafContainerTest
> [                          main] ProbeRunner                    INFO  creating PaxExam runner for class ch.eugster.ingest.sip.identification.KarafContainerTest
> [                          main] ProbeRunner                    INFO  running test class ch.eugster.ingest.sip.identification.KarafContainerTest
> [                          main] ReactorManager                 INFO  suite finished
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec - in ch.eugster.ingest.sip.identification.KarafContainerTest
> 
> Results :
> 
> 
> 
> 
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4.244 s
> [INFO] Finished at: 2015-03-12T20:28:10+01:00
> [INFO] Final Memory: 17M/225M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Christian Eugster
> Docuteam GmbH
> Langacker 16
> Postfach
> CH-5405 Baden-Dättwil
> +41 (0)56 470 03 37 <tel:%2B41%20%280%2956%20470%2003%2037>
> c.eugster@docuteam.ch <ma...@docuteam.ch>
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> Apache Member
> Apache Karaf <http://karaf.apache.org/ <http://karaf.apache.org/>> Committer & PMC
> OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/ <http://wiki.ops4j.org/display/paxweb/Pax+Web/>> Committer & Project Lead
> blog <http://notizblog.nierbeck.de/ <http://notizblog.nierbeck.de/>>
> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS <http://bit.ly/1ps9rkS>>
> 
> Software Architect / Project Manager / Scrum Master 
> 


Re: Pax exam Test does not run in Karaf container

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

it's a bit hard to see the issue without any source. It's like calling the
doc on the phone, "I think I got flu" :-)
So I'm doing some wild guesses here :-)

Your Testclass doesn't contain any testmethods?
For example is missing a @Test annotation?
You added an @Ignore to the test method?

regards, Achim


2015-03-12 20:32 GMT+01:00 Christian Eugster <c....@docuteam.ch>:

> Hi,
>
> I have built a bundle with test class. When I run mvn test or mvn install,
> I got no errors (-> BUILD SUCCESS), but the tests do not run:
>
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
> - in ch.eugster.ingest.sip.identification.KarafContainerTest
>
> I have the same dependencies in pom.xml as in another project, where the
> tests run through successfully. Does anybody have an idea, what does go
> wrong? Thank you!
>
> The whole log is:
>
> [INFO] Scanning for projects...
> [WARNING]
> [WARNING] Some problems were encountered while building the effective
> model for
> ch.eugster.ingest:sip-identification-processor:bundle:0.0.1-SNAPSHOT
> [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)'
> must be unique: org.ops4j.pax.exam:pax-exam-junit4:jar -> duplicate
> declaration of version ${pax.exam.version} @
> ch.eugster.ingest:ingest-engine:0.0.1-SNAPSHOT,
> /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/pom.xml,
> line 56, column 15
> [WARNING] 'build.plugins.plugin.version' for
> org.apache.felix:maven-bundle-plugin is missing. @ line 29, column 12
> [WARNING]
> [WARNING] It is highly recommended to fix these problems because they
> threaten the stability of your build.
> [WARNING]
> [WARNING] For this reason, future Maven versions might no longer support
> building such malformed projects.
> [WARNING]
> [INFO]
> [INFO] Using the builder
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder
> with a thread count of 1
> [INFO]
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building A Camel Blueprint Route 0.0.1-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- depends-maven-plugin:1.2:generate-depends-file
> (generate-depends-file) @ sip-identification-processor ---
> [INFO] Created:
> /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/classes/META-INF/maven/dependencies.properties
> [INFO]
> [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @
> sip-identification-processor ---
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] Copying 2 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:3.2:compile (default-compile) @
> sip-identification-processor ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-resources-plugin:2.7:testResources
> (default-testResources) @ sip-identification-processor ---
> [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
> resources, i.e. build is platform dependent!
> [INFO] Copying 7 resources
> [INFO]
> [INFO] --- maven-compiler-plugin:3.2:testCompile (default-testCompile) @
> sip-identification-processor ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-surefire-plugin:2.18:test (default-test) @
> sip-identification-processor ---
> [INFO] Surefire report directory:
> /Users/christian/Projekte/ceugster/Entwicklung/Test/Workspace-4.4/ingest-engine/sip-identification-processor/target/surefire-reports
>
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
> [jar:file:/Users/christian/.m2/repository/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/Users/christian/.m2/repository/org/apache/karaf/org.apache.karaf.client/3.0.3/org.apache.karaf.client-3.0.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/Users/christian/.m2/repository/org/ops4j/pax/logging/pax-logging-api/1.8.1/pax-logging-api-1.8.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
> SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
> [                          main] DefaultExamSystem              INFO  Pax
> Exam System (Version: 4.4.0) created.
> [                          main] ProbeRunner                    INFO
> creating PaxExam runner for class
> ch.eugster.ingest.sip.identification.KarafContainerTest
> Running ch.eugster.ingest.sip.identification.KarafContainerTest
> [                          main] ProbeRunner                    INFO
> creating PaxExam runner for class
> ch.eugster.ingest.sip.identification.KarafContainerTest
> [                          main] ProbeRunner                    INFO
> running test class ch.eugster.ingest.sip.identification.KarafContainerTest
> [                          main] ReactorManager                 INFO
> suite finished
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 sec
> - in ch.eugster.ingest.sip.identification.KarafContainerTest
>
> Results :
>
>
>
>
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 4.244 s
> [INFO] Finished at: 2015-03-12T20:28:10+01:00
> [INFO] Final Memory: 17M/225M
> [INFO]
> ------------------------------------------------------------------------
>
>
> Christian Eugster
> Docuteam GmbH
> Langacker 16
> Postfach
> CH-5405 Baden-Dättwil
> +41 (0)56 470 03 37
> c.eugster@docuteam.ch
>
>
>
>
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master