geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sai Boorlagadda <sai.boorlaga...@gmail.com>
Subject Re: Need gradle help
Date Mon, 17 Sep 2018 16:36:52 GMT
It looks[1] like it is been renamed as 'tests', so you can try

testCompile 'org.apache.logging.log4j:log4j-core:' +
project.'log4j.version' + ':tests'

[1]
https://repo.maven.apache.org/maven2/org/apache/logging/log4j/log4j-core/2.11.0/

On Fri, Sep 14, 2018 at 5:17 PM Jacob Barrett <jbarrett@pivotal.io> wrote:

> The concatenation is missing a : in front of the test-jar.
>
> > On Sep 14, 2018, at 4:10 PM, Kirk Lund <klund@apache.org> wrote:
> >
> > Log4j2 publishes a test jar for log4j-core. The jar includes useful
> things
> > like LoggerContextRule.
> >
> > This blog post shows how to add the dependency for testing to maven:
> > https://relentlesscoding.com/2018/04/21/unit-test-log4j2-log-output/
> >
> > This results look like this:
> >
> > <dependency>
> >    <groupId>org.apache.logging.log4j</groupId>
> >    <artifactId>log4j-core</artifactId>
> >    <version>2.11.0</version>
> >    <type>test-jar</type>
> > </dependency>
> >
> > And these various stackoverflow questions talk about using Gradle's "
> > classifier" instead of "type":
> > *
> >
> https://stackoverflow.com/questions/20224260/how-do-i-pull-maven-test-jars-using-gradle
> > *
> >
> https://stackoverflow.com/questions/13188438/how-to-specify-a-classifier-in-a-gradle-dependencys-dependency
> >
> > This gradle man page discusses the "classifier" further:
> > *
> >
> https://docs.gradle.org/current/userguide/declaring_dependencies.html#sub:resolve_specific_artifacts_from_dependency
> >
> > I've tried adding:
> >
> > +  compile 'org.apache.logging.log4j:log4j-core:' +
> project.'log4j.version'
> > + 'test-jar'
> >
> > +  testCompile 'org.apache.logging.log4j:log4j-core:' +
> > project.'log4j.version' + 'test-jar'
> >
> > +  integrationTestCompile 'org.apache.logging.log4j:log4j-core:' +
> > project.'log4j.version' + 'test-jar'
> >
> > ...too geode-core/build.gradle. The result builds but if I then try to
> use
> > any classes from the test jar I have no luck. If I check Project
> Structure
> > in IntelliJ after making sure that my project re synced from gradle, sure
> > enough the test jar is still missing from the dependencies.
> >
> > According to Gradle and SO, this should work. Is the problem our gradle
> > mess? Does anyone know how to get this working in the Geode gradle build?
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message