Giter Site home page Giter Site logo

hosuaby / inject-resources Goto Github PK

View Code? Open in Web Editor NEW
52.0 5.0 5.0 558 KB

Simple and convenient way to read content of resource in Java.

Home Page: http://inject-resources.hosuaby.io

License: Apache License 2.0

Java 99.66% Shell 0.34%
java resources resource load loading parse parsing tests junit jupiter

inject-resources's People

Contributors

crizzis avatar hosuaby avatar nstdio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

inject-resources's Issues

Improve Maven setup instructions in documentation

The documentation explains that this project's artefacts are hosted on JCenter and suggests the user add this configuration to their pom:

<repositories>
    <repository>
        ...
        <id>central</id>
        <name>bintray</name>
        <url>https://jcenter.bintray.com</url>
    </repository>
</repositories>

This can lead to unexpected problems in some cases.

By specifying its ID as "central", this repository configuration replaces Maven's default configuration for that ID which points to https://repo.maven.apache.org/maven2. (Generate the effective pom in an empty project with and without the above config to reproduce)

Some users, especially in corporate settings, may have defined a mirror for ID "central" with the default URL. This will cause Maven to try and fetch "inject-resources-..." from https://repo.maven.apache.org/maven2, which will fail.

I suggest changing the documentation. Either use a different ID (e.g. "jcenter") or add a remark like "You may have to define a different repository ID when using a mirror".

Sumplify architecture

Do not rely on classpath scan to find right classes/annotations. Better to make hard-coded maps.

It seems reflections works against whole classpath

I observe the following errors on my console - i think the reason is that reflections goes against whole classpath

15:37:28.554 [main] WARN org.reflections.Reflections - could not get type for name javax.servlet.jsp.JspWriter from any class loader
org.reflections.ReflectionsException: could not get type for name javax.servlet.jsp.JspWriter
at org.reflections.ReflectionUtils.forName(ReflectionUtils.java:312)
at org.reflections.Reflections.expandSuperTypes(Reflections.java:382)
at org.reflections.Reflections.(Reflections.java:140)
at com.adelean.inject.resources.junit.jupiter.core.TestsAdviceProcessor.findAdviceClass(TestsAdviceProcessor.java:38)

Support for Spring 6

The Spring module does not work with Spring 6, because the (previously deprecated) InstantiationAwareBeanPostProcessorAdapter has been removed.

Might be able to create a PR with a backwards-compatible fix for this problem later today.

[Junit5] Injection of named parsers fail before checking TestsAdvice

When using a global @TestsAdvice with a named parsers, the injection of the named parser will always fail before TestWithResourcesExtension checks for the presence of a With<Parser> member in a tests advice class.

The error that no parser of the given name can be found occurs here:

But TestsAdviceProcessor is not called until after that:

if (!isNestedTestClassContext(context)) {
TestsAdviceProcessor
.findAdviceClass(testContext.packageForAdviceScan())
.map(ReflectionSupport::newInstance)
.ifPresent(adviceInstance -> provideParsersFromAdvice(adviceInstance, context));
}

Getting Error java.lang.ExceptionInInitializerError

import com.adelean.inject.resources.junit.jupiter.TestWithResources;
import com.adelean.inject.resources.junit.jupiter.WithGson;
import com.google.gson.Gson;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import java.util.Map;

@TestWithResources
@DisplayName("@GivenJsonResource")
public class BeanWithJsonResource {

    @WithGson
    Gson gson = new Gson();

    @GivenJsonResource("/Test/sponge-bob.json")
    Map<String, Object> jsonAsMap;



    @Test
    @DisplayName("injects JSON content into Map instance field")
    public void testInjectTextIntoStringInstanceField() {
        for (String keys : jsonAsMap.keySet())
        {
            System.out.println(keys + ":"+ jsonAsMap.get(keys));
        }
    }

}

Build.gradle

    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.1'
    testCompile group: 'com.adelean', name: 'inject-resources-core', version: '0.1.0'
    testCompile group: 'com.adelean', name: 'inject-resources-junit-jupiter', version: '0.1.0'
    implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.7'

