Coder Social home page Coder Social logo

jboss-as-maven-plugin's People

Contributors

adrianboimvaser avatar arkhipov avatar aslakknutsen avatar ceilfors avatar darranl avatar dstraub avatar eis avatar hwilming avatar jamezp avatar jmcabrera avatar johanbjork avatar mattdrees avatar mmeldrum avatar mp911de avatar pmuir avatar rosiecki avatar rpelisse avatar smoyer64 avatar spolti avatar stuartwdouglas avatar tremes avatar zetten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jboss-as-maven-plugin's Issues

After :deploy goal, the application hasn't been started - documentation of the <name> opt.

The 'application' has not been started after I've deployed the application with
<name>application</name>
But when I changed the name to <name>application.war</name> , the application has been started.

I read the documentation and I found nothing about this naming requirements: https://docs.jboss.org/jbossas/7/plugins/maven/latest/deploy-mojo.html#name

Solution on the StackOverflow: http://stackoverflow.com/a/21009986/2231652

Support for Gradle (and other) build tools

Maven remains popular, but there are many projects using Gradle, and many arguments for using it (see Dr. Dobb's Why Build Your Java Projects with Gradle Rather than Ant or Maven? or Gradle's features). This is especially true for devops tasks like creating JBoss deployment or configuration scripts, because Gradle is a more flexible scripting language, while Maven assumes a very specific lifecycle (building a java application).

It would be good if JBoss published official plugins for at least Maven & Gradle, and popular tools like SBT. The ZeroTurnaround Java Tools and Technologies Survey can give you an idea which tools are popular.

The plugins are similar enough that they can share a "core" that does most of the work so maintaining several types of plugins is not too difficult. You can see an example of this on the flyway project, where there is a flyway-core, flyway-ant, flyway-maven, flyway-gradle, and flyway-sbt. So you could create a new project for gradle, but it would probably make sense to extract a "jboss-plugins-core" from this project, or to rename this project to "jboss-plugins" and have it build several.

Support --runtime-name for deployment on server groups

The JBoss CLI provides a parameter called --runtime-name, which lets you set an additional runtime name for an deployment (complementing the already supported --name parameter).

It would be nice if the JBoss Maven plugin could add another configuration parameter for this.

Can't specify remote serverConfig for run.

Version 7.3.Final
Client: Windows
Remote Server: nix (On a Oracle VB and host bridging specified.)

Deployment goal succeeds when configuration, hostname, port, context, username and password specified.

However switching to Run goal does not. ( We need to do a restart of the app server to clear the cache)

Specifying serverConfig is a relative path from %JBOSS_HOME%\standalone\configuration which is a downloaded instance if jBossHome is not specified in configuration.

Cannot specify jBossHome when specifying remote jboss_home directory as get error "\opt\jboss-eap-6.0" is not a valid directory. Obviously this directory doesn't exist locally as the client is Windows and the directory delimters are different.

One option would be to copy the remote standalone.xml locally, but that seems an unreasonable position. The relation between local jboss and project will differ between developers and commiting jboss and server config from target directory to svn is a no, no.

Jboss-as-maven-plugin 7.3.final undeploy creates ear file twice

Jboss-as-maven-plugin 7.3.final undeploy goal invokes the execution of the maven life cycle phase "package" prior to executing itself, which in turn execute maven-ear-plugin.

Even after explicitly mentioning the specific phase clean in the execution section of jboss-as-maven-plugin, it is invoking package phase. This is executing twice the creation of ear file.

Allow jboss-as:redeploy not to fail when there's no deployment of that name

In most scenarios, the user doesn't care if the app is or is not there. He just wants to have an app deployed.

Having to keep in mind whether to use :deploy or :redeploy is quite unpleasant.

Adding a parameter "force" to :redeploy would help.

:deploy already has "force" but AFAIK that doesn't overdeploy the app, just doesn't fail and keeps the old one. Or at least that's how it sounds from the docs:

