views:

22

answers:

0

settings.xml I define to:

<profile>
        <id>GlassFishv3</id>
        <activation>
            <activeByDefault>false</activeByDefault>
            <property>
                <name>glassfish.version</name>
                <value>3</value>
            </property>
        </activation>
        <properties>
            <glassfish.home>E:\JavaWorkingTools\Sun\Glassfish\glassfishv3\glassfish
            </glassfish.home>
            <domain.username>admin</domain.username>
            <domain.password>admin</domain.password>
            <domain.log.dir>E:\JavaWorkingTools\Sun\Glassfish\glassfishv3\glassfish\domains\domain1\logs
            </domain.log.dir>
        </properties>
    </profile>

activeProfiles is:

<activeProfiles>
    <activeProfile>GlassFishv3</activeProfile>
</activeProfiles>

and pom.xml is:

 <plugin>
            <groupId>org.glassfish.maven.plugin</groupId>
            <artifactId>maven-glassfish-plugin</artifactId>
            <version>2.2-SNAPSHOT</version>
            <configuration>
                <glassfishDirectory>${glassfish.home}</glassfishDirectory>
                <user>${domain.username}</user>
            <adminPassword>${domain.password}</adminPassword> 
             <!--   <passwordFile>${glassfish.home}/domains/domain1/master-password</passwordFile>-->
                <debug>true</debug>
                <echo>true</echo>
                <domain>
                    <name>domain1</name>
                    <adminPort>4848</adminPort> <!-- mandatory for mvn glassfish:deploy -->
                </domain>
                <components>
                    <component>
                        <name>${project.artifactId}</name>
                        <artifact>${project.build.directory}/${project.build.finalName}.war</artifact>
                    </component>
                </components>
            </configuration>
        </plugin>

but I run to glassfish:start-domain is:

[INFO] Scanning for projects...
[INFO] snapshot org.glassfish.maven.plugin:maven-glassfish-plugin:2.2-    SNAPSHOT: checking for updates from ocean
2010-06-21 15:45:48.586:INFO::Logging to StdErrLog::DEBUG=false via   org.eclipse.jetty.util.log.StdErrLog
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building SSH2Maven JEE5 Webapp 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-glassfish-plugin:2.2-SNAPSHOT:start-domain (default-cli) @ SSH2Maven ---
[INFO] asadmin --host localhost --port 4848 --user admin --passwordfile  C:\Users\Edward\AppData\Local\Temp\mgfp5352139657266436179.tmp --interactive=false --echo=true --terse=true start-domain --debug=true --domaindir E:\JavaWorkingTools\Sun\Glassfish\glassfishv3\glassfish\domains --help=false --upgrade=false --verbose=false domain1
[ERROR] ��Ҫ���������������޿���̨���޷���ʾ��Ӧʹ�� --savemasterpassword=true �������ʹ�� --passwordfile ѡ���ṩ�����ļ���
[ERROR] Unable to start domain "domain1".
[ERROR] For more detail on what might be causing the problem try running maven with the --debug option 
[ERROR] or setting the maven-glassfish-plugin "echo" property to "true".
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.441s
[INFO] Finished at: Mon Jun 21 15:45:52 CST 2010
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.glassfish.maven.plugin:maven-glassfish-plugin:2.2-SNAPSHOT:start-domain (default-cli) on project SSH2Maven: Unable to start domain "domain1". -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/MojoFailureException

why can't use tag? I password is correct.