Error:


   at com.adelean.inject.resources.junit.jupiter.TestWithResourcesExtension.provideParsers(TestWithResourcesExtension.java:145)
    at com.adelean.inject.resources.junit.jupiter.TestWithResourcesExtension.inject(TestWithResourcesExtension.java:140)
    at com.adelean.inject.resources.junit.jupiter.TestWithResourcesExtension.beforeAll(TestWithResourcesExtension.java:42)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:368)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:192)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:136)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
    at java.util.ArrayList.forEach(ArrayList.java:1259)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99)
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79)
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75)
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
    at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
    at com.sun.proxy.$Proxy2.stop(Unknown Source)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:133)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
    at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
    at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
    at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
    at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
    at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
    at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
    at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
    at java.lang.Class.createAnnotationData(Class.java:3521)
    at java.lang.Class.annotationData(Class.java:3510)
    at java.lang.Class.getDeclaredAnnotation(Class.java:3458)
    at com.adelean.inject.resources.commons.AnnotationUtils.findAnnotation(AnnotationUtils.java:35)
    at com.adelean.inject.resources.commons.AnnotationUtils.findAnnotation(AnnotationUtils.java:22)
    at com.adelean.inject.resources.commons.AnnotationSupport.lambda$allResourceAnnotations$5(AnnotationSupport.java:155)
    at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
    at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1556)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at com.adelean.inject.resources.commons.AnnotationSupport.allResourceAnnotations(AnnotationSupport.java:158)
    at com.adelean.inject.resources.junit.jupiter.core.Annotations.<clinit>(Annotations.java:11)

Disconnected from the target VM, address: 'localhost:58930', transport: 'socket'
BeanWithJsonResource > initializationError FAILED
    java.lang.ExceptionInInitializerError at TestWithResourcesExtension.java:145
        Caused by: java.lang.ArrayStoreException at AnnotationParser.java:724

Minimum Java version?

I'm trying to use:

dependencies {
    testImplementation 'io.hosuaby:inject-resources-core:0.2.2'
    testImplementation 'io.hosuaby:inject-resources-junit-jupiter:0.2.2'
}

when building the project got the

      > No matching variant of io.hosuaby:inject-resources-junit-jupiter:0.2.2 was found. The consumer was configured to find an API of a library compatible with Java 11, preferably in the form of class files, preferably optimized for standard JVMs, and its dependencies declared externally but:
          - Variant 'apiElements' capability io.hosuaby:inject-resources-junit-jupiter:0.2.2 declares an API of a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 13 and the consumer needed a component compatible with Java 11
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
          - Variant 'runtimeElements' capability io.hosuaby:inject-resources-junit-jupiter:0.2.2 declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component compatible with Java 13 and the consumer needed a component compatible with Java 11
              - Other compatible attribute:
                  - Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)

but after adding block:

java {
    disableAutoTargetJvm()
}

build succeeds.

Environment

$ ./gradlew --version

------------------------------------------------------------
Gradle 7.2
------------------------------------------------------------

Build time:   2021-08-17 09:59:03 UTC
Revision:     a773786b58bb28710e3dc96c4d1a7063628952ad

Kotlin:       1.5.21
Groovy:       3.0.8
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          11.0.11 (AdoptOpenJDK 11.0.11+9)
OS:           Mac OS X 11.5 x86_64

I believe there is an issue when publishing the package, because it requires for consumer compatibility with Java 13, meanwhile the library uses sourceCompatibility and targetCompatibility equal to JavaVersion.VERSION_1_8

建议将reflections升级

现在的0.9.12版本,启动之后太多的报错信息,虽然不影响程序运行,但是看着不舒服。建议升级到最新版本

No guide on resource file path

Why there's no documentation of where the resource file should be? Whether it has to be a relative path, an absolute path, or whether the file should be inside the same folder of the class being tested? I am getting only null pointer exceptions. it says resource not found!

