Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In the <a href="https://maven-glassfish-plugin.dev.java.net/examples/complete.html" rel="nofollow noreferrer"><em>Fairly</em> Complete Configuration Example</a>, there is indeed a reference to the <code>&lt;passFile&gt;</code> element but the documentation of the various goals doesn't mention this element and refer to <code>&lt;passwordFile&gt;</code> instead (see for example <a href="https://maven-glassfish-plugin.dev.java.net/start-domain-mojo.html" rel="nofollow noreferrer">glassfish:start-domain</a> or <a href="https://maven-glassfish-plugin.dev.java.net/deploy-mojo.html" rel="nofollow noreferrer">glassfish:deploy</a>). So, try to update the configuration of your plugin in your profile accordingly:</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.glassfish.maven.plugin&lt;/groupId&gt; &lt;artifactId&gt;maven-glassfish-plugin&lt;/artifactId&gt; &lt;version&gt;2.2-SNAPSHOT&lt;/version&gt; &lt;configuration&gt; &lt;glassfishDirectory&gt;${glassfish.directory}&lt;/glassfishDirectory&gt; &lt;user&gt;${glassfish.user}&lt;/user&gt; &lt;passwordFile&gt;${glassfish.directory}/domains/${project.artifactId}/config/domain-passwords&lt;/passwordFile&gt; &lt;domain&gt; &lt;name&gt;${project.artifactId}&lt;/name&gt; &lt;/domain&gt; &lt;components&gt; &lt;component&gt; &lt;name&gt;${project.artifactId}&lt;/name&gt; &lt;artifact&gt;${project.build.directory}/artifacts/${project.artifactId}.war&lt;/artifact&gt; &lt;/component&gt; &lt;/components&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>As a side note, I recommend the <a href="http://download.java.net/maven/glassfish/org/glassfish/maven-embedded-glassfish-plugin/" rel="nofollow noreferrer">maven-embedded-glassfish-plugin</a> which allows to run Glassfish in a single JVM using its embedded API. Very nice. See <a href="http://blogs.oracle.com/sirajg/entry/using_maven_plugin_for_v3" rel="nofollow noreferrer">Using maven plugin for v3 embedded glassfish </a> for more details.</p> <p><strong>UPDATE:</strong> I did some further testing and, couldn't actually reproduce your problem on my machine (sigh). </p> <p>First, I created a new domain by executing the following command (from <code>&lt;glassfish_home&gt;/bin</code>):</p> <pre><code>$ ./asadmin create-domain --savemasterpassword=true maven-glassfish-testcase </code></pre> <p>Then, I created a new webapp using maven's webapp archetype:</p> <pre><code>$ mvn archetype:create -DgroupId=com.mycompany.app \ -DartifactId=maven-glassfish-testcase \ -DarchetypeArtifactId=maven-archetype-webapp </code></pre> <p>And updated the <code>pom.xml</code> of the freshly created webapp as follow:</p> <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt; &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt; &lt;groupId&gt;com.mycompany.app&lt;/groupId&gt; &lt;artifactId&gt;maven-glassfish-testcase&lt;/artifactId&gt; &lt;packaging&gt;war&lt;/packaging&gt; &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt; &lt;name&gt;maven-glassfish-testcase Maven Webapp&lt;/name&gt; &lt;url&gt;http://maven.apache.org&lt;/url&gt; &lt;properties&gt; &lt;glassfish.home&gt;/home/pascal/opt/glassfishv3/glassfish&lt;/glassfish.home&gt; &lt;domain.username&gt;admin&lt;/domain.username&gt; &lt;/properties&gt; &lt;pluginRepositories&gt; &lt;pluginRepository&gt; &lt;id&gt;ocean&lt;/id&gt; &lt;url&gt;http://maven.ocean.net.au/snapshot&lt;/url&gt; &lt;releases&gt; &lt;enabled&gt;false&lt;/enabled&gt; &lt;updatePolicy&gt;never&lt;/updatePolicy&gt; &lt;/releases&gt; &lt;snapshots&gt; &lt;enabled&gt;true&lt;/enabled&gt; &lt;updatePolicy&gt;always&lt;/updatePolicy&gt; &lt;/snapshots&gt; &lt;/pluginRepository&gt; &lt;/pluginRepositories&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;junit&lt;/groupId&gt; &lt;artifactId&gt;junit&lt;/artifactId&gt; &lt;version&gt;3.8.1&lt;/version&gt; &lt;scope&gt;test&lt;/scope&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;build&gt; &lt;finalName&gt;maven-glassfish-testcase&lt;/finalName&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;groupId&gt;org.glassfish.maven.plugin&lt;/groupId&gt; &lt;artifactId&gt;maven-glassfish-plugin&lt;/artifactId&gt; &lt;version&gt;2.2-SNAPSHOT&lt;/version&gt; &lt;configuration&gt; &lt;glassfishDirectory&gt;${glassfish.home}&lt;/glassfishDirectory&gt; &lt;user&gt;${domain.username}&lt;/user&gt; &lt;passwordFile&gt;${glassfish.home}/domains/${project.artifactId}/master-password&lt;/passwordFile&gt; &lt;debug&gt;true&lt;/debug&gt; &lt;echo&gt;true&lt;/echo&gt; &lt;domain&gt; &lt;name&gt;${project.artifactId}&lt;/name&gt; &lt;adminPort&gt;4848&lt;/adminPort&gt; &lt;!-- mandatory for mvn glassfish:deploy --&gt; &lt;/domain&gt; &lt;components&gt; &lt;component&gt; &lt;name&gt;${project.artifactId}&lt;/name&gt; &lt;artifact&gt;${project.build.directory}/${project.build.finalName}.war&lt;/artifact&gt; &lt;/component&gt; &lt;/components&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/build&gt; &lt;/project&gt; </code></pre> <p>With this setup, running <code>mvn glassfish:start-domain</code> produces the following output:</p> <pre> $ mvn glassfish:start-domain [INFO] Scanning for projects... [INFO] snapshot org.glassfish.maven.plugin:maven-glassfish-plugin:2.2-SNAPSHOT: checking for updates from ocean [INFO] ------------------------------------------------------------------------ [INFO] Building maven-glassfish-testcase Maven Webapp [INFO] task-segment: [glassfish:start-domain] [INFO] ------------------------------------------------------------------------ [INFO] [glassfish:start-domain {execution: default-cli}] [INFO] asadmin --host localhost --port 4848 --user admin --passwordfile /home/pascal/opt/glassfishv3/glassfish/domains/maven-glassfish-testcase/master-password --interactive=false --echo=true --terse=true start-domain --debug=true --domaindir /home/pascal/opt/glassfishv3/glassfish/domains --help=false --upgrade=false --verbose=false maven-glassfish-testcase [INFO] Started domain: maven-glassfish-testcase [INFO] Domain location: /home/pascal/opt/glassfishv3/glassfish/domains/maven-glassfish-testcase [INFO] Log file: /home/pascal/opt/glassfishv3/glassfish/domains/maven-glassfish-testcase/logs/server.log [INFO] Admin port for the domain: 4848 [INFO] Debug port for the domain: 9009 [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ [INFO] Total time: 27 seconds [INFO] Finished at: Mon Dec 21 20:16:17 CET 2009 [INFO] Final Memory: 4M/53M [INFO] ------------------------------------------------------------------------ </pre> <p>As you can see, the <code>--passwordfile</code> option is passed correctly using the file specified in the POM. In other words, things are working as expected. Maybe try with an hard coded path to the password file to debug this setting, it should just work! </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload