Deleting solution files

Run the solutionManager delete command to delete the solution manifest (.mf) file and the solution feature .jar files that remain on the server after undeployment. After removing these files, you can deploy the same version of the solution again.

About this task

When you undeploy a solution, the solution feature is removed from the server.xml file. The solution artifact files, such as .jar files and the manifest files, remain in the solution directories InstallDir/ia/solutions/lib and InstallDir/ia/solutions/lib/features. If you attempt to deploy the solution again without increasing the solution version number, the script displays an error because it detects the solution feature in the manifest files.

To deploy the same version of the solution again after undeployment, you can run the solutionManager delete command to delete the solution .jar and manifest files. You must stop the server prior to running the command because if the solution files are in use, the script cannot delete the files. The script does not support the remote parameter, so you must run the command locally on the server where the solution is installed.

Procedure

  1. Stop the server. For example, to stop a catalog server:
    server stop catalog_server2
    To stop a runtime or development server:
    serverManager shutdown
  2. Run the solutionManager delete command as shown in the following examples.
    • Run the script on Windows:
      solutionManager delete OilServiceSolution-0.1
    • Run the script on Linux:
      ./solutionManager delete OilServiceSolution-0.1
  3. Restart the server with the --clean option to remove any solution files that were cached on the Liberty server. See the WebSphere® Application Server documentation for more information about Liberty server command options.
    server start container_server3 --clean

Results

When the solutionManager delete command finishes, you see a message similar to this example:
Deleted OilServiceSolution.solutionbundle_0.1.0.20140204145101.jar
Deleted OilServiceSolution_java_agent_0.1.0.20140204145101.jar
Deleted OilServiceSolution_java_entity_agent_0.1.0.20140204145101.jar
Deleted OilServiceSolution_rule_agent_0.1.0.20140204145101.jar
Deleted OilServiceSolution-0.1.mf
Solution successfully deleted: OilServiceSolution-0.1