Skip to content
This repository was archived by the owner on Nov 18, 2021. It is now read-only.

Support for executing commands on the server #9

Closed
aldonogueira opened this issue Oct 31, 2018 · 4 comments
Closed

Support for executing commands on the server #9

aldonogueira opened this issue Oct 31, 2018 · 4 comments
Assignees

Comments

@aldonogueira
Copy link

This is the last thing I need from DeployWildflyTask to remove the maven files from my build.

I have this fragment on my pom.xml

<build>
	<plugins>
		<plugin>
			<groupId>org.wildfly.plugins</groupId>
			<artifactId>wildfly-maven-plugin</artifactId>
			<version>${wildfly.maven.plugin.version}</version>
			<configuration>
				<username>${user}</username>
				<password>${password}</password>
				<scripts>
					<script>config.cli</script>
				</scripts>
			</configuration>
		</plugin>
	</plugins>
</build>

And the config.cli file has something like this

/subsystem=naming/binding=java\:global\/server.jndi.host:add(binding-type=simple, type=java.lang.String, value="10.0.16.3")
/subsystem=naming/binding=java\:global\/server.jndi.port:add(binding-type=simple, type=java.lang.String, value="9201")

This is the goal used in my build:
https://docs.jboss.org/wildfly/plugins/maven/latest/execute-commands-mojo.html

@Ingwersaft Ingwersaft self-assigned this Nov 1, 2018
@Ingwersaft
Copy link
Owner

Hi,

I implemented a simple execute cli command task, part of the latest 0.2.8 version:

import com.mkring.wildlydeplyplugin.ExecuteWildflyTask
[...]
task("wildflyExecute", ExecuteWildflyTask::class) {
    host = "127.0.0.1"
    port = 9990
    user = "testuser"
    password = "123"
    commands = listOf("deployment-info", "deployment-info")
}

Does it work for you?

@aldonogueira
Copy link
Author

aldonogueira commented Nov 8, 2018

It works nicely, sir (or lady). I have just deleted all remaining maven files \o/
Thank you

@aldonogueira
Copy link
Author

Notice though that the correct groovy example should be

import com.mkring.wildlydeplyplugin.ExecuteWildflyTask

task executeCommands(type: ExecuteWildflyTask) {
    host = "127.0.0.1"
    port = 9990
    user = "testuser"
    password = "123"
    commands = ["deployment-info", "deployment-info"]
}

@Ingwersaft
Copy link
Owner

Thanks for the groovy example hint, I didn't test it before putting it into the readme... :)
You're welcome 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants