Upgrade to 1.3.2, problem with maven and GRAILS_HOME

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

Upgrade to 1.3.2, problem with maven and GRAILS_HOME

rlovtangen
I tried to upgrade to 1.3.2 (from 1.2.1), but get this error when trying to run 'mvn install' or 'mvn grails:run-app':

"Application expects grails version [1.3.2], but GRAILS_HOME is version [null] - use the correct Grails version or run 'grails upgrade' if this Grails version is newer than the version your application expects."

I thought I didn't need GRAILS_HOME when using maven? If I do set GRAILS_HOME, I still get the same error.



This is how I tried to upgrade:
1) created a new project with maven-archetype-plugin, then run 'mvn initialize' and 'mvn grails:install-templates'
2) copied the files over my existing grails 1.2.1 project
3) used IntelliJ's diff to make sure I didn't throw out any of my custom additions to various source files
4) deleted 1.2.1 versions of plugins in /plugins
5) mvn clean install



Ronny


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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to 1.3.2, problem with maven and GRAILS_HOME

mlawler
Check the following:

1) Your grails project's application.properties file
2) The version of the grails jars that your POM's grails-maven-plugin uses
3) Yes I have found that in some cases the grails-maven-plugin still uses the GRAILS_HOME for some things. It shouldnt but....


On 21/06/2010, at 9:32 PM, Ronny Løvtangen wrote:

I tried to upgrade to 1.3.2 (from 1.2.1), but get this error when trying to run 'mvn install' or 'mvn grails:run-app':

"Application expects grails version [1.3.2], but GRAILS_HOME is version [null] - use the correct Grails version or run 'grails upgrade' if this Grails version is newer than the version your application expects."

I thought I didn't need GRAILS_HOME when using maven? If I do set GRAILS_HOME, I still get the same error.



This is how I tried to upgrade:
1) created a new project with maven-archetype-plugin, then run 'mvn initialize' and 'mvn grails:install-templates'
2) copied the files over my existing grails 1.2.1 project
3) used IntelliJ's diff to make sure I didn't throw out any of my custom additions to various source files
4) deleted 1.2.1 versions of plugins in /plugins
5) mvn clean install





Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to 1.3.2, problem with maven and GRAILS_HOME

rlovtangen
Thanks,
I checked, but didn't find any problems:


1) 
app.grails.version=1.3.2
app.name=troll-web
app.servlet.version=2.4
app.version=1.0-SNAPSHOT
plugins.hibernate=1.3.2
plugins.tomcat=1.3.2

2)
      <plugin>
        <groupId>org.grails</groupId>
        <artifactId>grails-maven-plugin</artifactId>
        <version>1.3.2</version>
        <extensions>true</extensions>
        <executions>
          <execution>
            <goals>
              <goal>init</goal>
              <goal>maven-clean</goal>
              <goal>validate</goal>
              <goal>config-directories</goal>
              <goal>maven-compile</goal>
              <goal>maven-test</goal>
              <goal>maven-war</goal>
              <goal>maven-functional-test</goal>
            </goals>
          </execution>
        </executions>
      </plugin>


3) Even if I set GRAILS_HOME to point to grails 1.3.2, I get this error.

Ronny

On Jun 21, 2010, at 1:36 PM, Michael Lawler wrote:

Check the following:

1) Your grails project's application.properties file
2) The version of the grails jars that your POM's grails-maven-plugin uses
3) Yes I have found that in some cases the grails-maven-plugin still uses the GRAILS_HOME for some things. It shouldnt but....


On 21/06/2010, at 9:32 PM, Ronny Løvtangen wrote:

I tried to upgrade to 1.3.2 (from 1.2.1), but get this error when trying to run 'mvn install' or 'mvn grails:run-app':

"Application expects grails version [1.3.2], but GRAILS_HOME is version [null] - use the correct Grails version or run 'grails upgrade' if this Grails version is newer than the version your application expects."

I thought I didn't need GRAILS_HOME when using maven? If I do set GRAILS_HOME, I still get the same error.



This is how I tried to upgrade:
1) created a new project with maven-archetype-plugin, then run 'mvn initialize' and 'mvn grails:install-templates'
2) copied the files over my existing grails 1.2.1 project
3) used IntelliJ's diff to make sure I didn't throw out any of my custom additions to various source files
4) deleted 1.2.1 versions of plugins in /plugins
5) mvn clean install






Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to 1.3.2, problem with maven and GRAILS_HOME

pledbrook
In reply to this post by mlawler
> Check the following:
> 1) Your grails project's application.properties file
> 2) The version of the grails jars that your POM's grails-maven-plugin uses
> 3) Yes I have found that in some cases the grails-maven-plugin still uses
> the GRAILS_HOME for some things. It shouldnt but....

