You may have found that out yourself, since you withdrawn your post, I’ll provide an answer just in case you still need help. I’m answering to your question at https://developer.jboss.org/message/985312#985312.
The Gradle provisioning plugin does not expect a feature pack as an input. It expect a server provisioning configuration, which itself lists one or several feature packs (plus some more advanced configuration if necessary, but you probably don’t need that). That’s what this section of the documentation is about.
As I said before, I’m not very familiar with Gradle, so I just followed the instructions in the Gradle plugin’s documentation and Hibernate Search’s documentation. Here are two files that make things work:
build.gradle:
plugins {
id "org.wildfly.build.provision" version '0.0.9'
}
repositories {
mavenLocal()
mavenCentral()
maven {
name 'jboss-nexus'
url "http://repository.jboss.org/nexus/content/groups/public/"
}
}
provision {
//Optional destination directory:
destinationDir = file("wildfly-custom")
configuration = file( 'wildfly-server-provisioning.xml' )
//Define variables which need replacing in the provisioning configuration!
variables['wildfly.version'] = '14.0.0.Final'
variables['hibernate-search.version'] = '5.10.4.Final'
}
server-provisioning.xml:
<server-provisioning xmlns="urn:wildfly:server-provisioning:1.1">
<feature-packs>
<feature-pack
groupId="org.wildfly"
artifactId="wildfly-feature-pack"
version="${wildfly.version}" />
<feature-pack
groupId="org.hibernate"
artifactId="hibernate-search-jbossmodules-orm"
version="${hibernate-search.version}" />
</feature-packs>
</server-provisioning>
Running “gradle provision” with this configuration created a Wildfly instance in the “wildfly-custom” folder.
That being said, if I understood correctly, you were trying to upgrade Hibernate OGM to begin with. I suppose, since you are trying to use Hibernate Search 5.10.4 and not 5.9, that you wanted to use Hibernate OGM 5.4 (which, friendly reminder, is still in Beta).
If so, I’d advise you to try Hibernate Search 5.10.2.Final first (since it’s the version targeted by ORM 5.4.0.Beta2).
Then the build.gradle becomes this (just change the Hibernate Search version and add one variable for the OGM version):
plugins {
id "org.wildfly.build.provision" version '0.0.9'
}
repositories {
mavenLocal()
mavenCentral()
maven {
name 'jboss-nexus'
url "http://repository.jboss.org/nexus/content/groups/public/"
}
}
provision {
//Optional destination directory:
destinationDir = file("wildfly-custom")
configuration = file( 'wildfly-server-provisioning.xml' )
//Define variables which need replacing in the provisioning configuration!
variables['wildfly.version'] = '14.0.1.Final'
variables['hibernate-search.version'] = '5.10.2.Final'
variables['hibernate-ogm.version'] = '5.4.0.Beta2'
}
… And the server-provisioning.xml becomes this:
<server-provisioning xmlns="urn:wildfly:server-provisioning:1.1">
<feature-packs>
<feature-pack
groupId="org.wildfly"
artifactId="wildfly-feature-pack"
version="${wildfly.version}" />
<feature-pack
groupId="org.hibernate"
artifactId="hibernate-search-jbossmodules-orm"
version="${hibernate-search.version}" />
<feature-pack
groupId="org.hibernate.ogm"
artifactId="hibernate-ogm-featurepack-mongodb"
version="${hibernate-ogm.version}" />
</feature-packs>
</server-provisioning>
Note that if you need the JARs to be copied to your Wildfly directory (e.g. to copy it in a production environment), you can add the “copy-module-artifacts” attribute to the server provisioning file:
<server-provisioning xmlns="urn:wildfly:server-provisioning:1.1" copy-module-artifacts="true">
<feature-packs>
...
Finally, if you really want Search 5.10.4.Final, you can try to change the version in your build.gradle, and then use this trick to force WildFly to use the version you chose.
If it doesn’t work, there may be some subtelty when using OGM, and then I’m afraid you’ll need someone else, as I’m not overly familiar with the override mechanism in the wildfly-provisioning-plugin, nor with how OGM integrates with Search. @Sanne may help you when he comes back, otherwise you can try the Wildfly community (again).