JavaEE 8 Tutorial Deployment Failed on hello1 Project

I'm trying to learn Java EE 8, I followed the official guide at https://javaee.imtqy.com/tutorial/ , but I have this problem:

--- cargo-maven2-plugin:1.4.4:redeploy (deploy) @ hello1 ---
[DeployerRedeployMojo] Resolved container artifact org.codehaus.cargo:cargo-core-container-glassfish:jar:1.4.4 for container glassfish5x
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 4.730s
Finished at: Mon Oct 09 16:16:40 CEST 2017
Final Memory: 18M/183M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy (deploy) on project hello1: Execution deploy of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.4:redeploy failed: Cannot create configuration. There no registered configuration for the parameters (container [id = [glassfish5x], type = [installed]], configuration type [existing]). Actually there are no valid types registered for this configuration. Maybe you've made a mistake spelling it? -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

I followed exactly the guide, so I did not understand where the error is ...

EDIT: This error is the same for glass fish 5 and 4.1.1. If I manually breed a war package, it works; so the problem is the connection between maven and the Glassfish server ...

EDIT 2: I found this https://netbeans.org/bugzilla/show_bug.cgi?id=247746 , but it does not work ...

+6
source share
5 answers

I had the same problems, but I managed to solve it as follows:

pom, .. /glassfish 5/docs/javaee-tutorial/examples,

<cargo.plugin.version>1.6.4</cargo.plugin.version>
<glassfish.domain.name>domain1</glassfish.domain.name>       
<glassfish.home>/Users/fgjensen/Java/J2EE8/glassfish5</glassfish.home>
<integration.container.id>glassfish4x</integration.container.id> 

Maven . Glassfish 5 . .

asadmin password.properties, /glassfish 5/glassfish/domains.

, .

+6

. :

, :

pom, .. /glassfish 5/docs/javaee-tutorial/examples,

   <cargo.plugin.version>1.6.4</cargo.plugin.version>
   <glassfish.domain.name>domain1</glassfish.domain.name>       
   <glassfish.home>/Users/fgjensen/Java/J2EE8/glassfish5</glassfish.home>
   <integration.container.id>glassfish4x</integration.container.id>

Maven . Glassfish 5 . .

asadmin password.properties, /glassfish 5/glassfish/domains.

, .

GlassFish JDK

<glassfish.home>/Users/fgjensen/Java/J2EE8/glassfish5</glassfish.home>
+1

:

  • Glassfish
  • JavaDB
  • Glassfish Marven
  • pom.xml :

            <properties>
            <glassfish.home>${glassfish.home.prefix}/glassfish4</glassfish.home>
            </properties>
    

"mvn install -X" , , .

0

pom ( C:\Program Files\Java\glassfish4\docs\javaee-tutorial\pom.xml)

<glassfish.home>${glassfish.home.prefix}/glassfish4</glassfish.home>

.

:

<glassfish.home>C:\Program Files\Java\glassfish4</glassfish.home>

. .

0

, Glassfish ( $ mvn install) , Glassfish v4 JDK6 JDK7. v5 JDK7 JDK8, .

0

Source: https://habr.com/ru/post/1687150/


All Articles