Issue Details (XML | Word | Printable)

Key: MGP-11
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Dave Whitla
Reporter: Trond Andersen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
maven-glassfish-plugin

Maven does not handle windows paths well

Created: 16/Dec/08 12:43 AM   Updated: 28/Jan/09 11:39 PM
Return to search
Issue 1 of 12 issue(s)
<< Previous | MGP-11 | Next >>
Component/s: None
Affects Version/s: 2.1
Fix Version/s: None

Environment: Windows Vista, JDK 1.6.0_10, Maven 2.0.9


 Description  « Hide
I've created a domain from pom.xml:

<plugin>
                <groupId>org.glassfish.maven.plugin</groupId>
                <artifactId>maven-glassfish-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <glassfishDirectory>${glassfish.home}</glassfishDirectory>
                    <user>${domain.username}</user>
                    <adminPassword>${admin.password}</adminPassword>
                    <autoCreate>true</autoCreate>
                    <debug>true</debug>
                    <echo>false</echo>
                    <domain>
                        <name>${project.artifactId}</name>
                        <adminPort>4848</adminPort>
                        <httpPort>8080</httpPort>
                        <httpsPort>8443</httpsPort>
                        <iiopPort>3700</iiopPort>
                        <jmsPort>7676</jmsPort>
                        <reuse>false</reuse>
                        <jvmOptions>
                            <option>-Djava.security.auth.login.config=${project.build.testOutputDirectory}/login.conf</option>
                        </jvmOptions>
                        <properties>
                            <property>
                                <name>server.log-service.file</name>
                                <value>${domain.log.dir}/server.log</value>
                            </property>
                        </properties>
                        <auth>
                            <realm>
                                <name>testRealm</name>
                                <className>com.sun.enterprise.security.auth.realm.file.FileRealm</className>
                                <properties>
                                    <property>
                                        <name>jaas-context</name>
                                        <value>test</value>
                                    </property>
                                    <property>
                                        <name>file</name>
                                        <value>${project.build.outputDirectory}/keyfile</value>
                                    </property>
                                </properties>
                            </realm>
                        </auth>
                        <resources/>
                    </domain>
                    <components>
                        <component>
                            <name>${project.artifactId}</name>
                            <artifact>${project.build.directory}/artifacts/${project.build.finalName}.war</artifact>
                        </component>
                    </components>
                </configuration>
            </plugin>

the command: mvn glassfish:create-domain succeeds.

When I try to run: mvn glassfish:start-domain, I see the follwing text in my console:

[INFO] addJvmOptions: OUT Property -Djava.security.auth.login.config=C:ProjectsxyzservermodulesFrontServertargettest-classes/login.conf

This is a path which is missing all the slash'es in the path.

Dave Whitla added a comment - 16/Dec/08 09:02 AM
Windows backslash (or more correctly my non-consideration of it) strikes again.

I will fix this today in trunk (ie 2.2-SNAPSHOT) with a comment here when its done.

In the meantime I recommend you upgrade to Unix :)

Trond Andersen added a comment - 16/Dec/08 07:18 PM
I'm pretty sure that Maven provides API for command line/path parsing which ensures a platform independent way of handling paths. I've tried to find a good example, but so far I haven't found any. Also asked on Maven IRC channel and will report back if I get a response from IRC.

Trond Andersen added a comment - 28/Jan/09 11:39 PM
Will this issue be addressed? If you need to test this, I can help with that.