You can also use the Artifactory Jenkins plugin in conjunction with the Maven Jenkins Plugin to deploy
artifacts to Artifactory, as shown in the following example:
<job>
<artifactory>
<name>http://artifactory-server/</name>
<deployArtifacts>true</deployArtifacts>
<includeEnvVars>true</includeEnvVars>
<evenIfUnstable>true</evenIfUnstable>
</artifactory>
</job>
Default deployment credentials are specified when Jenkins is configured in the Manage
Jenkins#Configure System screen. They can be also specified for each Jenkins job. The default Maven
repositories are libs-releases-local and libs-snapshots-local. You can find more details in
the plugin’s documentation at http://wiki.jenkins-ci.org/display/JENKINS/Artifactory+Plugin.
10.5.4. Freestyle Jobs
In addition to Maven jobs, the Maven Jenkins Plugin allows you to configure Jenkins freestyle jobs.
An example is shown here:
<job>
<id>free-style</id>
<jobType>free</jobType>
<scmType>git</scmType>
<repository>
<remote>git://github.com/evgeny-goldin/maven-plugins-test.git</remote>
</repository>
<tasks>
<maven>
<mavenName>apache-maven-3</mavenName>
<jvmOptions>-Xmx128m -XX:MaxPermSize=128m -ea</jvmOptions>
<properties>plugins-version = 0.2.2</properties>
</maven>
<shell><command>pwd; ls -al; du -hs .</command></shell>
</tasks>
</job>
Freestyle jobs let you execute a shell or batch command, run Maven or Ant, and invoke other jobs. They
provide a convenient run-time environment for system scripts or any other kind of activity not readily
available with Jenkins or one of its plugins. Using this approach, you can generate Freestyle build job
configuration files in a similar way to the approach we have seen for Maven build jobs, which can help
make your build environment more consistent and maintainable.
10.6. Coordinating Your Builds
Triggering downstream build jobs is easy enough. However, when setting up larger and more
complicated build job setups, you sometimes would like builds to be able to run concurrently, or possibly