public void execute()

in core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/AttachMojo.java [80:103]


    public void execute() throws MojoExecutionException, MojoFailureException {
        getLog().info("[MAVEN-CORE-IT-LOG] Attaching artifact file: " + attachedFile);
        getLog().info("[MAVEN-CORE-IT-LOG] type=" + artifactType + ", classifier=" + artifactClassifier);

        if (attachedFile == null || attachedFile.length() <= 0) {
            throw new MojoFailureException("Path name for attached artifact file has not been specified");
        }

        /*
         * NOTE: We do not want to test path translation here, so resolve relative paths manually.
         */
        File artifactFile = new File(attachedFile);
        if (!artifactFile.isAbsolute()) {
            artifactFile = new File(project.getBasedir(), attachedFile);
        }

        if (!artifactFile.exists()) {
            getLog().warn("[MAVEN-CORE-IT-LOG] Attached artifact file does not exist: " + artifactFile);
        }

        helper.attachArtifact(project, artifactType, artifactClassifier, artifactFile);

        getLog().info("[MAVEN-CORE-IT-LOG] Attached artifact file: " + artifactFile);
    }