Change context root for mvn grails:run-app

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Change context root for mvn grails:run-app

rlovtangen
How can I change context root for 'mvn grails:run-app' without changing artifactId in pom.xml?

Like
<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>tomcat-maven-plugin</artifactId>
        <version>1.0-beta-1</version>
        <configuration>
                <path>/foo</path>
        </configuration>
</plugin>
for 'mvn tomcat:run' in a non-grails maven project.

I know I can change app.name in application.properties, and 'mvn grails:run-app' will do exactly what I want. But then I get an error when running 'mvn install':
[INFO] app.name [kart] in application.properties is different of the artifactId [troll-web] in the pom.xml


(grails 1.2.1, soon to upgrade to 1.3.x)

Ronny
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Change context root for mvn grails:run-app

tomas lin
have you tried setting grails.app.context = "/foo" in config.groovy?

On Wed, May 26, 2010 at 3:06 PM, Ronny Løvtangen <[hidden email]> wrote:

> How can I change context root for 'mvn grails:run-app' without changing artifactId in pom.xml?
>
> Like
> <plugin>
>        <groupId>org.codehaus.mojo</groupId>
>        <artifactId>tomcat-maven-plugin</artifactId>
>        <version>1.0-beta-1</version>
>        <configuration>
>                <path>/foo</path>
>        </configuration>
> </plugin>
> for 'mvn tomcat:run' in a non-grails maven project.
>
> I know I can change app.name in application.properties, and 'mvn grails:run-app' will do exactly what I want. But then I get an error when running 'mvn install':
> [INFO] app.name [kart] in application.properties is different of the artifactId [troll-web] in the pom.xml
>
>
> (grails 1.2.1, soon to upgrade to 1.3.x)
>
> Ronny
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Change context root for mvn grails:run-app

rlovtangen
That did the trick, thanks!

Ronny

On May 26, 2010, at 4:10 PM, Tomas Lin wrote:

> have you tried setting grails.app.context = "/foo" in config.groovy?
>
> On Wed, May 26, 2010 at 3:06 PM, Ronny Løvtangen <[hidden email]> wrote:
>> How can I change context root for 'mvn grails:run-app' without changing artifactId in pom.xml?
>>
>> Like
>> <plugin>
>>        <groupId>org.codehaus.mojo</groupId>
>>        <artifactId>tomcat-maven-plugin</artifactId>
>>        <version>1.0-beta-1</version>
>>        <configuration>
>>                <path>/foo</path>
>>        </configuration>
>> </plugin>
>> for 'mvn tomcat:run' in a non-grails maven project.
>>
>> I know I can change app.name in application.properties, and 'mvn grails:run-app' will do exactly what I want. But then I get an error when running 'mvn install':
>> [INFO] app.name [kart] in application.properties is different of the artifactId [troll-web] in the pom.xml
>>
>>
>> (grails 1.2.1, soon to upgrade to 1.3.x)
>>
>> Ronny
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email