Helidon MP OpenAPI aren't generating a updated openapi endpoint response - java

I'm currently building a microservice-based on Helidon Microprofile following guides and tutorials from Oracle themselves, but I've run into a problem related to the 'Automatic OpenAPI specification generator' when using Annotations.
My POM consists of an MP bundle and integrations to make it work with Hibernate-provided JPA.
Even after setting up all the annotations on my Resource, it doesn't generate an updated specification.
POM
<dependencies>
<dependency>
<groupId>io.helidon.microprofile.bundles</groupId>
<artifactId>helidon-microprofile</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jandex</artifactId>
<version>2.1.1.Final</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.helidon.integrations.cdi</groupId>
<artifactId>helidon-integrations-cdi-datasource-hikaricp</artifactId>
<version>1.4.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.helidon.integrations.cdi</groupId>
<artifactId>helidon-integrations-cdi-jta-weld</artifactId>
<version>1.4.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.helidon.integrations.cdi</groupId>
<artifactId>helidon-integrations-cdi-hibernate</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
<version>1.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>2.2.3</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>2.29.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.8.3</version>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>jwks-rsa</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.5.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.5.2</version>
<scope>test</scope>
</dependency>
</dependencies>
I'm only using Annotations specified in the guides and #OpenAPIDefinition for defining things like Title and Licence.
RESOURCE
#OpenAPIDefinition(
info = #Info(
title = "Newsletter Microservice",
version = "1.0", description = "Microservice in charge of handling newsletter",
license = #License(name = "Apache 2.0", url = "https://www.apache.org/licenses/LICENSE-2.0"),
contact = #Contact(name = "Email", url = "mailto:email")
),
tags = {
#Tag(name = "public"), #Tag(name = "private")
}
)
#Path("/newsletter")
#RequestScoped
public class NewsletterClientResource {
LOG
Connected to the target VM, address: '127.0.0.1:0', transport: 'socket'
Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
2019.12.02 20:01:19 INFO org.jboss.weld.Version Thread[main,5,main]: WELD-000900: 3.1.1 (Final)
2019.12.02 20:01:20 INFO org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-ENV-000020: Using jandex for bean discovery
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jboss.weld.util.bytecode.ClassFileUtils$1 (file:/C:/Users/Brenno%20Fagundes/.m2/repository/org/jboss/weld/weld-core-impl/3.1.1.Final/weld-core-impl-3.1.1.Final.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int)
WARNING: Please consider reporting this to the maintainers of org.jboss.weld.util.bytecode.ClassFileUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2019.12.02 20:01:21 INFO org.jboss.weld.Event Thread[main,5,main]: WELD-000411: Observer method [BackedAnnotatedMethod] public org.glassfish.jersey.ext.cdi1x.internal.ProcessAllAnnotatedTypes.processAnnotatedType(#Observes ProcessAnnotatedType<?>, BeanManager) receives events for all annotated types. Consider restricting events using #WithAnnotations or a generic type with bounds.
2019.12.02 20:01:21 INFO org.jboss.weld.Event Thread[main,5,main]: WELD-000411: Observer method [BackedAnnotatedMethod] private io.helidon.microprofile.openapi.IndexBuilder.processAnnotatedType(#Observes ProcessAnnotatedType<X>) receives events for all annotated types. Consider restricting events using #WithAnnotations or a generic type with bounds.
2019.12.02 20:01:22 INFO org.jboss.weld.Bootstrap Thread[main,5,main]: WELD-ENV-002003: Weld SE container 404f642b-892f-4676-960e-8df848aee3a3 initialized
2019.12.02 20:01:22 INFO io.helidon.microprofile.security.SecurityMpService Thread[main,5,main]: Security extension for microprofile is enabled, yet security configuration is missing from config (requires providers configuration at key security.providers). Security will not have any valid provider.
2019.12.02 20:01:22 INFO io.smallrye.openapi.api.OpenApiDocument Thread[main,5,main]: OpenAPI document initialized: io.smallrye.openapi.api.models.OpenAPIImpl#7793ad58
2019.12.02 20:01:23 INFO io.helidon.webserver.NettyWebServer Thread[main,5,main]: Version: 1.4.0
2019.12.02 20:01:24 INFO io.helidon.webserver.NettyWebServer Thread[nioEventLoopGroup-2-1,10,main]: Channel '#default' started: [id: 0x4e1f119b, L:/0:0:0:0:0:0:0:0:7200]
2019.12.02 20:01:24 INFO io.helidon.microprofile.server.ServerImpl Thread[nioEventLoopGroup-2-1,10,main]: Server initialized on http://localhost:7200 (and all other host addresses) in 5254 milliseconds.
BUMP, also, the generation works using custom filters and models, a static definition in META-INF also works. Currently using JDK 13.
EDIT: this is my Application class after Tim Quinn's suggested modifications.
APPLICATION CLASS
#ApplicationScoped
#ApplicationPath("/")
#OpenAPIDefinition(
info = #Info(
title = "Newsletter Microservice",
version = "1.0", description = "Microservice in charge of handling newsletter",
license = #License(name = "Apache 2.0", url = "https://www.apache.org/licenses/LICENSE-2.0"),
contact = #Contact(name = "Email", url = "mailto:john.doe#gmail.com")
),
tags = {
#Tag(name = "public"), #Tag(name = "private")
}
)
public class NewsletterApplication extends Application {
#Override
public Set<Class<?>> getClasses(){
HashSet<Class<?>> classes = new HashSet<Class<?>>();
classes.add(NewsletterClientResource.class);
return classes;
}
}
GENERATED FILE
---
openapi: 3.0.1
info:
title: Generated API
version: "1.0"
paths: {}

Brenno,
You didn't show your updated source code, but I'm assuming you added the #OpenAPIDefinition annotation to the quickstart GreetResource class, is that right?
That annotation's attributes describe the whole application, not a subset of its resources, so try moving the annotation to the GreetApplication class instead:
#ApplicationScoped
#ApplicationPath("/")
#OpenAPIDefinition(info = #Info(title = "QuickStart API", version = "1.1"))
public class GreetApplication extends Application {...}
That should work. I just tried this on the generated Helidon MP quickstart example source, rebuilt, and the server returned the expected results.
Here is the diff for the change I made:
diff --git a/examples/quickstarts/helidon-quickstart-mp/src/main/java/io/helidon/examples/quickstart/mp/GreetApplication.java b/examples/quickstarts/helidon-quickstart-mp/src/main/java/io/helidon/examples/quickstart/mp/GreetApplication.java
index fd140738..cca60da2 100644
--- a/examples/quickstarts/helidon-quickstart-mp/src/main/java/io/helidon/examples/quickstart/mp/GreetApplication.java
+++ b/examples/quickstarts/helidon-quickstart-mp/src/main/java/io/helidon/examples/quickstart/mp/GreetApplication.java
## -23,12 +23,15 ## import javax.ws.rs.ApplicationPath;
import javax.ws.rs.core.Application;
import io.helidon.common.CollectionsHelper;
+import org.eclipse.microprofile.openapi.annotations.OpenAPIDefinition;
+import org.eclipse.microprofile.openapi.annotations.info.Info;
/**
* Simple Application that produces a greeting message.
*/
#ApplicationScoped
#ApplicationPath("/")
+#OpenAPIDefinition(info = #Info(title = "QuickStart API", version = "1.1"))
public class GreetApplication extends Application {
#Override
And here is the beginning of the updated OpenAPI document returned from the server:
---
openapi: 3.0.1
info:
title: QuickStart API
version: "1.1"
paths:
The title and version have changed, as expected.

Case 1 : You are using jandex and your /openapi is not getting updated.
If you are using jandex, there is a high chance that your jandex.idx is not getting updated. You can do this by running mvn process-classes
Case 2 : You are not using jandex and when you hit /openapi you get somewhat blank response.
This seems to be an issue with Helidon. The dependencies helidon-integrations-cdi-jpa, helidon-integrations-cdi-jta, helidon-integrations-cdi-eclipselink etc... contains jandex.idx and Helidon now thinks that jandex is enabled and it
will read only from those jandex files, skipping your resources. So for the time-being, you can include jandex plugin to solve the issue.

Related

Disable introspection query in graphql java tools spring boot

I am facing issues while disabling the introspection query in a spring boot graphql project on a get endpoint query parameter.
I was replicating this by using one of the GET endpoint and using the below parameter
baseurl/servicename/insight_graph?query=fragment+FullType+on+__Type+{++kind++name++description++fields(includeDeprecated%3a+true)+{++++name++++description++++args+{++++++...InputValue++++}++++type+{++++++...TypeRef++++}++++isDeprecated++++deprecationReason++}++inputFields+{++++...InputValue++}++interfaces+{++++...TypeRef++}++enumValues(includeDeprecated%3a+true)+{++++name++++description++++isDeprecated++++deprecationReason++}++possibleTypes+{++++...TypeRef++}}fragment+InputValue+on+__InputValue+{++name++description++type+{++++...TypeRef++}++defaultValue}fragment+TypeRef+on+__Type+{++kind++name++ofType+{++++kind++++name++++ofType+{++++++kind++++++name++++++ofType+{++++++++kind++++++++name++++++++ofType+{++++++++++kind++++++++++name++++++++++ofType+{++++++++++++kind++++++++++++name++++++++++++ofType+{++++++++++++++kind++++++++++++++name++++++++++++++ofType+{++++++++++++++++kind++++++++++++++++name++++++++++++++}++++++++++++}++++++++++}++++++++}++++++}++++}++}}query+IntrospectionQuery+{++__schema+{++++queryType+{++++++name++++}++++mutationType+{++++++name++++}++++types+{++++++...FullType++++}++++directives+{++++++name++++++description++++++locations++++++args+{++++++++...InputValue++++++}++++}++}}
and with the below dependencies
<dependency>
<groupId>com.graphql-java-kickstart</groupId>
<artifactId>graphql-spring-boot-starter</artifactId>
<version>5.4.1</version>
</dependency>
<dependency>
<groupId>com.graphql-java-kickstart</groupId>
<artifactId>graphql-java-tools</artifactId>
<version>5.4.1</version>
<exclusions>
<exclusion>
<artifactId>jackson-module-kotlin</artifactId>
<groupId>com.fasterxml.jackson.module</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.graphql-java-kickstart</groupId>
<artifactId>graphiql-spring-boot-starter</artifactId>
<version>5.4.1</version>
</dependency>
This works pretty well when we request the same using post and with the below request body and using graphql.tools.introspection-enabled=false and
POST baseurl/servicename/insight_graph
[
{
"operationName": "IntrospectionQuery",
"variables": {},
"query": "query IntrospectionQuery {__schema {queryType { name },mutationType { name },subscriptionType { name },types {...FullType},directives {name,description,args {...InputValue},onOperation,onFragment,onField}}}\nfragment FullType on __Type {kind,name,description,fields(includeDeprecated: true) {name,description,args {...InputValue},type {...TypeRef},isDeprecated,deprecationReason},inputFields {...InputValue},interfaces {...TypeRef},enumValues(includeDeprecated: true) {name,description,isDeprecated,deprecationReason},possibleTypes {...TypeRef}}\nfragment InputValue on __InputValue {name,description,type { ...TypeRef },defaultValue}\nfragment TypeRef on __Type {kind,name,ofType {kind,name,ofType {kind,name,ofType {kind,name}}}}"
}
]
I also tried this via spring filters and it works fine
Is there any way to disable introspection via spring boot property for this?

Camel with servlet not starting in quarkus

I am trying to start my application with Apache camel and Quarkus but it giving me below error:
At least one bean matched the required type and qualifiers but was marked as unused and removed during build
Removed beans:
- CLASS bean org.apache.camel.component.servlet.CamelHttpTransportServlet [types=[class javax.servlet.http.HttpServlet, interface java.io.Serializable, class org.apache.camel.http.common.CamelServlet, interface javax.servlet.ServletConfig, interface org.apache.camel.http.common.HttpRegistryProvider, class org.apache.camel.component.servlet.CamelHttpTransportServlet, class javax.servlet.GenericServlet, interface javax.servlet.Servlet], qualifiers=[#javax.enterprise.inject.Default(),
#javax.enterprise.inject.Any()]]
Required type: class org.apache.camel.component.servlet.CamelHttpTransportServlet
Required qualifiers: [#javax.enterprise.inject.Default()]
Solutions:
- Application developers can eliminate false positives via the #Unremovable annotation
- Extensions can eliminate false positives via build items, e.g. using the UnremovableBeanBuildItem
I am not sure what am I missing:
application.properties
camel.context.name=aiv
quarkus.camel.servlet.url-patterns = /rest/*
pom.xml
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-main</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-platform-http</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-log</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-timer</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-servlet</artifactId>
</dependency>
public class CamelRoute extends RouteBuilder {
#Override
public void configure() {
restConfiguration()
.component("servlet");
...
}
}
Please let me know what wrong am I doing?
Unless you genuinely need Servlet support for some reason, then you can rely on camel-quarkus-platform-http to handle the HTTP transport for the Camel REST DSL.
You're dependencies can be simplified to:
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-main</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-log</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-timer</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-rest</artifactId>
</dependency>
There's more information in the Camel Quarkus documentation:
https://camel.apache.org/camel-quarkus/latest/reference/extensions/platform-http.html

Adding a Log4j logging to a Vaadin 8 application

I've tried to follow a documentation here Piping to Log4j using SLF4J, but still can't get a correct adapter used. So, how could one use aLog4j in Vaadin 8 application? What are the dependencies to be added to pom.xml?
There are multiple additions/changes required to get logging working.
Along the dependencies mentioned in the documentation to be added:
SLF4J
jul-to-slf4j
slf4j-log4j12-x.x.x.j
A log4j-core should be added as well. The relevant snippet of pom.xml looks like this:
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.29</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>1.7.29</version>
</dependency>
The next step is to add a log4j.properties file (in my case under src/main/resources/log4j.properties). Here you can configure your logging properties
As mentioned in the documentation, a SLF4JBridgeHandler should be added to a Servlet definition (in case, there is only one servlet)
#WebServlet(urlPatterns = "/*", name = "MyUIServlet", asyncSupported = true)
#VaadinServletConfiguration(ui = MyUI.class, productionMode = false)
public static class MyUIServlet extends VaadinServlet {
static {
SLF4JBridgeHandler.install();
}
}
Imports used for Logger and LoggerFactory are:
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.slf4j.bridge.SLF4JBridgeHandler;
To verify a correct implementation is picked for a logger its simple name is printed System.out.println("Adapter name:" + logger.getClass().getSimpleName());. Output should be : Log4jLoggerAdapter
Note: I've used a log4-core less than 2.9 since I am using Java 8 and jetty Error scanning entry .... You should upgrade to a newer version if your jre is > 8

How to use and configure logback in Adobe CQ5 projects?

I newbie in CQ5. I started my first project in CQ and I want to write any exceptions and debug info of project's components, services and servlets (in bundles) to log files in crx-repo (...\crx-quickstart\logs).
I want to use slf4j with logback implementation in my project.
I tried below steps:
Add dependencies in project's pom.xml
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.3</version>
</dependency>
Add logback.xml with configuration (loggers and appenders) to
project's bundle resource package.
Try to instantiate new logger in service (for example):
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
.....
#Component(metatype = true, label = "Some", description = "Sone service" ,
immediate = true)
#Service(SomeService.class)
public class SomeService {
private final Logger logger = LoggerFactory.getLogger(MyDao.class);
.....
logger.debug("debug");
logger.info("info");
logger.error("error");
......
}
These steps (It isn't work, of course) I gave an example because i don't know how really work with logback in Adobe CQ5. Any suggestions? I would be grateful for any help!
CQ does log to crx-quickstart/logs/error.log with its default configuration, and the underlying Apache Sling framework provides the necessary bridge so you just need to acquire an slf4j Logger and write to that.
The Java code of your SomeService example looks correct to me but in the pom you only need the slf4j-api dependency, with scope provided, as API and implementation packages are provided by the CQ runtime.
You can also have a look at a Sling sample like Slingbucks which will log to that error.log if installed on a default CQ instance.

ShrinkWrap UnknownExtensionTypeException during WebArchive creation

I want to create a full WebArchive for running Arquillian Tests using the new ShrinkWrap Feature MavenImporter (https://github.com/shrinkwrap/resolver).
The Scenario:
Arquillian should be integrated/extended with SoapUi to test a Spring application. There are n Endpoints exposed by the Spring application and implemented with cxf.
The test method looks like this:
/*
* Source folder for SoapUi project files
*/
#Value("${soapui.workspace}")
private String soapUiWorkspace;
/*
* Output directory for test reports
*/
#Value("${soapUi.reports.dir}")
private String reportsOutpuDirectory;
/*
* Comma separated list of SoapUi projects to be tested
*/
#Value("${soapUi.projects}")
private String[] projects;
/*
* URL resource provided by Arquillian runtime
*/
#ArquillianResource
private URL serverUrl;
#Test
public void testServiceEndpoints() throws Exception {
final SoapUITestCaseRunner runner = new SoapUITestCaseRunner();
for (String project : projects) {
runner.setProjectFile(String.format("%s%s%s", soapUiWorkspace, "/", project));
runner.setHost(String.format("%s:%s", serverUrl.getHost(), serverUrl.getPort()));
runner.setOutputFolder(reportsOutpuDirectory);
LOG.info("SoapUi-Call for " + runner.getHost());
runner.setJUnitReport(true);
runner.setPrintReport(true);
runner.run();
}
}
My #Deployment-Method looks like this:
#Deployment
public static Archive<?> createDeployment() {
return ShrinkWrap.create(MavenImporter.class).loadPomFromFile("pom.xml").importBuildOutput().as(WebArchive.class);
}
I'm getting right now this Exception:
java.lang.RuntimeException: Could not invoke deployment method: public static org.jboss.shrinkwrap.api.Archive com.bosch.mome.ws.facade.common.soapui.MarketTransparencyServiceEndpointsSoapUiTest.createDeployment()
at org.jboss.shrinkwrap.api.UnknownExtensionTypeException.newInstance(UnknownExtensionTypeException.java:68)
at org.jboss.shrinkwrap.api.UnknownExtensionTypeExceptionDelegator.newExceptionInstance(UnknownExtensionTypeExceptionDelegator.java:37)
at org.jboss.shrinkwrap.impl.base.ServiceExtensionLoader.findExtensionImpl(ServiceExtensionLoader.java:279)
at org.jboss.shrinkwrap.impl.base.ServiceExtensionLoader.loadExtensionMapping(ServiceExtensionLoader.java:246)
at org.jboss.shrinkwrap.impl.base.ServiceExtensionLoader.createFromLoadExtension(ServiceExtensionLoader.java:212)
at org.jboss.shrinkwrap.impl.base.ServiceExtensionLoader.load(ServiceExtensionLoader.java:108)
at org.jboss.shrinkwrap.impl.base.ArchiveBase.as(ArchiveBase.java:662)
at org.jboss.shrinkwrap.api.ArchiveFactory.create(ArchiveFactory.java:150)
at org.jboss.shrinkwrap.api.ShrinkWrap.create(ShrinkWrap.java:163)
at com.bosch.mome.ws.facade.common.soapui.MarketTransparencyServiceEndpointsSoapUiTest.createDeployment(MarketTransparencyServiceEndpointsSoapUiTest.java:82)
Jan 19, 2015 6:29:46 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-127.0.0.1-8888
I'm not adding the Assets separately because I'm integrating currently the junit SoapUi library and Arquillian for testing Endpoints and need to load the full Application/WebArchive.
I was looking to the ShrinkWrap javadoc but could not find a working solution/fix.
In the javadoc I read the following:
UnknownExtensionTypeException: Indicates that a default name cannot be generated for a given type because no extension mapping has been configured via ExtensionLoader.getExtensionFromExtensionMapping(Class)
But I don't know where I can exactly configure the Extension mapping. There is no tutorial or samples. Or may be I could not find them.
Does anybody have Experience with this new ShrinkWrap Feature?
I know it has been some time but maybe somebody finds it helpfull anyways.
I had the same problem and the cause was that i was to greedy in my pom.xml. I had the following dependencies:
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-api-maven</artifactId>
<version>${version.shrinkwrap.resolvers}</version>
<scope>test</scope>
</dependency>
Turns out the error just disappears if you use the BOM and the depchain somewhat like this:
<dependencyManagement>
<dependencies>
...
<!-- Override dependency resolver with latest version.
This must go *BEFORE* the Arquillian BOM. -->
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-bom</artifactId>
<version>${version.shrinkwrap.resolvers}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.jboss.arquillian</groupId>
<artifactId>arquillian-bom</artifactId>
<version>1.1.11.Final</version>
<scope>import</scope>
<type>pom</type>
</dependency>
...
</dependencies>
</dependencyManagement>
<dependencies>
...
<dependency>
<groupId>org.jboss.shrinkwrap.resolver</groupId>
<artifactId>shrinkwrap-resolver-depchain</artifactId>
<version>${version.shrinkwrap.resolvers}</version>
<scope>test</scope>
<type>pom</type>
</dependency>
...
<!-- your container goes here, too (for me it was arquillian-tomee-embedded) -->
</dependencies>
Also check out the documentation: https://github.com/shrinkwrap/resolver/blob/master/README.asciidoc

Categories

Resources