Skip to content
Success

Console Output

Started by timer
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building remotely on sos-builder01-ubuntu18 (lin) in workspace /builds/workspace/AssertFixer
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] Done
The recommended git tool is: NONE
No credentials specified
Wiping out workspace first.
Cloning the remote Git repository
Cloning repository https://github.com/STAMP-project/AssertFixer.git
 > git init /builds/workspace/AssertFixer # timeout=10
Fetching upstream changes from https://github.com/STAMP-project/AssertFixer.git
 > git --version # timeout=10
 > git --version # 'git version 2.17.1'
 > git fetch --tags --progress -- https://github.com/STAMP-project/AssertFixer.git +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://github.com/STAMP-project/AssertFixer.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
Avoid second fetch
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
Checking out Revision 923c86599265bb5af99ed2ecd7089ea9335b3da3 (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 923c86599265bb5af99ed2ecd7089ea9335b3da3 # timeout=10
Commit message: "update pom"
 > git rev-list --no-walk 923c86599265bb5af99ed2ecd7089ea9335b3da3 # timeout=10
[AssertFixer] $ /bin/sh -xe /tmp/jenkins11124090121995476337.sh
+ curl https://gist.githubusercontent.com/monperrus/4bf62ca7bf369b73b01538b73d57e889/raw/inject_spoon_snapshot.py
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  2153  100  2153    0     0   9921      0 --:--:-- --:--:-- --:--:--  9921
+ python3 -c #! /bin/python3
"""Script for injecting the latest SNAPSHOT version of Spoon into all pom.xml
files it finds in the current working directory or any subdirectory.

Requires the ``defusedxml`` package to be installed separately.

This script is compatible with Python 3.5+
"""
import xml.etree.ElementTree as ET
import subprocess
import pathlib

from typing import Optional

SPOON_SNAPSHOT_REPO = """
<repository>
    <id>spoon-snapshot-repo</id>
    <name>Maven Repository for Spoon Snapshots</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    <snapshots/>
</repository>
"""
MAVEN_NAMESPACE = "http://maven.apache.org/POM/4.0.0"
NAMESPACES = {"": MAVEN_NAMESPACE}

MAVEN_VERSIONS_COMMAND = "mvn -B -U versions:use-latest-versions -DallowSnapshots -Dincludes=fr.inria.gforge.spoon".split()


def main():
    ET.register_namespace("", MAVEN_NAMESPACE)
    pom_file = pathlib.Path("pom.xml")
    inject_snapshot_repo(pom_file)
    subprocess.run(MAVEN_VERSIONS_COMMAND, cwd=str(pom_file.parent))



def inject_snapshot_repo(pom_file: pathlib.Path) -> None:
    tree = ET.parse(str(pom_file))
    root = tree.getroot()

    repositories = root.find(in_maven_namespace("repositories"))
    if not repositories:
        repositories = ET.fromstring("<repositories></repositories>")
        root.append(repositories)

    snapshot_repo = ET.fromstring(SPOON_SNAPSHOT_REPO)
    snapshot_repo_url = snapshot_repo.find("url").text

    for repo in repositories.findall(in_maven_namespace("repository")):
        url = repo.find(in_maven_namespace("url")).text
        if url == snapshot_repo_url:
            return

    repositories.append(snapshot_repo)

    tree.write(str(pom_file))


def in_maven_namespace(tag: str) -> str:
    """Wrap the tag in the default Maven namespace.

    If porting this script to Python 3.6+, then this method can be removed and
    one can instead search with a default namespace like so:

    someElement.find(tag, namespaces={"": MAVEN_NAMESPACE})

    This does not appear to work in Python 3.5
    """
    return "{{{}}}{}".format(MAVEN_NAMESPACE, tag)


if __name__ == "__main__":
    main()
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (21 kB at 44 kB/s)
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (14 kB at 30 kB/s)
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/versions-maven-plugin/maven-metadata.xml
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/versions-maven-plugin/maven-metadata.xml (1.3 kB at 88 kB/s)
[INFO] 
[INFO] -------------------< eu.stamp-project:assert-fixer >--------------------
[INFO] Building eu.stamp-project:assert-fixer 1.0.10-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- versions:2.18.0:use-latest-versions (default-cli) @ assert-fixer ---
[INFO] Downloading from spoon-snapshot-repo: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-core/maven-metadata.xml
[INFO] Downloading from central: https://repo.maven.apache.org/maven2/fr/inria/gforge/spoon/spoon-core/maven-metadata.xml
[INFO] Downloading from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-core/maven-metadata.xml
[INFO] Downloaded from central: https://repo.maven.apache.org/maven2/fr/inria/gforge/spoon/spoon-core/maven-metadata.xml (12 kB at 490 kB/s)
[INFO] Downloaded from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-core/maven-metadata.xml (292 B at 746 B/s)
[INFO] Downloaded from spoon-snapshot-repo: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-core/maven-metadata.xml (292 B at 735 B/s)
[INFO] Updated fr.inria.gforge.spoon:spoon-core:jar:10.1.0 to version 11.1.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.723 s
[INFO] Finished at: 2025-01-21T12:53:12+01:00
[INFO] ------------------------------------------------------------------------
+ mvn clean test
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO] 
[INFO] -------------------< eu.stamp-project:assert-fixer >--------------------
[INFO] Building eu.stamp-project:assert-fixer 1.0.10-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-core/11.1.1-SNAPSHOT/maven-metadata.xml
Progress (1): 1.4 kB
                    
