On 16.05.2008 10:47:00 Carsten Ziegeler wrote:
> Hi Jeremias,
>
> Jeremias Maerki wrote:
> > Following up on a suggestion by Bertrand I'm checking out Sling. I've
> > gone through the 15 min tutorial. Well, it took me a lot longer than
> > that. Just Maven downloading all the dependencies takes that much.
> >
> > BTW, I had to disable the testAttributes() and testDirectives() methods
> > in:
> > http://svn.apache.org/repos/asf/incubator/sling/trunk/commons/osgi/src/test/java/org/apache/sling/commons/osgi/ManifestHeaderTest.java
> > to make Sling compile.
> >
> Hmm, that works on my machine - can you give me the error?
Maven output:
[INFO] ------------------------------------------------------------------------
[INFO] Building Sling - Commons OSGi support
[INFO] task-segment: [install]
[INFO] ------------------------------------------------------------------------
[INFO] [enforcer:enforce {execution: enforce-java}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [scr:scr {execution: generate-scr-scrdescriptor}]
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Compiling 1 source file to
C:\Dev\apache.org\r\sling\commons\osgi\target\test-classes
[INFO] [surefire:test]
[INFO] Surefire report directory:
C:\Dev\apache.org\r\sling\commons\osgi\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.apache.sling.commons.osgi.ManifestHeaderTest
Tests run: 5, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec <<<
FAILURE!
Results :
Failed tests:
testAttributes(org.apache.sling.commons.osgi.ManifestHeaderTest)
testDirectives(org.apache.sling.commons.osgi.ManifestHeaderTest)
Tests run: 5, Failures: 2, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11 seconds
[INFO] Finished at: Fri May 16 10:51:30 CEST 2008
[INFO] Final Memory: 23M/58M
[INFO] ------------------------------------------------------------------------
<snip what="more ranting about Maven"/> ;-)
Digging up the JUnit report reveals:
-------------------------------------------------------------------------------
Test set: org.apache.sling.commons.osgi.ManifestHeaderTest
-------------------------------------------------------------------------------
Tests run: 5, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec <<<
FAILURE!
testAttributes(org.apache.sling.commons.osgi.ManifestHeaderTest) Time elapsed:
0 sec <<< FAILURE!
junit.framework.ComparisonFailure: null expected:<[a]> but was:<[b]>
at junit.framework.Assert.assertEquals(Assert.java:81)
at junit.framework.Assert.assertEquals(Assert.java:87)
at
org.apache.sling.commons.osgi.ManifestHeaderTest.testAttributes(ManifestHeaderTest.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
testDirectives(org.apache.sling.commons.osgi.ManifestHeaderTest) Time elapsed:
0 sec <<< FAILURE!
junit.framework.ComparisonFailure: null expected:<[a]> but was:<[b]>
at junit.framework.Assert.assertEquals(Assert.java:81)
at junit.framework.Assert.assertEquals(Assert.java:87)
at
org.apache.sling.commons.osgi.ManifestHeaderTest.testDirectives(ManifestHeaderTest.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:76)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
My env: WinXP SP2, Sun Java 6.0_03 Client VM
> For the simple-demo, I think you should invoke /sample/content/home.html
Will check that out right away. Thanks!
Jeremias Maerki