The error message is inaccurate in this case. It doesn't compare the
Grails version in application.properties to GRAILS_HOME, but it
compares it to BuildSettings.grailsVersion. So for some reason, that
property isn't being set correctly when used from the Maven plugin.

Ronny, can you please check whether you have
grails-bootstrap-1.3.2.jar as a project dependency, via mvn
dependency:tree (or whatever it is)?

Peter

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

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to 1.3.2, problem with maven and GRAILS_HOME

mlawler
I havent had time to move our projects to 1.3.x yet, but I checked http://repository.codehaus.org/org/grails/grails-maven-plugin/1.3.2/   and noted that the grails-maven-plugin-1.3.2.pom.xml looks good.
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-bootstrap</artifactId>
      <version>1.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-scripts</artifactId>
      <version>1.3.2</version>
      <scope>runtime</scope>
    </dependency>
re: GRAILS_HOME, I'll have to do some digging to see if I can reproduce it, but I recall that I needed to have it set in some cases. This was 1.1.x and 1.2.x but may not be the case for more recent versions.

On 21/06/2010, at 10:04 PM, Peter Ledbrook wrote:

Check the following:
1) Your grails project's application.properties file
2) The version of the grails jars that your POM's grails-maven-plugin uses
3) Yes I have found that in some cases the grails-maven-plugin still uses
the GRAILS_HOME for some things. It shouldnt but....

The error message is inaccurate in this case. It doesn't compare the
Grails version in application.properties to GRAILS_HOME, but it
compares it to BuildSettings.grailsVersion. So for some reason, that
property isn't being set correctly when used from the Maven plugin.

Ronny, can you please check whether you have
grails-bootstrap-1.3.2.jar as a project dependency, via mvn
dependency:tree (or whatever it is)?

Peter

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

   http://xircles.codehaus.org/manage_email



regards,

Michael Lawler
Enterprise Software Architect
work: 02 4223 0052
mob: 0411 539876
www.selera.com.au


Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to 1.3.2, problem with maven and GRAILS_HOME

rlovtangen
Yes, grails-bootstrap is version 1.3.2. 
From 'mvn dependency:tree': org.grails:grails-bootstrap:jar:1.3.2:compile
pom.xml:

    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-bootstrap</artifactId>
      <version>1.3.2</version>
    </dependency>

I don't have grails-script as a dependency, should I?


On Jun 21, 2010, at 2:34 PM, Michael Lawler wrote:

I havent had time to move our projects to 1.3.x yet, but I checked http://repository.codehaus.org/org/grails/grails-maven-plugin/1.3.2/   and noted that the grails-maven-plugin-1.3.2.pom.xml looks good.
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-bootstrap</artifactId>
      <version>1.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-scripts</artifactId>
      <version>1.3.2</version>
      <scope>runtime</scope>
    </dependency>
re: GRAILS_HOME, I'll have to do some digging to see if I can reproduce it, but I recall that I needed to have it set in some cases. This was 1.1.x and 1.2.x but may not be the case for more recent versions.

On 21/06/2010, at 10:04 PM, Peter Ledbrook wrote:

Check the following:
1) Your grails project's application.properties file
2) The version of the grails jars that your POM's grails-maven-plugin uses
3) Yes I have found that in some cases the grails-maven-plugin still uses
the GRAILS_HOME for some things. It shouldnt but....

The error message is inaccurate in this case. It doesn't compare the
Grails version in application.properties to GRAILS_HOME, but it
compares it to BuildSettings.grailsVersion. So for some reason, that
property isn't being set correctly when used from the Maven plugin.

Ronny, can you please check whether you have
grails-bootstrap-1.3.2.jar as a project dependency, via mvn
dependency:tree (or whatever it is)?

Peter

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

   http://xircles.codehaus.org/manage_email



regards,

Michael Lawler
Enterprise Software Architect
work: 02 4223 0052
mob: 0411 539876
www.selera.com.au

<selera_36pix.gif>


Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to 1.3.2, problem with maven and GRAILS_HOME

rlovtangen
I found others with the same problem.
In that case it was due to a conflict between the grails-maven-plugin and quartz.
My pom have a dependency to a jar that has a dependency to quartz (1.8.0)
If I exclude quartz then it seems to build fine.

The catch is, I'm using quartz, so I can't really exclude it..


Have to agree that the error message is inaccurate ;)

Ronny


On Jun 21, 2010, at 2:58 PM, Ronny Løvtangen wrote:

Yes, grails-bootstrap is version 1.3.2. 
From 'mvn dependency:tree': org.grails:grails-bootstrap:jar:1.3.2:compile
pom.xml:

    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-bootstrap</artifactId>
      <version>1.3.2</version>
    </dependency>