Downloaded from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-core/11.1.1-SNAPSHOT/maven-metadata.xml (1.4 kB at 2.1 kB/s)
[INFO] Artifact fr.inria.gforge.spoon:spoon-core:pom:11.1.1-20250121.011336-1 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [spoon-snapshot-repo (https://oss.sonatype.org/content/repositories/snapshots/, default, releases+snapshots), sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots, default, snapshots), central (https://repo.maven.apache.org/maven2, default, releases)]
[INFO] Artifact fr.inria.gforge.spoon:spoon-core:pom:11.1.1-20250121.011336-1 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [spoon-snapshot-repo (https://oss.sonatype.org/content/repositories/snapshots/, default, releases+snapshots), sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots, default, snapshots), central (https://repo.maven.apache.org/maven2, default, releases)]
Downloading from spoon-snapshot-repo: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-core/11.1.1-SNAPSHOT/spoon-core-11.1.1-20250121.011336-1.pom
Downloaded from spoon-snapshot-repo: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-core/11.1.1-SNAPSHOT/spoon-core-11.1.1-20250121.011336-1.pom (0 B at 0 B/s)
Downloading from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-pom/11.1.1-SNAPSHOT/maven-metadata.xml
Progress (1): 609 B
                   
Downloaded from sonatype-nexus-snapshots: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-pom/11.1.1-SNAPSHOT/maven-metadata.xml (609 B at 6.0 kB/s)
[INFO] Artifact fr.inria.gforge.spoon:spoon-pom:pom:11.1.1-20250121.011900-1 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [spoon-snapshot-repo (https://oss.sonatype.org/content/repositories/snapshots/, default, releases+snapshots), sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots, default, snapshots), central (https://repo.maven.apache.org/maven2, default, releases)]
[INFO] Artifact fr.inria.gforge.spoon:spoon-pom:pom:11.1.1-20250121.011900-1 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [spoon-snapshot-repo (https://oss.sonatype.org/content/repositories/snapshots/, default, releases+snapshots), sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots, default, snapshots), central (https://repo.maven.apache.org/maven2, default, releases)]
Downloading from spoon-snapshot-repo: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-pom/11.1.1-SNAPSHOT/spoon-pom-11.1.1-20250121.011900-1.pom
Downloaded from spoon-snapshot-repo: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-pom/11.1.1-SNAPSHOT/spoon-pom-11.1.1-20250121.011900-1.pom (0 B at 0 B/s)
[INFO] Artifact fr.inria.gforge.spoon:spoon-core:jar:11.1.1-20250121.011336-1 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [spoon-snapshot-repo (https://oss.sonatype.org/content/repositories/snapshots/, default, releases+snapshots), sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots, default, snapshots), central (https://repo.maven.apache.org/maven2, default, releases)]
[INFO] Artifact fr.inria.gforge.spoon:spoon-core:jar:11.1.1-20250121.011336-1 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [spoon-snapshot-repo (https://oss.sonatype.org/content/repositories/snapshots/, default, releases+snapshots), sonatype-nexus-snapshots (https://oss.sonatype.org/content/repositories/snapshots, default, snapshots), central (https://repo.maven.apache.org/maven2, default, releases)]
Downloading from spoon-snapshot-repo: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-core/11.1.1-SNAPSHOT/spoon-core-11.1.1-20250121.011336-1.jar
Downloaded from spoon-snapshot-repo: https://oss.sonatype.org/content/repositories/snapshots/fr/inria/gforge/spoon/spoon-core/11.1.1-SNAPSHOT/spoon-core-11.1.1-20250121.011336-1.jar (0 B at 0 B/s)
[INFO] 
[INFO] --- clean:3.2.0:clean (default-clean) @ assert-fixer ---
[INFO] 
[INFO] --- enforcer:1.0:enforce (enforce-maven) @ assert-fixer ---
[INFO] 
[INFO] --- jacoco:0.8.7:prepare-agent (default) @ assert-fixer ---
[INFO] argLine set to -javaagent:/builds/.m2/repository/org/jacoco/org.jacoco.agent/0.8.7/org.jacoco.agent-0.8.7-runtime.jar=destfile=/builds/workspace/AssertFixer/target/jacoco.exec,excludes=**/fr/inria/spirals/test4repair/*
[INFO] 
[INFO] --- resources:3.3.1:resources (default-resources) @ assert-fixer ---
[INFO] Copying 1 resource from src/main/resources to target/classes
[INFO] 
[INFO] --- compiler:3.1:compile (default-compile) @ assert-fixer ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 12 source files to /builds/workspace/AssertFixer/target/classes
[WARNING] /builds/workspace/AssertFixer/src/main/java/eu/stamp/project/assertfixer/test/TestRunner.java: /builds/workspace/AssertFixer/src/main/java/eu/stamp/project/assertfixer/test/TestRunner.java uses or overrides a deprecated API that is marked for removal.
[WARNING] /builds/workspace/AssertFixer/src/main/java/eu/stamp/project/assertfixer/test/TestRunner.java: Recompile with -Xlint:removal for details.
[WARNING] /builds/workspace/AssertFixer/src/main/java/eu/stamp/project/assertfixer/test/TestRunner.java: Some input files use unchecked or unsafe operations.
[WARNING] /builds/workspace/AssertFixer/src/main/java/eu/stamp/project/assertfixer/test/TestRunner.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- resources:3.3.1:testResources (default-testResources) @ assert-fixer ---
[INFO] Copying 2 resources from src/test/resources to target/test-classes
[INFO] 
[INFO] --- compiler:3.1:testCompile (default-testCompile) @ assert-fixer ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 5 source files to /builds/workspace/AssertFixer/target/test-classes
[INFO] 
[INFO] --- surefire:3.2.5:test (default-test) @ assert-fixer ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  11.849 s
[INFO] Finished at: 2025-01-21T12:53:27+01:00
[INFO] ------------------------------------------------------------------------
WARNING: No GitHub config available for this job, GitHub Issue Notifier will not run! Error: Could not connect to GitHub repository. Please double-check that you have correctly configured a GitHub API key.
Finished: SUCCESS