On 10/20/2011 11:51 AM, Peter Niederwieser wrote:
> Seems like tests don't execute because Gradle can't find them. It can't find
> them due to this:
> 
> 11:17:43.129 [DEBUG]
> [org.gradle.api.internal.tasks.testing.junit.JUnitDetector] test-class-scan
> : failed to scan parent class java/lang/Object, could not find the class
> file
> 
> I've never seen this before. Try to specify an include pattern for the test
> task. This will disable test auto-detection.
> 
> test {
>   include "**/*Test.class"
> }

Okay, I did this and now the output is far quieter :)
<paste>
13:30:05.002 [INFO]
[org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository]
Executing task ':test' due to:
Output file
/home/dkowis/gitwork/itsm/incident-service/build/test-results for task
':test' has changed.
Output file
/home/dkowis/gitwork/itsm/incident-service/build/reports/tests for task
':test' has changed.
Output file
/home/dkowis/gitwork/itsm/incident-service/build/reports/tests/style.css
has been removed for task ':test'.
Output file
/home/dkowis/gitwork/itsm/incident-service/build/reports/tests/index.html has
been removed for task ':test'.
Output file
/home/dkowis/gitwork/itsm/incident-service/build/reports/tests/css3-pie-1.0beta3.htc
has been removed for task ':test'.
Output file
/home/dkowis/gitwork/itsm/incident-service/build/reports/tests/report.js
has been removed for task ':test'.
13:30:05.003 [DEBUG]
[org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] task
':test' is not up-to-date
13:30:05.004 [DEBUG]
[org.gradle.api.internal.changedetection.DefaultFileCacheListener]
Invalidate cached files for file
'/home/dkowis/gitwork/itsm/incident-service/build/test-results'
13:30:05.005 [DEBUG]
[org.gradle.api.internal.changedetection.DefaultFileCacheListener]
Invalidate cached files for file
'/home/dkowis/gitwork/itsm/incident-service/build/reports/tests'
13:30:05.005 [DEBUG]
[org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter]
Executing actions for task ':test'.
13:30:05.019 [DEBUG] [org.gradle.api.tasks.testing.Test] Started tests
13:30:05.032 [DEBUG] [org.gradle.api.tasks.testing.Test] Finished tests
</paste>

So the question I'd ask were I trying to help me solve this, is what is
my project layout:

$ ls
build  build.gradle  features  gradle.properties  pom.xml  README  src
target
$ ls src
api-documentation  generated  main  test
$ ls src/test/
groovy  java  resources  ruby
$ ls src/main/
assembly  config  db  filters  java  resources  samples  webapp  wsdl

I assume that I don't need to change anything from the default
configuration thanks to applying the 'java' and 'groovy' plugins. The
tests and such should just be available?

Thanks,
David

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to