Maven : Changing the versions of the jars inside the dependency Tag
We are using Maven 2.2.1 version .
I have an existing POM.xml file , in that i have observed a lot of jars were mentioned with the version 99.1 , look this below :
<dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jaxws_2.1_spec</artifactId>
<version>99.1</ver开发者_如何转开发sion>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
<version>99.1</version>
<scope>provided</scope>
</dependency>
Later i have chnaged the versions from 99.1 to exact version (For example in case of geronimo-jaxws_2.1_spec jar i mentioned version as 1.7.1 )
Now this looks like this
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jaxws_2.1_spec</artifactId>
<version>1.7.1</version>
<scope>provided</scope>
</dependency>
The application got compiled , and its BUILD SUCCESSFUL .
But i dont know , chnaging like this will impact anything ??
And also i observed that for some of the jars on to dependency tag there is no version tag ?? Is this acceptable ??
Please tell me , Thank you very much .
If everything works and you know that 1.7.1 is correct version than you have no problem. Unfortunately there are all kind of version naming schemes that make it hard sometimes to figure what is what. So it's not clear what version 99.1 corresponds to. I seen this kind of situations with other products as well.
And also i observed that for some of the jars on to dependency tag there is no version tag > ?? Is this acceptable ??
Versions are probably defined in the parent pom in dependencyManagement
section. In this case children poms will not need explicit version specified.
精彩评论