"If force mode is disabled, the deploy goal will cause a build failure if the application being deployed already exists."
http://docs.jboss.org/jbossas/7/plugins/maven/latest/deploy-mojo.html

add-resource in 7.4.Final

Following tags are NOT being added...

<configuration>
<address>subsystem=datasources,data-source=java:jboss/datasources/AFH</address>
<resource>
<properties>
<prefill>true</prefill>
<new-connection-sql>select * from dual</new-connection-sql>
<prepared-statement-cache-size>100</prepared-statement-cache-size>
<valid-connection-checker>org.jboss.jca.adapters.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker>
<stale-connection-checker>org.jboss.jca.adapters.jdbc.vendor.OracleValidConnectionChecker</stale-connection-checker>
<exception-sorter>org.jboss.jca.adapters.jdbc.vendor.OracleExceptionSorter</exception-sorter>
<check-valid-connection-sql>select * from dual</check-valid-connection-sql>
</properties>
</resource>
</configuration>

Wait for redeploy to finish before ending "shutdown" goal

Hi,

I am using jboss-maven-as-plugin in order to redploy my application before integration tests.
Since I often face the infamous PermGenSpace issue after a few redployments I need to restart the server before doing my deployment.

Sadly the "shutdown" goal won't wait for the server to actually restart.

Would it be possible to add an option in order for this goal not to return until the server is properly restarted ?

for more details, please see :
http://stackoverflow.com/questions/20956520/how-to-restart-jboss-with-maven-as-plugin-before-redeploy

Hide server password

In debug mode, the plug-in prints out the username and password used to deploy to the server as follows:

[DEBUG] Configuring mojo 'org.jboss.as.plugins:jboss-as-maven-plugin:7.1.1.Final:deploy' with basic configurator -->
DEBUG filename = fps.ear
DEBUG force = true
DEBUG hostname = stack-dev.aittest.psu.edu
DEBUG packaging = ear
DEBUG password = <***** redacted *****>
DEBUG port = 9999
DEBUG project = MavenProject: edu.psu.fps:fps-ear:0.1.0-SNAPSHOT @ /Users/stevemoyer/Documents/Workspaces/FPS/fps/fps-ear/pom.xml
DEBUG skip = true
DEBUG targetDir = /Users/stevemoyer/Documents/Workspaces/FPS/fps/fps-ear/target
DEBUG username = aitci
[DEBUG] -- end configuration --

The plug-in should display asterisks for the password and indicate whether it was pulled from a element in the pom.xml file or from a section in the settings.xml file.

How to add jboss-ejb-client.properties?

Hi,

I post my question here because there isn't a forum. I could not find a way to add any property file to the server classpath. More concret - I would like to add jboss-ejb-client.properties with my own confguration (e.g. for remote.connection.default.host). Is it possible at all?

Thanks in advance.

Regards. Oleg.

Cannot use jboss-as:run with Jboss as 7.0.2.Final

plugin version : 7.4.Final, works fine with Jboss 7.1.1.Final.

I can start jboss 7.0.2 manually and deploy manually without problem.

But when trying to start and deploy from mvn by running:

mvn jboss-as:run

