Giter Club home page Giter Club logo

wildfly-deploy-gradle-plugin's Introduction

Metrics

wildfly-deploy-gradle-plugin's People

Contributors

amadeubarbosa avatar exav avatar ingwersaft avatar jnohlgard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

wildfly-deploy-gradle-plugin's Issues

find a better approach for compatibility instead of using branches

Currently, the only differences between all compatibility branches is the used jboss/wildfly cli client jar dependency. The jboss7 branch was needed for some time and now after #12, another branch is needed.

Goal of this story is to either find a way to change the dependency when using the plugin, or automate the release and publish process for master and all compatibility branches.

Could a timeout parameter for connection be added?

I am encountering problems when I am trying to use this plugin to connect to a Docker with Wildfly 11, but it is not necessarily a bug in this plugin.

When I'm trying to run:
./bin/jboss-cli.bat -c --controller=localhost:9990 -u=admin -p=admin --timeout=5000

It returns the following error message:
Failed to connect to the controller: The controller is not available at localhost:9990: java.net.ConnectException: WFLYPRT0023: Could not connect to remote + http://localhost:9990. The connection was in range: WFLYPRT0023: Could not connect to remote + http://localhost:9990. The connection has timed out

However, when running with a longer timeout, I can connect without problems:
./bin/jboss-cli.bat -c --controller=localhost:9990 -u=admin -p=admin --timeout=20000

There is something strange between my Docker and jboss-cli.bat, which also happens with this plugin when I try to gradle deploy task, however in this plugin it is not possible to specify any timeout at all, and maybe 5 seconds is a bit low?

As this parameter already exists in jboss-cli.bat, would it be possible to add a timeout parameter to this plugin?

I'm using version 0.2.12 and below is part of my project build.gradle, with an intended timeout.

task deploy(type: DeployWildflyTask) {
    host = 'localhost'
    port = 9990
    user = "admin"
    password = "admin"
    timeout = 30000
    deploymentName = "${project.name}-${project.version}"
    runtimeName = "${project.name}-${project.version}.ear"
    file = "$buildDir/libs/${project.name}-${project.version}.ear"
    dependsOn build
}
task executeCommands(type: ExecuteWildflyTask) {
    host = "localhost"
    port = 9990
    user = "admin"
    timeout = 30000
    password = "admin"
    commands = file('docker/config.cli').readLines().findAll{ !it.isEmpty() }.collect()
}

Could not set unknown property 'domainServerGroup'

Hi,
Trying to deploy to a domain server group,
getting the following error:
Could not set unknown property 'domainServerGroup' for task ':deployDomain' of type com.mkring.wildlydeplyplugin.DeployWildflyTask.

is a server group deployment supported like it is described in a readme?

gradle 7.2 compatibility

Hi, I have an error with 7.2 gradle:

A problem was found with the configuration of task ':deployBevis' (type 'DeployWildflyTask').

  • In plugin 'com.mkring.wildlydeplyplugin.deploy-wildfly-plugin' type 'com.mkring.wildlydeplyplugin.DeployWildflyTask' property 'log' is missing an input or output annotation.

    Reason: A property without annotation isn't considered during up-to-date checking.

Possible solutions:
  1. Add an input or output annotation.
    2. Mark it as @internal.
Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem.

Disable other deployments with same context root

If there is a war with a diffrent name but the same context root enabled on the wildfly than the one you want to enable, wildfly will fail repeateadly and this will cause the plugin to wait a very long time since it is able to reconnect every time it tries,

Suggestion

Add a flag to disable any deployments with the same context-root and if this flag is false do not try to enable the deployment and just deploy it

NullPointer while trying to execute a batch command

The config.cli file here has a batch command in it. It's something similar to this:

batch
/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")
run-batch

...and the build.gradle has this:

task executeCommands(type: ExecuteWildflyTask) {
    host = deploy.host
    port = deploy.port
    user = deploy.user
    password = deploy.password
    commands = file('config.cli').readLines().findAll{ !it.isEmpty() }.collect()
}

When this task is executed, it gives this error:

...
going to execute `batch`
result: true
ExecuteWildflyTask task failed: null
java.lang.NullPointerException
        at com.mkring.wildlydeplyplugin.CliExecutioner.execute(CliExecutioner.kt:24)
        at com.mkring.wildlydeplyplugin.ExecuteWildflyTask.executeWildfly(ExecuteWildflyTask.kt:37)
...

It seems the response is empty and then returns null somewhere. It kind of make sense, because this command batch only instructs the server to receive more commands.

Support for executing commands on the server

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

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.