Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Maven Jar Settings

 
pamir sonmez
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In my web project, I am using struts2;

<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.2.1</version>

I also want to use new jars of spring, but struts brings 2.5.6 version of spring jar, in the pom.xml of struts2 it is defined as
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${struts2.springPlatformVersion}</version>
</dependency>

so it has a property named struts2.springPlatformVersion, if I can change this parameter. I can use the version that I wanted.
I defined the property in my pom.xml file like;

<properties>
<struts2.springPlatformVersion>3.0.4.RELEASE</struts2.springPlatformVersion>
</properties>

But it did not work, still struts plugin is adding 2.5.6 version.

Is there a way can I change it?


Thanks
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's possibly not picking up the property early enough, have you tried passing the property on the command line with the -D option?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic