Re: Newbie access

2008-05-16 Thread Carsten Ziegeler
The order of attributes and directives is now preserved. Jeremias could 
you please test if this works for you (I don't have access to a windows 
system atm)?


Thanks
Carsten

Carsten Ziegeler wrote:

Felix Meschberger wrote:

Hi,

Without reading code, this sounds like depending on the order of keys in
a HashMap or the order of entries in a Set ;-)


Yepp, that's the problem :)

Thanks Jeremias for reporting this and thanks Felix for finding the 
problem.


Now it's my turn to fix the test case :)

Carsten



--
Carsten Ziegeler
[EMAIL PROTECTED]


Re: Newbie access

2008-05-16 Thread Carsten Ziegeler

Felix Meschberger wrote:

Hi,

Without reading code, this sounds like depending on the order of keys in
a HashMap or the order of entries in a Set ;-)


Yepp, that's the problem :)

Thanks Jeremias for reporting this and thanks Felix for finding the problem.

Now it's my turn to fix the test case :)

Carsten
--
Carsten Ziegeler
[EMAIL PROTECTED]


Re: Newbie access

2008-05-16 Thread Felix Meschberger
Hi,

Without reading code, this sounds like depending on the order of keys in
a HashMap or the order of entries in a Set ;-)

Regards
Felix

Am Freitag, den 16.05.2008, 10:59 +0200 schrieb Jeremias Maerki:
> 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] 
> 
> 
>  ;-)
> 
> 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)
>

Re: Newbie access

2008-05-16 Thread Jeremias Maerki
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] 

 ;-)

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)

Re: Newbie access

2008-05-16 Thread Bertrand Delacretaz
Hi Jeremias,

On Fri, May 16, 2008 at 10:29 AM, Jeremias Maerki
<[EMAIL PROTECTED]> wrote:
> ...'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

Yes - we hope to have a release Real Soon Now to fix that (we've been
hoping for a while actually ;-)

> ...BTW, I had to disable the testAttributes() and testDirectives() methods...

Thanks for reporting, I have created
https://issues.apache.org/jira/browse/SLING-460

>... I'm currently sort of stuck as I can't get much further than from what
> I've learned in the tutorial. I went first to the samples directory
> where "simple-demo" shot to my eye as the perfect next step...

I'm not too familar with that sample, but maybe the webloader sample
would be easier to grasp the basics.

Load the two service and ui bundles that are built under
http://svn.apache.org/repos/asf/incubator/sling/trunk/samples/webloader/,
and go to http://localhost:/bin/sling/webloader.html as the ui
README.txt indicates.

The code is just a few java and esp files which actually do something
useful (load documents from a Google query in the repository with a
usable UI), so that should help explain things a bit better.

> ...Another question: is it necessary to download the full dojo distribution
> (>15MB) each time after a "mvn clean" (not that I do that every time)?...

I fixed this yesterday so that it's downloaded the first time only,
and stays in the dojo module folder for later builds.

-Bertrand (itching to create this sling blog demo ;-)


Re: Newbie access

2008-05-16 Thread Carsten Ziegeler

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?

For the simple-demo, I think you should invoke /sample/content/home.html

Thanks
Carsten

--
Carsten Ziegeler
[EMAIL PROTECTED]