CAPS is a framework to weave provenance capturing mechanisms into existing Java applications, which are not yet provenance aware. The CAPS framework employs AspectJ, the Java Sandbox mechanism, the Java security manager, JMX and the Kieker framework to automatically gather the provenance information. Woven inside the application as a minimal-invasive integration of the provenance capturing mechanisms, CAPS monitors the execution of the software. Whenever a dataset is processed, CAPS creates the corresponding provenance graph entry. The graph itself is stored in an integrated provenance archive build on top of the Neo4j graph database. CAPS is realized and evaluated in the context of the PubFlow workflow system for semi-automatic research data publication. In particular, workflow-generated provenance data is automatically gathered via CAPS, without mixing program logic with provenance mechanisms.