I got these exceptions on jboss 7.0.2.Final:

  [INFO] <<< jboss-as-maven-plugin:7.4.Final:run (default-cli) @ service <<<
  [INFO]
  [INFO] --- jboss-as-maven-plugin:7.4.Final:run (default-cli) @ service ---
  [INFO] JAVA_HOME=c:\Program Files\Java\jdk1.6.0_35\jre
  [INFO] JBOSS_HOME=D:\Downloads\jboss-as-web-7.0.2.Final

  [INFO] Server is starting up. Press CTRL + C to stop the server.
  Mar 14, 2013 6:48:30 PM org.xnio.Xnio <clinit>
  INFO: XNIO Version 3.0.7.GA
  Mar 14, 2013 6:48:30 PM org.xnio.nio.NioXnio <clinit>
  INFO: XNIO NIO Implementation Version 3.0.7.GA
  Mar 14, 2013 6:48:30 PM org.jboss.remoting3.EndpointImpl <clinit>
  INFO: JBoss Remoting version 3.2.12.GA
  Exception in thread "main" java.lang.ExceptionInInitializerError
          at org.jboss.as.server.Main.main(Main.java:85)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          at java.lang.reflect.Method.invoke(Method.java:597)
          at org.jboss.modules.Module.run(Module.java:272)
          at org.jboss.modules.Main.main(Main.java:313)
  Caused by: java.lang.IllegalStateException: The LogManager was not properly installed (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager")
          at org.jboss.logmanager.Logger.getLogger(Logger.java:60)
          at org.jboss.logmanager.log4j.BridgeRepositorySelector.<clinit>(BridgeRepositorySelector.java:42)
          ... 7 more

xa-resource in 7.4.Final doesn't work

xa-datasource creation fails when following configuration used, also no working example in plugin documentation available (https://docs.jboss.org/jbossas/7/plugins/maven/latest/)

<configuration>
<address>subsystem=datasources</address>
<resources>
<resource>
<address>xa-data-source=java:jboss/datasources/postgresDS</address>
<enable-resource>true</enable-resource>
<properties>
</properties>
<resources>
<resource>
<address>xa-datasource-properties=DatabaseName</address>
<properties>
<value>dbname</value>
</properties>
</resource>
<resource>
<address>xa-datasource-properties=ServerName</address>
<properties>
<value>localhost</value>
</properties>
</resource>
<resource>
<address>xa-datasource-properties=User</address>
<properties>
<value>user</value>
</properties>
</resource>
<resource>
<address>xa-datasource-properties=Password</address>
<properties>
<value>password</value>
</properties>
</resource>
</resources>
</resource>
</resources>
</configuration>

Impossible to remove a failed deployment

Hi,

When using the jboss-as-maven-plugin in either v7.1.1.Final or v7.3.Final, when a deployment has some issues (in my case a listener referenced in web.xml that doesn't exist in the classpath), it becomes impossible to remove this component from the admin console (I'm using the managed domain operating mode)
This component appears as enabled and is installed on my targeted server-group
The only way is to call the goal undeploy from this plugin.

Log when the deployment occurs (module is unregistered):

[Server:test-server-one-group1] 14:15:04,271 INFO [org.jboss.as.server](host-controller-connection-threads - 4) JBAS015870: Deploy of deployment "mywebapp.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.web.deployment.default-host./mywebapp" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./mywebapp: JBAS018040: Failed to start context"},"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.deployment.unit."mywebapp.war".jboss.security.jacc Missing[JBAS014861: ]"]}
[Server:test-server-one-group1] 14:15:04,273 INFO [org.jboss.as.osgi](MSC service thread 1-5) JBAS011908: Unregister module: Module "deployment.mywebapp.war:main" from Service Module Loader
[Server:test-server-one-group1] 14:15:04,302 INFO [org.jboss.as.server.deployment](MSC service thread 1-7) JBAS015877: Stopped deployment mywebapp.war in 32ms

Log when I try to undeploy the module from the admin console (module is said 'not found'):

Failed to remove mywebapp.war from main-server-group.

Unexpected HTTP response: 500

Request
{
"address" => [
("server-group" => "main-server-group"),
("deployment" => "mywebapp.war")
],
"operation" => "remove"
}

Response

Internal Server Error
{
"outcome" => "failed",
"result" => undefined,
"failure-description" => "JBAS010839: Operation failed or was rolled back on all servers.",
"rolled-back" => true,
"server-groups" => {"main-server-group" => {"host" => {"int03master" => {"test-server-one-group1" => {"response" => {
"outcome" => "failed",
"result" => undefined,
"failure-description" => "JBAS014807: Management resource '[("deployment" => "mywebapp.war")]' not found",
"response-headers" => {"process-state" => "restart-required"},
"rolled-back" => true
}}}}}}
}

Do you know what could be done to be able to remove it from the admin console ?
For me either the plugin should remove the component from the server-group or at least disable it

Can't make beforeDeployment work in jboss-as:run

Hi,

I'm trying to start a JBoss, configure it, deploy and application, and then hold the server up and running (something like jetty:run so developpers can quickly run an application). So for that I'm using mvn jboss-as:run with the 'beforeDeployment' element. It looks like this :

        <plugin>
            <!--To run the app with JBoss : jboss-as:run -->
            <groupId>org.jboss.as.plugins</groupId>
            <artifactId>jboss-as-maven-plugin</artifactId>
            <version>7.4.Final</version>
            <executions>
                <execution>
                    <id>run-app</id>
                    <goals>
                        <goal>run</goal>
                    </goals>
                    <configuration>
                        <jvm-args>-Xms512M -Xmx1303M -XX:MaxPermSize=256M -Duser.country=EN -Duser.language=en</jvm-args>
                        <beforeDeployment>
                            <execute-commands>
                            <commands>
                                <command>/subsystem=datasources/data-source=CelerioDS:add(connection-url="jdbc:h2:mem:CelerioDS", jndi-name=java:jboss/datasources/CelerioDS, driver-name=h2, user-name=sa, password=sa)</command>
                                <command>/subsystem=datasources/data-source=CelerioDS:enable</command>
                                <command>/subsystem=logging/logger=fr.bdf.celerio:add(level=DEBUG)</command>
                            </commands>
                            </execute-commands>
                        </beforeDeployment>
                    </configuration>
                </execution>
            </executions>
        </plugin>

This doesn't seem to work because the plugin starts JBoss, deploys the application and then complains that the DataSource is not available. I could find any example nor test case for this (https://github.com/jbossas/jboss-as-maven-plugin/tree/master/src/test/resources/unit/common).

And what I really would like is to execute a script before deployment. Looking at the code, this looks possible (https://github.com/jbossas/jboss-as-maven-plugin/blob/master/src/main/java/org/jboss/as/plugin/cli/Commands.java#L118) but again, I could make it work.

        <scripts>
            <script>src/main/config/jbossConfigSetup.cli</script>
        </scripts>

Allow specifying the name of the deployment file (would be renamed)

Sometimes, eg. in test scenarios, the file to be uploaded ends up with some ugly name like foo-company-awesome-project-test-war-7.12.3213_2013-12-24.war. The derived context is then quite ugly. How about sparing the users creating an extra garbage in pom or project to set the context?

Adding a parameter like "deployAsFileName" which would simply rename (copy) the file before deploying would help.

WDYT?

jboss-as:run intermittently hangs with 100% CPU

The run goal should return when the server has started but intermittently hangs with 100% CPU. I believe the cause to be flawed logic in the loop that checks for server startup.

In Run.java:200 (7.2-FINAL), what is currently:

while (server.isRunning()) {
}

i.e. if the server reaches a running state before this loop is reached then loop indefinitely

It should instead be something like:

while (!server.isRunning()) {
    TimeUnit.MILLISECONDS.sleep(100L);
}

For extra safety it should probably also respect the startup-timeout parameter.

connection timed out

jboss-cli.sh/.bat has the option to increase the waiting time for a given command to return with the parameter --timout. Increasing the time from 5000ms to 10000ms makes it possible to connect to one of my servers.
It would be nice if the jboss-as-maven-plugin had 'timeout' as configuration option to for the goals like deploy, reploy, ... to solve "java.net.ConnectException: JBAS012144: Could not connect to remote://192.168.2.4:9999. The connection timed out"

JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed

I can't deploy an ear to a remote jboss 7.1.1 server. I'm able to deploy using jboss web interface and using jboss-cli but when I try to deploy using the maven plugin I get the following error:

JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed

I attach the full stacktrace.
I'm using jboss 7.1.1 and I've tried using java6, java7 and all versions of the plugin from 7.1.1.Final.

Thanks.

log.txt

add option to ignore NoSuchElementException on undeploy

I'd like to tie the undeployment of a war file to the clean phase of my project. It would be helpful if there were an option to ignore the NoSuchElementException that's normally thrown when you attempt to undeploy a war file that isn't currently deployed.

Deployment issue- Server is running in domain mode, but no server groups have been defined

While deploying the app to Jboss domain mode, I'm getting this error - "Server is running in domain mode, but no server groups have been defined" , in deployment job I've already mentioned the "server- group" like this,

 settings.xml
                     <id>stg</id>
                    <properties>
                      <wildfly.id>stg</wildfly.id>
                      <wildfly.hostname><end-point></wildfly.hostname>
                      <wildfly.domain.serverGroup>other-server-group</wildfly.domain.serverGroup>
                    </properties>
            </profile>

Please help me to resolve this issue.

Commands executed out of order

In 7.2-Final, commands can be executed out of order but should instead respect the order in the POM.

Commands.java currently declares commands as a Set, this should instead be a List.

Create an option for setting the `jboss.server.base.dir` property

As of today, there is just one way to set this property, that is redefining the jvmArgs:

      <plugin>
        <groupId>org.jboss.as.plugins</groupId>
        <artifactId>jboss-as-maven-plugin</artifactId>
        <version>7.6.Final-SNAPSHOT</version>
        <configuration>
          <jbossHome>${jboss.home}</jbossHome>
          <jvmArgs>-Djboss.server.base.dir=${jboss.base}\standalone</jvmArgs>
          <modules-path>
              <paths>
                  <path>${jboss.base}/modules</path>
                  <path>${jboss.home}/modules</path>
              </paths>
          </modules-path>
        </configuration>
      </plugin>

The main drawback is that you have to

  • either copy/paste the default value of jvmArgs
  • or (as shown in the previous snippet) drop the default jvmArgs value altogether

POM packaging is not ignored by default

When executing 'deploy' on a parent pom (to deploy all the child projects), it fails. I looked at org.jboss.as.plugin.deployment.PackageType and it is hardcoded to not ignore any package types. The POM package type should be ignored by default since that project type does not generate a target directory.

Enhance username/password security

Putting the usernames and passwords for production servers into the pom.xml file is generally not desireable. Maven provide the facility to look up server credentials by using an id, which maps into a section in the settings.xml file.

The username/password facilities added in pull request #5 should be augmented to include storing the username/password securely.

It is not allowed to deploy from a pom module

We have a project with a separate war module and a separate deployment module. It is not needed to create a jar for the last one, because it only updates the datebase structure and redeploys the application. All we need is a pom deployment module and specify the depend module to deploy.

Sadly this is not possible without workarounds.

POM is not allowed.

It is also not possible to specify the dependend module directly. We need to copy the war artifact in the target folder. After that it is possible to specify which artifact to deploy with the undocumented configuration filename.

In my point of view this is a convenient usecase which should be directly supported by the plugin.

Plugin fails on Java 7

In the process of upgrading a project to Java 7 I noticed that the jboss-as-maven-plugin does not work properly with Java 7, and fails consistently. If I switch maven back to running Java 6 (Apple's Java 6 on Mac) then the jboss-as-maven-plugin connects to jboss and deploys just fine. Then if I switch to Java 7, I get

Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.1.1.Final:deploy (default) on project wefend-server: Error executing FORCE_DEPLOY: Could not execute operation '{
"operation" => "read-children-names",
"child-type" => "deployment"
}': java.net.ConnectException: JBAS012144: Could not connect to remote://localhost:9999. The connection timed out
-> [Help 1]

See also

https://issues.jboss.org/browse/AS7-5132
and
https://community.jboss.org/thread/199058

add-resource in 7.4.Final doesn't create certain tags

Following tags are NOT being added...

<configuration>
<address>subsystem=datasources,data-source=java:jboss/datasources/AFH</address>
<resource>
<properties>
<prefill>true</prefill>
<new-connection-sql>select * from dual</new-connection-sql>
<prepared-statement-cache-size>100</prepared-statement-cache-size>
<valid-connection-checker>org.jboss.jca.adapters.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker>
<stale-connection-checker>org.jboss.jca.adapters.jdbc.vendor.OracleValidConnectionChecker</stale-connection-checker>
<exception-sorter>org.jboss.jca.adapters.jdbc.vendor.OracleExceptionSorter</exception-sorter>
<check-valid-connection-sql>select * from dual</check-valid-connection-sql>
</properties>
</resource>
</configuration>

start and stop targets

Implement "start" and "stop" targets triggering the startup and the shutdown of a jboss instance.
"start-domain" and "start-standalone" would be more precise naming options, but they may unnecessary tie the plugin to the current version/structure of jboss.

deploy-artifact throws NullPointer

  1. Create a simple pom.xml for deployment
  <modelVersion>4.0.0</modelVersion>
  <groupId>test</groupId>
  <artifactId>deploy-jboss</artifactId>
  <version>0.1</version>
  <packaging>pom</packaging>
  <properties>
    <jboss.hostname>localhost</jboss.hostname>
    <jboss.port>9999</jboss.port>
    <jboss.username>admin</jboss.username>
    <jboss.password>admin</jboss.password>
  </properties>
  <build>
    <plugins>
      <plugin>
        <groupId>org.jboss.as.plugins</groupId>
        <artifactId>jboss-as-maven-plugin</artifactId>
        <version>7.3.Final</version>

        <configuration>
          <hostname>${jboss.hostname}</hostname>
          <port>${jboss.port}</port>
          <username>${jboss.username}</username>
          <password>${jboss.password}</password>
          <artifactId>testApp</artifactId>
          <groupId>com.test</groupId>
          <name>testApp.war</name>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>com.test</groupId>
      <artifactId>testApp</artifactId>
      <version>0.1</version>
      <type>war</type>
      <scope>runtime</scope>
    </dependency>
  </dependencies>

</project>
  1. call for mvn jboss-as:deploy-artifact
  2. You will get NullPointerException at org.jboss.as.plugin.deployment.PackageType.resolve(PackageType.java:48)

For some reasons, DeployArtifact class contains
@parameter(defaultValue = "${project}", readonly = true, required = true)
private MavenProject project;
which is already declated in parent class AbstractDeployment.

removing private MavenProject project; from DeployArtifact fixing this issue

NPE in add-resource

Hey Jamez,

I have got the following configuration in my pom.xml:

<plugin>
   <groupId>org.jboss.as.plugins</groupId>
   <artifactId>jboss-as-maven-plugin</artifactId>
   <version>7.0.1.Final</version>
   <executions>
        <execution>
            <id>add-datasource</id>
            <phase>package</phase>
            <configuration>
                <address>subsystem=datasources,data-source=java:/bookingDatasource</address>
                <properties>
                    <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
                    <jndi-name>java:/bookingDatasource</jndi-name>
                    <enabled>true</enabled>
                    <pool-name>bookingDSPool</pool-name>
                    <user-name>sa</user-name>
                    <password></password>
                    <driver-name>h2</driver-name>
                </properties>
            </configuration>
            <goals>
                <goal>add-resource</goal>
            </goals>
        </execution>
         <execution>
            <phase>package</phase>
            <goals>
                <goal>deploy</goal>
            </goals>
        </execution>
    </executions>
</plugin>

When I run mvn clean package it ends with:

[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.0.1.Final:add-resource (add-datasource) on project booking-ear: Could not execute goal add-resource. Reason: null: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.0.1.Final:add-resource (add-datasource) on project booking-ear: Could not execute goal add-resource. Reason: null
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not execute goal add-resource. Reason: null
    at org.jboss.as.plugin.deployment.resource.AddResource.execute(AddResource.java:134)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: java.lang.NullPointerException
    at org.jboss.as.plugin.deployment.resource.AddResource.execute(AddResource.java:125)
    ... 21 more

ejb packaging deployment does not work

pom.xml


4.0.0

<groupId>org.jboss.as.quickstarts</groupId>
<artifactId>jboss-as-helloworld-ejb-timer</artifactId>
<version>1.0.0</version>
<packaging>ejb</packaging>

.....

executed this command "mvn clean package jboss:as-deploy" does not deploy the application "cause is ejb" here is the error:

ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.1.0.CR1:deploy (default-cli) on project jboss-as-helloworld-ejb-timer: Could not execute goal deploy on jboss-as-helloworld-ejb-timer.ejb. Reason: /NotBackedUp/spagop/Channel-Team-SA-Unterstützung/partner-enablement/training/EAP/gitrepos/docs/helloworld-ejb-timer/target/jboss-as-helloworld-ejb-timer.ejb (No such file or directory) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.1.0.CR1:deploy (default-cli) on project jboss-as-helloworld-ejb-timer: Could not execute goal deploy on jboss-as-helloworld-ejb-timer.ejb. Reason: /NotBackedUp/spagop/Channel-Team-SA-Unterstützung/partner-enablement/training/EAP/gitrepos/docs/helloworld-ejb-timer/target/jboss-as-helloworld-ejb-timer.ejb (No such file or directory)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Could not execute goal deploy on jboss-as-helloworld-ejb-timer.ejb. Reason: /NotBackedUp/spagop/Channel-Team-SA-Unterstützung/partner-enablement/training/EAP/gitrepos/docs/helloworld-ejb-timer/target/jboss-as-helloworld-ejb-timer.ejb (No such file or directory)
at org.jboss.as.plugin.deployment.AbstractDeployment.execute(AbstractDeployment.java:210)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
Caused by: java.io.FileNotFoundException: /NotBackedUp/spagop/Channel-Team-SA-Unterstützung/partner-enablement/training/EAP/gitrepos/docs/helloworld-ejb-timer/target/jboss-as-helloworld-ejb-timer.ejb (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:137)
at java.io.FileInputStream.(FileInputStream.java:96)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:87)
at org.jboss.as.controller.client.helpers.standalone.impl.DeploymentPlanBuilderImpl.add(DeploymentPlanBuilderImpl.java:154)
at org.jboss.as.controller.client.helpers.standalone.impl.DeploymentPlanBuilderImpl.add(DeploymentPlanBuilderImpl.java:132)
at org.jboss.as.plugin.deployment.Util.deployPlan(Util.java:30)
at org.jboss.as.plugin.deployment.Deploy.createPlan(Deploy.java:68)
at org.jboss.as.plugin.deployment.AbstractDeployment.execute(AbstractDeployment.java:183)
... 21 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

deployment to a remote server hangs

Hi!

I'm trying to use the jboss-as-maven-plugin to deploy a war to a remote server, but the plugin just hangs after/at the realm authentication. It happens with following setup:

My dev-box running is Fedora 16 and the Oracle JDK 1.7.0_03.
The development server is running CentOS 5.8 Oracle JDK 1.7.0_03.

A jBoss AS 7.1.1 runs on both machines. These are two plain jBoss installations: just extracted the downloaded package and added a management user using the add-user.sh script.

To demonstrate the problem, I've created a test project using a archetype:

mvn archetype:generate -DarchetypeGroupId=org.jboss.spec.archetypes -DarchetypeArtifactId=jboss-javaee6-webapp-archetype -DgroupId=com.example -DartifactId=deploymentTest

Now I try to deploy this project to my local dev machine:

mvn clean package jboss-as:deploy

Everything seems works perfectly.

Now I try to deploy to the remote server (started with ./bin/standalone.sh -b=0.0.0.0 -bmanagement=0.0.0.0 ):

mvn clean package jboss-as:deploy -Ddeploy.hostname=dev.example.com

But this command just hangs after it asked for the username and password:

[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ deploymentTest ---
[INFO] Packaging webapp
[INFO] Assembling webapp [deploymentTest] in [/home/alex/dev/comp/deploymentTest/target/deploymentTest]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/alex/dev/comp/deploymentTest/src/main/webapp]
[INFO] Webapp assembled in [36 msecs]
[INFO] Building war: /home/alex/dev/comp/deploymentTest/target/deploymentTest.war
[INFO] 
[INFO] --- jboss-as-maven-plugin:7.1.1.Final:deploy (default-cli) @ deploymentTest ---
May 7, 2012 5:22:47 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.3.GA
May 7, 2012 5:22:47 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
May 7, 2012 5:22:47 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.3.GA
Authenticating against security realm: ManagementRealm
Username:admin
Password:

There is nothing logged on the server side, only after I interrupt the deployment I get following error message:

17:22:43,627 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 4074ms - Started 133 of 208 services (74 services are passive or on-demand)
17:24:18,108 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 2) JBAS014612: Operation ("add") failed - address: ([("deployment" => "deploymentTest.war")]): java.lang.RuntimeException: JBAS014761: Thread was interrupted waiting to read attachment input stream from remote caller
    at org.jboss.as.controller.remote.OperationAttachmentsProxy$ProxiedInputStream.read(OperationAttachmentsProxy.java:111) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at java.io.InputStream.read(InputStream.java:170) [rt.jar:1.7.0_03]
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:273) [rt.jar:1.7.0_03]
    at java.io.BufferedInputStream.read(BufferedInputStream.java:334) [rt.jar:1.7.0_03]
    at java.io.FilterInputStream.read(FilterInputStream.java:107) [rt.jar:1.7.0_03]
    at org.jboss.as.repository.ContentRepository$Factory$ContentRepositoryImpl.addContent(ContentRepository.java:150)
    at org.jboss.as.server.deployment.DeploymentAddHandler.addFromContentAdditionParameter(DeploymentAddHandler.java:191)
    at org.jboss.as.server.deployment.DeploymentAddHandler.execute(DeploymentAddHandler.java:147)
    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.CompositeOperationHandler.execute(CompositeOperationHandler.java:85) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.ModelControllerImpl$DefaultPrepareStepHandler.execute(ModelControllerImpl.java:466) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:121) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:139) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:108) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.protocol.mgmt.AbstractMessageHandler$2$1.doExecute(AbstractMessageHandler.java:287) [jboss-as-protocol-7.1.1.Final.jar:7.1.1.Final]
    at org.jboss.as.protocol.mgmt.AbstractMessageHandler$AsyncTaskRunner.run(AbstractMessageHandler.java:487) [jboss-as-protocol-7.1.1.Final.jar:7.1.1.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]
    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]
    at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]

The server is reachable from my machine, at least I can reach port 8080 and 9990 from the webbrowser, and also a telnet to 9999 works.

cheers,
Alex

Add classifier property to deploy mojo

Deployment fails if a classifier is added to the project artifact's final name. And the deploy mojo does not have properties to specify classifier etc like the run and start mojos.

As a workaround the filename property can be used like:
<filename>${project.build.finalName}-${myclassifier}.${project.packaging}</filename>

Here is what Maven says about the finalName currently being used at https://github.com/jbossas/jboss-as-maven-plugin/blob/master/src/main/java/org/jboss/as/plugin/deployment/AbstractAppDeployment.java#L79 :

finalName: This is the name of the bundled project when it is finally built (sans the file extension, for example: my-project-1.0.jar). It defaults to ${artifactId}-${version}. The term "finalName" is kind of a misnomer, however, as plugins that build the bundled project have every right to ignore/modify this name (but they usually do not). For example, if the maven-jar-plugin is configured to give a jar a classifier of test, then the actual jar defined above will be built as my-project-1.0-test.jar.

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.