// Test Class Location ​
projectname/src/test/java/xyz/company/app/helpers/TestClass.java

// Resource file location
projectname/src/test/java/xyz/company/app/helpers/dummy_form_data.json

// Inside the TestClass

// Neither this works
@GivenJsonResource("dummy_form_data.json")

// Nor this works
@GivenJsonResource("/xyz/company/app/helpers/dummy_form_data.json")

What am I doing wrong exactly?

sun.reflect.annotation.TypeNotPresentExceptionProxy when trying to use the lib

Hello,

I'm trying to use the Inject Resources lib but I can't get it to work. To ensure that the package wasn't conflicting with any of the other dependencies, I created a blank project and imported the following dependencies:

<dependencies>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.11.4</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.11.4</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.7.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.hosuaby</groupId>
            <artifactId>inject-resources-core</artifactId>
            <version>0.2.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.hosuaby</groupId>
            <artifactId>inject-resources-junit-jupiter</artifactId>
            <version>0.2.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

And created a simple test class:

import com.adelean.inject.resources.junit.jupiter.TestWithResources;
import com.adelean.inject.resources.junit.jupiter.WithJacksonMapper;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.Test;

@TestWithResources
public class InjectResourcesTest {
    @WithJacksonMapper
    ObjectMapper objectMapper = new ObjectMapper();

    @Test
    public void injectResource() {

    }
}

However, when trying to run the test, I get:

java.lang.ExceptionInInitializerError
	at com.adelean.inject.resources.junit.jupiter.TestWithResourcesExtension.provideParsers(TestWithResourcesExtension.java:145)
	at com.adelean.inject.resources.junit.jupiter.TestWithResourcesExtension.inject(TestWithResourcesExtension.java:140)
	at com.adelean.inject.resources.junit.jupiter.TestWithResourcesExtension.beforeAll(TestWithResourcesExtension.java:42)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$invokeBeforeAllCallbacks$8(ClassBasedTestDescriptor.java:368)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeBeforeAllCallbacks(ClassBasedTestDescriptor.java:368)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:192)
	at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.before(ClassBasedTestDescriptor.java:78)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:136)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:143)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:129)
	at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:127)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:126)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:84)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:75)
	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:221)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
	at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
	at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
	at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
	at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
	at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
	at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
	at java.lang.Class.createAnnotationData(Class.java:3521)
	at java.lang.Class.annotationData(Class.java:3510)
	at java.lang.Class.getDeclaredAnnotation(Class.java:3458)
	at com.adelean.inject.resources.commons.AnnotationUtils.findAnnotation(AnnotationUtils.java:35)
	at com.adelean.inject.resources.commons.AnnotationUtils.findAnnotation(AnnotationUtils.java:22)
	at com.adelean.inject.resources.commons.AnnotationSupport.lambda$allResourceAnnotations$5(AnnotationSupport.java:156)
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)
	at java.util.Iterator.forEachRemaining(Iterator.java:116)
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
	at com.adelean.inject.resources.commons.AnnotationSupport.allResourceAnnotations(AnnotationSupport.java:159)
	at com.adelean.inject.resources.junit.jupiter.core.Annotations.<clinit>(Annotations.java:11)
	... 40 more


Process finished with exit code -1

Am I missing something?

Version 0.2.1 not resolving from maven central

For what ever reason

 testImplementation 'io.hosuaby:inject-resources-junit-jupiter:0.2.1'
 testImplementation 'io.hosuaby:inject-resources-core:0.2.1'

does not resolve locally for me, but changing to version 0.2.0 does (yet has a bug resolved in 0.2.1).

It's clearly in Maven https://repo1.maven.org/maven2/io/hosuaby/inject-resources-junit-jupiter/0.2.1/

This may resolve itself in time and/or simply a local issue to me, but I thought I'd give you a heads up in case it's an issue with the pom generation at build time.

fyi Gradle 6.8.3

also, moving to maven central after bintray abandoning open source projects is a pita.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.