public void execute()

in core-it-support/core-it-plugins/maven-it-plugin-artifact/src/main/java/org/apache/maven/plugin/coreit/CollectMojo.java [93:127]


    public void execute() throws MojoExecutionException, MojoFailureException {
        getLog().info("[MAVEN-CORE-IT-LOG] Collecting artifacts");

        try {
            Artifact origin = factory.createArtifact("it", "it", "0.1", null, "pom");

            Set artifacts = new LinkedHashSet();

            if (dependencies != null) {
                for (Dependency dependency : dependencies) {
                    Artifact artifact = factory.createArtifactWithClassifier(
                            dependency.getGroupId(),
                            dependency.getArtifactId(),
                            dependency.getVersion(),
                            dependency.getType(),
                            dependency.getClassifier());

                    artifacts.add(artifact);

                    getLog().info("[MAVEN-CORE-IT-LOG] Collecting " + artifact.getId());
                }
            }

            collector.collect(
                    artifacts,
                    origin,
                    localRepository,
                    remoteRepositories,
                    metadataSource,
                    null,
                    Collections.EMPTY_LIST);
        } catch (Exception e) {
            throw new MojoExecutionException("Failed to collect artifacts: " + e.getMessage(), e);
        }
    }