alien-tools / maracas

Maracas is a source code and bytecode analysis framework⁠—written in Java with the help of Spoon—which analyzes how Java libraries evolve and how their evolution impacts their clients.
https://alien-tools.github.io/maracas/
MIT License
13 stars 2 forks source link

Artifact not found when building a standalone JAR from Maracas Core #88

Open nonsense-j opened 10 months ago

nonsense-j commented 10 months ago

I am trying to building a standalone JAR from Maracas Core with the instruction in README. After running command mvn clean compile assembly:single, I got an error as below( com.github.maracas:comp-changes-new:jar:0.0.1 and com.github.maracas:comp-changes-old:jar:0.0.1 is missing):

[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------< com.github.maracas:maracas-core >-------------------
[INFO] Building Maracas core implementation 0.6.0-SNAPSHOT
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo1.maven.org/maven2/com/github/maracas/comp-changes-old/0.0.1/comp-changes-old-0.0.1.pom
Downloading from github: https://maven.pkg.github.com/alien-tools/maracas/com/github/maracas/comp-changes-old/0.0.1/comp-changes-old-0.0.1.pom
[WARNING] The POM for com.github.maracas:comp-changes-old:jar:0.0.1 is missing, no dependency information available
Downloading from central: https://repo1.maven.org/maven2/com/github/maracas/comp-changes-new/0.0.1/comp-changes-new-0.0.1.pom
Downloading from github: https://maven.pkg.github.com/alien-tools/maracas/com/github/maracas/comp-changes-new/0.0.1/comp-changes-new-0.0.1.pom
[WARNING] The POM for com.github.maracas:comp-changes-new:jar:0.0.1 is missing, no dependency information available
Downloading from central: https://repo1.maven.org/maven2/com/github/maracas/comp-changes-old/0.0.1/comp-changes-old-0.0.1.jar
Downloading from central: https://repo1.maven.org/maven2/com/github/maracas/comp-changes-new/0.0.1/comp-changes-new-0.0.1.jar
Downloading from github: https://maven.pkg.github.com/alien-tools/maracas/com/github/maracas/comp-changes-old/0.0.1/comp-changes-old-0.0.1.jar
Downloading from github: https://maven.pkg.github.com/alien-tools/maracas/com/github/maracas/comp-changes-new/0.0.1/comp-changes-new-0.0.1.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  5.134 s
[INFO] Finished at: 2023-12-26T10:06:16+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project maracas-core: Could not resolve dependencies for project com.github.maracas:maracas-core:jar:0.6.0-SNAPSHOT: The following artifacts could not be resolved: com.github.maracas:comp-changes-old:jar:0.0.1 (absent), com.github.maracas:comp-changes-new:jar:0.0.1 (absent): Could not find artifact com.github.maracas:comp-changes-old:jar:0.0.1 in central (https://repo1.maven.org/maven2) -> [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

Repository setting in ~/.m2/settings.xml:

<repositories>
    <repository>
      <id>central</id>
      <url>https://repo1.maven.org/maven2</url>
    </repository>
    <repository>
      <id>github</id>
      <url>https://maven.pkg.github.com/alien-tools/maracas</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

The url https://maven.pkg.github.com/alien-tools/maracas seams to be not found.

tdegueul commented 10 months ago

Good catch. The multi-module build is a bit confusing right now. You have to install com.github.maracas:comp-changes-old and com.github.maracas:comp-changes-new first before you can run the assembly goal on core. This is how to do it:

$ cd maracas/
$ mvn clean install -DskipTests
$ cd core/
$ mvn assembly:single
$ java -jar target/maracas-core-0.6.0-SNAPSHOT-jar-with-dependencies.jar --help

We'll try to come up with a simpler process in the future.