java - Configure Wildfly Naming subsytem on deploy with Maven plugin wildfly-maven-plugin -


i add resource naming subsystem can pull ejb through @resource annotation. ideally resource must added @ build time specific environment, (once working, set variables in maven set in settings.xml). using wildfly-maven-plugin, cannot find place add jndi references string resources anywhere. fails when run mvn wildfly:deploy with:

[error] failed execute goal org.wildfly.plugins:wildfly-maven-plugin:1.1.0.alpha5:add-resource (add_jndi) on project project: not execute goal add-resource. reason: operation failed: "jbas014807: management resource '[ [error] (\"subsystem\" => \"naming\"), [error] (\"binding\" => \"java:global/project/key\") [error] ]' not found" [error] -> [help 1] 

my pom.xml looks follows:

... <plugin>     <groupid>org.wildfly.plugins</groupid>     <artifactid>wildfly-maven-plugin</artifactid>     <version>${wildfly-maven-plugin.version}</version>     <inherited>false</inherited>     <configuration>         <skip>false</skip>     </configuration>     <executions>         <execution>             <id>add_jndi</id>             <phase>package</phase>             <goals>                 <goal>add-resource</goal>             </goals>             <configuration>                 <address>subsystem=naming,binding=java:global/project/key,binding-type=simple</address>                 <resources>                     <resource>                         <properties>                             <name>key</name>                             <type>java.lang.string</type>                             <value>value</value>                         </properties>                     </resource>                 </resources>             </configuration>         </execution>     </executions> </plugin> ... 

this possible , documented work cli wildfly

i using wildfly 8.2, java jdk 8 , maven 3.

a execute commands can configured run cli command. executecommands tag can configured inside plugin configuration. please visit this link example.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -