SpoonLabs / astor

Automatic program repair for Java with generate-and-validate techniques :v::v:: jGenProg (2014) - jMutRepair (2016) - jKali (2016) - DeepRepair (2017) - Cardumen (2018) - 3sfix (2018)
https://hal.archives-ouvertes.fr/hal-01321615/document
GNU General Public License v2.0
205 stars 107 forks source link

Failed to execute goal on project astor: Could not resolve dependencies for project org.inria.sacha.automaticRepair:astor:jar:2.0.0: Failed to collect dependencies at com.gzoltar:gzoltar:jar:0.1.1 #351

Closed Mirijam1 closed 2 years ago

Mirijam1 commented 2 years ago

When I try to execute mvn install -DskipTests=true I get the following build error:

[WARNING] fil.iagl.cocospoon:CocoSpoon:1.0.0-SNAPSHOT/maven-metadata.xmlfailed to transfer from http://0.0.0.0/ during a previous attempt. This failure was cached in the local repository and resolution will not be reattempted until the update interval of maven-default-http-blocker has elapsed or updates are forced. Original error: Could not transfer metadata fil.iagl.cocospoon:CocoSpoon:1.0.0-SNAPSHOT/maven-metadata.xml from/to maven-default-http-blocker (http://0.0.0.0/): transfer failed for http://0.0.0.0/fil/iagl/cocospoon/CocoSpoon/1.0.0-SNAPSHOT/maven-metadata.xml [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8.019 s [INFO] Finished at: 2022-04-15T23:33:34+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal on project astor: Could not resolve dependencies for project org.inria.sacha.automaticRepair:astor:jar:2.0.0: Failed to collect dependencies at com.gzoltar:gzoltar:jar:0.1.1: Failed to read artifact descriptor for com.gzoltar:gzoltar:jar:0.1.1: Could not transfer artifact com.gzoltar:gzoltar:pom:0.1.1 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [inria (http://spoon.gforge.inria.fr/repositories/releases/, default, releases+snapshots), EvoSuite (http://www.evosuite.org/m2, default, releases+snapshots), sachaproject.gforge.inria.fr-release (http://sachaproject.gforge.inria.fr/repositories/releases/, default, releases+snapshots), maven.inria.fr-snapshot (http://maven.inria.fr/artifactory/spoon-public-snapshot/, default, releases+snapshots)] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException I assume the problem is in the POM file, however I do not know how to resolve this issue. The pom file contains: `<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0
<groupId>org.inria.sacha.automaticRepair</groupId>
<artifactId>astor</artifactId>
<description>ASTOR: AST transformation for Repairs</description>
<version>2.0.0</version>

<name>ASTOR</name>
<url>https://github.com/SpoonLabs/astor</url>

<licenses>
    <license>
        <name>GNU General Public License v3.0</name>
        <url>https://www.gnu.org/licenses/gpl.txt</url>
    </license>
</licenses>

<scm>
    <url>https://github.com/SpoonLabs/astor.git</url>
</scm>

<developers>
    <developer>
        <name>Matias Martinez</name>
        <email>matias.sebastian.martinez@gmail.com</email>
        <organization>University of Lille and Inria</organization>
    </developer>

    <developer>
        <name>Martin Monperrus</name>
        <email>martin.monperrus@univ-lille1.fr</email>
        <organization>University of Lille and Inria</organization>
    </developer>
</developers>

<properties>
    <maven.compiler.source>1.9</maven.compiler.source>
    <maven.compiler.target>1.9</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <github.global.server>github</github.global.server>
</properties>

<dependencies>

    <dependency>
        <groupId>com.github.spoonlabs</groupId>
        <artifactId>flacoco</artifactId>
        <version>1.0.3-SNAPSHOT</version>
    </dependency>

    <dependency>
        <!-- doc: https://logging.apache.org/log4j/2.0/faq.html -->
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-1.2-api</artifactId>
        <version>2.13.3</version>
    </dependency>
    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>2.13.3</version>
    </dependency>

    <dependency>
        <groupId>fr.inria.gforge.spoon</groupId>
        <artifactId>spoon-core</artifactId>
        <version>9.2.0-beta-1</version>
        <exclusions>
            <exclusion>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-to-slf4j</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

    <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>3.2.2</version>
    </dependency>

    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.5</version>
    </dependency>

    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
    </dependency>

    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-engine</artifactId>
        <version>5.3.2</version>
    </dependency>
    <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>5.3.2</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.gzoltar/com.gzoltar.cli -->
    <dependency>
        <groupId>com.gzoltar</groupId>
        <artifactId>com.gzoltar.cli</artifactId>
        <version>1.7.3</version>
    </dependency>

    <dependency>
        <groupId>com.gzoltar</groupId>
        <artifactId>com.gzoltar.core</artifactId>
        <version>1.7.3</version>
    </dependency>

    <dependency>
        <groupId>com.gzoltar</groupId>
        <artifactId>gzoltar</artifactId>
        <version>0.1.1</version>
    </dependency>

    <dependency>
        <groupId>commons-cli</groupId>
        <artifactId>commons-cli</artifactId>
        <version>1.4</version>
    </dependency>

    <dependency>
        <groupId>com.googlecode.json-simple</groupId>
        <artifactId>json-simple</artifactId>
        <version>1.1</version>
    </dependency>

    <dependency>
        <groupId>fil.iagl.cocospoon</groupId>
        <artifactId>CocoSpoon</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </dependency>

    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.8.2</version>
        <scope>compile</scope>
    </dependency>

</dependencies>

