I'm using Chef to deploy my web app. Currently I'm deploying a war stored in sonatype nexus of company server using below.

```
remote_file "#{base_dir}/webapps/prodservice.war" do
  source "http://company.com:8081/nexus/content/repositories/group/com/company/team/team_product_service/1.0.816/team_product_service-1.0.816.war"
  owner "onamer"
  group "gname"
  notifies :restart, "service[#{service_name}]"
end

```

Is there a way to get the latest war instead of hardcoding the version number in chef recipe ? I don't want to include version number as attribute also as it requires checking-in the attributes file everytime a new version is built. I get the war using a shell script as below and copy it to my apps folder but want to be able to do it with chef.

```
mvn org.apache.maven.plugins:maven-dependency-plugin:2.4:get \
        --settings maven-settings.xml \
        -DrepoUrl=http://company.com:8081/nexus/content/repositories/group-snaps \
        -Dartifact=company.team:$project:1.0-SNAPSHOT:war \
        -Ddest=$tmpfile
    cp $tmpfile $tomcat/webapps/$context.war

```