I don't have grails-script as a dependency, should I?


On Jun 21, 2010, at 2:34 PM, Michael Lawler wrote:

I havent had time to move our projects to 1.3.x yet, but I checked http://repository.codehaus.org/org/grails/grails-maven-plugin/1.3.2/   and noted that the grails-maven-plugin-1.3.2.pom.xml looks good.
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-bootstrap</artifactId>
      <version>1.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-scripts</artifactId>
      <version>1.3.2</version>
      <scope>runtime</scope>
    </dependency>
re: GRAILS_HOME, I'll have to do some digging to see if I can reproduce it, but I recall that I needed to have it set in some cases. This was 1.1.x and 1.2.x but may not be the case for more recent versions.

On 21/06/2010, at 10:04 PM, Peter Ledbrook wrote:

Check the following:
1) Your grails project's application.properties file
2) The version of the grails jars that your POM's grails-maven-plugin uses
3) Yes I have found that in some cases the grails-maven-plugin still uses
the GRAILS_HOME for some things. It shouldnt but....

The error message is inaccurate in this case. It doesn't compare the
Grails version in application.properties to GRAILS_HOME, but it
compares it to BuildSettings.grailsVersion. So for some reason, that
property isn't being set correctly when used from the Maven plugin.

Ronny, can you please check whether you have
grails-bootstrap-1.3.2.jar as a project dependency, via mvn
dependency:tree (or whatever it is)?

Peter

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

   http://xircles.codehaus.org/manage_email



regards,

Michael Lawler
Enterprise Software Architect
work: 02 4223 0052
mob: 0411 539876
www.selera.com.au

<selera_36pix.gif>



Reply | Threaded
Open this post in threaded view
|

Re: Upgrade to 1.3.2, problem with maven and GRAILS_HOME

rlovtangen
ok, it's a known issue, reported in http://jira.codehaus.org/browse/GRAILS-4969
Quartz also has a 'build.properties'...

Scheduled for 1.2.3, I guess it then will be included in 1.3.3 as well?

Ronny

On Jun 21, 2010, at 3:36 PM, Ronny Løvtangen wrote:

I found others with the same problem.
In that case it was due to a conflict between the grails-maven-plugin and quartz.
My pom have a dependency to a jar that has a dependency to quartz (1.8.0)
If I exclude quartz then it seems to build fine.

The catch is, I'm using quartz, so I can't really exclude it..


Have to agree that the error message is inaccurate ;)

Ronny


On Jun 21, 2010, at 2:58 PM, Ronny Løvtangen wrote:

Yes, grails-bootstrap is version 1.3.2. 
From 'mvn dependency:tree': org.grails:grails-bootstrap:jar:1.3.2:compile
pom.xml:

    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-bootstrap</artifactId>
      <version>1.3.2</version>
    </dependency>

I don't have grails-script as a dependency, should I?


On Jun 21, 2010, at 2:34 PM, Michael Lawler wrote:

I havent had time to move our projects to 1.3.x yet, but I checked http://repository.codehaus.org/org/grails/grails-maven-plugin/1.3.2/   and noted that the grails-maven-plugin-1.3.2.pom.xml looks good.
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-bootstrap</artifactId>
      <version>1.3.2</version>
    </dependency>
    <dependency>
      <groupId>org.grails</groupId>
      <artifactId>grails-scripts</artifactId>
      <version>1.3.2</version>
      <scope>runtime</scope>
    </dependency>
re: GRAILS_HOME, I'll have to do some digging to see if I can reproduce it, but I recall that I needed to have it set in some cases. This was 1.1.x and 1.2.x but may not be the case for more recent versions.

On 21/06/2010, at 10:04 PM, Peter Ledbrook wrote:

Check the following:
1) Your grails project's application.properties file
2) The version of the grails jars that your POM's grails-maven-plugin uses
3) Yes I have found that in some cases the grails-maven-plugin still uses
the GRAILS_HOME for some things. It shouldnt but....

The error message is inaccurate in this case. It doesn't compare the
Grails version in application.properties to GRAILS_HOME, but it
compares it to BuildSettings.grailsVersion. So for some reason, that
property isn't being set correctly when used from the Maven plugin.

Ronny, can you please check whether you have
grails-bootstrap-1.3.2.jar as a project dependency, via mvn
dependency:tree (or whatever it is)?

Peter

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

   http://xircles.codehaus.org/manage_email



regards,

Michael Lawler
Enterprise Software Architect
work: 02 4223 0052
mob: 0411 539876
www.selera.com.au

<selera_36pix.gif>