<repositories>
    <repository>
        <id>sonatype-snapshots</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <snapshots />
    </repository>
    <repository>
        <id>inria</id>
        <url>http://spoon.gforge.inria.fr/repositories/releases/</url>
    </repository>
    <repository>
        <id>spoon-snapshot</id>
        <name>maven repository for spoon snapshots</name>
        <url>https://repository.ow2.org/nexus/content/repositories/snapshots/</url>
        <snapshots />
    </repository>
    <repository>
        <id>EvoSuite</id>
        <name>EvoSuite Repository</name>
        <url>http://www.evosuite.org/m2</url>
    </repository>

    <repository>
        <id>sachaproject.gforge.inria.fr-release</id>
        <name>Maven Repository for Spoon Release</name>
        <url>http://sachaproject.gforge.inria.fr/repositories/releases/</url>
        <snapshots />
    </repository>

    <repository>
        <id>tdurieux.github.io/maven-repository/snapshots/</id>
        <name>tdurieux.github.io maven-repository</name>
        <url>https://tdurieux.github.io/maven-repository/snapshots/</url>
    </repository>

    <repository>
        <id>maven.inria.fr-snapshot</id>
        <name>Maven Repository for Spoon Artifac Snapshot</name>
        <url>http://maven.inria.fr/artifactory/spoon-public-snapshot/</url>
        <snapshots />
    </repository>
</repositories>

<build>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.0</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.2.4</version>
            <configuration>
                <filters>
                    <filter>
                        <artifact>*:*</artifact>
                        <excludes>
                            <exclude>module-info.class</exclude>
                            <exclude>META-INF/*.SF</exclude>
                            <exclude>META-INF/*.DSA</exclude>
                            <exclude>META-INF/*.RSA</exclude>
                            <exclude>**/Log4j2Plugins.dat</exclude>
                        </excludes>
                    </filter>
                </filters>
                <transformers>
                    <transformer
                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                        <mainClass>fr.inria.main.evolution.AstorMain</mainClass>
                    </transformer>
                </transformers>
                <shadedArtifactAttached>true</shadedArtifactAttached>
                <shadedClassifierName>jar-with-dependencies</shadedClassifierName>
                <createDependencyReducedPom>false</createDependencyReducedPom>
            </configuration>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <artifactId>maven-clean-plugin</artifactId>
            <version>3.0.0</version>
            <configuration>
                <filesets>
                    <fileset>
                        <directory>outputMutation</directory>
                        <followSymlinks>true</followSymlinks>
                    </fileset>
                </filesets>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.16</version>
            <configuration>
                <!-- force each test in a separate vm to work around a memory leak -->
                <reuseForks>false</reuseForks>
            </configuration>
        </plugin>
        <!-- Required for codecov.io -->
        <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>0.8.7</version>
            <executions>
                <execution>
                    <goals>
                        <goal>prepare-agent</goal>
                    </goals>
                </execution>
                <execution>
                    <id>report</id>
                    <phase>test</phase>
                    <goals>
                        <goal>report</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <!-- Required for automatic deploy -->
        <plugin>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>2.8.1</version>
        </plugin>
        <plugin>
            <groupId>com.github.github</groupId>
            <artifactId>site-maven-plugin</artifactId>
            <version>0.12</version>
            <configuration>
                <merge>true</merge>
                <message>Maven artifacts for ${project.artifactId}
                    ${project.version}</message>
                <noJekyll>true</noJekyll>
                <outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
                <branch>refs/heads/master</branch>
                <includes>
                    <include>**/*</include>
                </includes>
                <repositoryName>maven-repository</repositoryName>
                <repositoryOwner>tdurieux</repositoryOwner>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
                <execution>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>add-source</goal>
                    </goals>
                    <configuration>
                        <sources>
                            <source>src/main/java</source>
                            <source>src-core/main/java</source>
                            <source>src-jgenprog/main/java</source>
                            <source>src-jkali/main/java</source>
                            <source>src-jmutrepair/main/java</source>
                            <source>src-cardumen/main/java</source>
                            <source>src-deeprepair/main/java</source>
                            <source>src-3sfix/main/java</source>
                        </sources>
                    </configuration>
                </execution>
            </executions>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.16</version>
            <configuration>
                <!-- the following is required to have the same execution semantics 
                    as eclipse (hence all tests passing) -->
                <!-- the reason is that it switches Spoon in noclasspath or not for 
                    this particular file -->
                <useSystemClassLoader>false</useSystemClassLoader>
                <forkCount>1</forkCount>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>2.5.3</version>
            <configuration>
                <autoVersionSubmodules>true</autoVersionSubmodules>
                <useReleaseProfile>false</useReleaseProfile>
                <releaseProfiles>release</releaseProfiles>
                <goals>deploy</goals>
            </configuration>
        </plugin>

    </plugins>

</build>

<profiles>
    <profile>
        <id>release</id>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.2</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
                <!-- Source -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- Javadoc -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.4</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                            <configuration>
                                <additionalparam>-Xdoclint:none</additionalparam>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <!-- GPG -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.5</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

<distributionManagement>

    <repository>
        <id>ossrh</id>
        <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
        <id>ossrh-snapshot</id>
        <url>https://oss.sonatype.org/repositories/snapshots</url>
    </snapshotRepository>

</distributionManagement>

`

NicolasWalter commented 1 year ago

Hello @Mirijam1! I'm running into the same issue, how did you fix it? Thanks!

NicolasWalter commented 1 year ago

Was a problem at my end, solved doing https://stackoverflow.com/questions/67833372/getting-blocked-mirror-for-repositories-maven-error-even-after-adding-mirrors

martinezmatias commented 1 year ago

Hi @NicolasWalter Great, thanks for reporting the solution. Regards Matias