Why can’t I find tags after 2.415 in the mvnrepository
https://mvnrepository.com/artifact/org.jenkins-ci.main/jenkins-core?repo=jenkins-releases
mvnrepository.com mirrors the Jenkins repository entries. If you are looking for something specific, I recommend using Index of public/
I want to parse Jenkins’ related dependencies through mvnrepository
Hello @920526640 and welcome to this community.
I’m not % sure that I got what you’re looking for, but let me try something.
You could generate a dependency tree and save it to a file using the Apache Maven command-line tool. Additionally, you can specify the Jenkins version as a command-line parameter so that you don’t need to create a separate file for each version.
Here’s how you could do it:
- Create a
pom.xml
Template: Create apom.xml
template that includes a placeholder for the Jenkins version. You can use the${jenkins.version}
variable to represent the version.
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>my.jenkins.dependencies</groupId>
<artifactId>jenkins-dependencies</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<jenkins.version>${jenkins.version}</jenkins.version>
</properties>
<dependencies>
<!-- Jenkins Core -->
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-core</artifactId>
<version>${jenkins.version}</version>
</dependency>
<!-- Add other Jenkins-related dependencies as needed -->
</dependencies>
<repositories>
<repository>
<id>jenkins-releases</id>
<url>https://repo.jenkins-ci.org/public/</url>
</repository>
</repositories>
</project>
- Create a Shell Script : Create a shell script (e.g.,
generate_dependencies.sh
) to generate the dependency tree and save it to a file. This script takes the Jenkins version as a command-line parameter.
#!/bin/bash
# Check if the Jenkins version is provided as a command-line argument
if [ $# -ne 1 ]; then
echo "Usage: $0 <jenkins_version>"
exit 1
fi
# Set the Jenkins version from the command-line argument
jenkins_version="$1"
# Create a temporary POM file with the Jenkins version
pom_file="pom-${jenkins_version}.xml"
cp pom.xml "${pom_file}"
sed -i "s|\${jenkins.version}|${jenkins_version}|" "${pom_file}"
# Generate the dependency tree and save it to a file
mvn dependency:tree -f "${pom_file}" > "dependencies-${jenkins_version}.txt"
# Clean up the temporary POM file
rm "${pom_file}"
echo "Dependency tree for Jenkins ${jenkins_version} saved to dependencies-${jenkins_version}.txt"
- Make the Script Executable : Make the script executable using the
chmod
command:
chmod +x generate_dependencies.sh
- Run the Script : Run the script with the desired Jenkins version as a parameter to generate the dependency tree and save it to a file:
./generate_dependencies.sh 2.415
This will create a file named dependencies-2.415.txt
containing the dependency tree for the specified Jenkins version.
You should be able to use this script to generate dependency trees for different Jenkins versions without creating separate POM files for each version. Just provide the desired version as a command-line argument when running the script.
When using 2.415
as an argument, I got something like:
[INFO] my.jenkins.dependencies:jenkins-dependencies:jar:1.0-SNAPSHOT
[INFO] \- org.jenkins-ci.main:jenkins-core:jar:2.415:compile
[INFO] +- org.jenkins-ci.main:cli:jar:2.415:compile
[INFO] +- org.jenkins-ci.main:remoting:jar:3131.vf2b_b_798b_ce99:compile
[INFO] +- args4j:args4j:jar:2.33:compile
[INFO] +- com.github.spotbugs:spotbugs-annotations:jar:4.7.3:compile
[INFO] +- com.google.guava:guava:jar:32.1.1-jre:compile
[INFO] | +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] | \- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] +- com.google.inject:guice:jar:6.0.0:compile
[INFO] | +- javax.inject:javax.inject:jar:1:compile
[INFO] | \- jakarta.inject:jakarta.inject-api:jar:2.0.1:compile
[INFO] +- com.infradna.tool:bridge-method-annotation:jar:1.27:compile
[INFO] +- com.jcraft:jzlib:jar:1.1.3-kohsuke-1:compile
[INFO] +- com.sun.solaris:embedded_su4j:jar:1.1:compile
[INFO] +- com.sun.xml.txw2:txw2:jar:20110809:compile
[INFO] | \- relaxngDatatype:relaxngDatatype:jar:20020414:compile
[INFO] +- com.thoughtworks.xstream:xstream:jar:1.4.20:compile
[INFO] | \- io.github.x-stream:mxparser:jar:1.2.2:compile
[INFO] +- commons-beanutils:commons-beanutils:jar:1.9.4:compile
[INFO] | \- commons-logging:commons-logging:jar:1.2:compile
[INFO] +- commons-codec:commons-codec:jar:1.16.0:compile
[INFO] +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.5:compile
[INFO] +- commons-io:commons-io:jar:2.13.0:compile
[INFO] +- commons-jelly:commons-jelly-tags-fmt:jar:1.0:compile
[INFO] +- commons-jelly:commons-jelly-tags-xml:jar:1.1:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- io.jenkins.stapler:jenkins-stapler-support:jar:1.1:compile
[INFO] +- jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:jar:1.2.7:compile
[INFO] +- jaxen:jaxen:jar:2.0.0:compile
[INFO] +- jline:jline:jar:2.14.6:compile
[INFO] +- net.java.dev.jna:jna:jar:5.13.0:compile
[INFO] +- net.java.sezpoz:sezpoz:jar:1.13:compile
[INFO] +- net.jcip:jcip-annotations:jar:1.0:compile
[INFO] +- net.sf.kxml:kxml2:jar:2.3.0:compile
[INFO] +- org.antlr:antlr4-runtime:jar:4.13.0:compile
[INFO] +- org.apache.ant:ant:jar:1.10.13:compile
[INFO] | \- org.apache.ant:ant-launcher:jar:1.10.13:compile
[INFO] +- org.apache.commons:commons-compress:jar:1.23.0:compile
[INFO] +- org.codehaus.groovy:groovy-all:jar:2.4.21:compile
[INFO] +- org.connectbot.jbcrypt:jbcrypt:jar:1.0.0:compile
[INFO] +- org.fusesource.jansi:jansi:jar:1.11:compile
[INFO] +- org.jenkins-ci:annotation-indexer:jar:1.17:compile
[INFO] +- org.jenkins-ci:commons-jexl:jar:1.1-jenkins-20111212:compile
[INFO] +- org.jenkins-ci:crypto-util:jar:1.9:compile
[INFO] +- org.jenkins-ci:memory-monitor:jar:1.12:compile
[INFO] +- org.jenkins-ci:symbol-annotation:jar:1.24:compile
[INFO] +- org.jenkins-ci:task-reactor:jar:1.8:compile
[INFO] +- org.jenkins-ci:version-number:jar:1.11:compile
[INFO] +- org.jenkins-ci.main:websocket-spi:jar:2.415:compile
[INFO] +- org.jfree:jfreechart:jar:1.0.19:compile
[INFO] | \- org.jfree:jcommon:jar:1.0.23:compile
[INFO] +- org.jvnet.hudson:commons-jelly-tags-define:jar:1.1-jenkins-20230713:compile
[INFO] +- org.jvnet.localizer:localizer:jar:1.31:compile
[INFO] +- org.jvnet.robust-http-client:robust-http-client:jar:1.2:compile
[INFO] +- org.jvnet.winp:winp:jar:1.30:compile
[INFO] +- org.kohsuke:access-modifier-annotation:jar:1.32:compile
[INFO] +- org.kohsuke:windows-package-checker:jar:1.2:compile
[INFO] +- org.kohsuke.jinterop:j-interop:jar:2.0.8-kohsuke-1:compile
[INFO] | \- org.kohsuke.jinterop:j-interopdeps:jar:2.0.8-kohsuke-1:compile
[INFO] | \- org.samba.jcifs:jcifs:jar:1.2.19:compile
[INFO] +- org.kohsuke.stapler:json-lib:jar:2.4-jenkins-3:compile
[INFO] | \- net.sf.ezmorph:ezmorph:jar:1.0.6:compile
[INFO] +- org.kohsuke.stapler:stapler:jar:1802.v9e2750160d01:compile
[INFO] | +- commons-discovery:commons-discovery:jar:0.5:compile
[INFO] | +- jakarta.annotation:jakarta.annotation-api:jar:2.1.1:compile
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | \- org.jvnet:tiger-types:jar:2.2:compile
[INFO] +- org.kohsuke.stapler:stapler-adjunct-codemirror:jar:1.3:compile
[INFO] +- org.kohsuke.stapler:stapler-adjunct-timeline:jar:1.5:compile
[INFO] +- org.kohsuke.stapler:stapler-groovy:jar:1802.v9e2750160d01:compile
[INFO] | \- org.kohsuke.stapler:stapler-jelly:jar:1802.v9e2750160d01:compile
[INFO] | +- org.dom4j:dom4j:jar:2.1.4:compile
[INFO] | \- org.jenkins-ci:commons-jelly:jar:1.1-jenkins-20230124:compile
[INFO] +- org.ow2.asm:asm:jar:9.5:compile
[INFO] +- org.ow2.asm:asm-analysis:jar:9.5:compile
[INFO] +- org.ow2.asm:asm-commons:jar:9.5:compile
[INFO] +- org.ow2.asm:asm-tree:jar:9.5:compile
[INFO] +- org.ow2.asm:asm-util:jar:9.5:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:2.0.7:compile
[INFO] | \- org.slf4j:slf4j-api:jar:2.0.7:compile
[INFO] +- org.slf4j:log4j-over-slf4j:jar:2.0.7:compile
[INFO] +- org.springframework.security:spring-security-web:jar:5.8.4:compile
[INFO] | +- org.springframework.security:spring-security-core:jar:5.8.4:compile
[INFO] | | \- org.springframework.security:spring-security-crypto:jar:5.8.4:compile
[INFO] | +- org.springframework:spring-core:jar:5.3.28:compile
[INFO] | +- org.springframework:spring-aop:jar:5.3.28:compile
[INFO] | +- org.springframework:spring-beans:jar:5.3.28:compile
[INFO] | +- org.springframework:spring-context:jar:5.3.28:compile
[INFO] | +- org.springframework:spring-expression:jar:5.3.28:compile
[INFO] | \- org.springframework:spring-web:jar:5.3.28:compile
[INFO] \- xpp3:xpp3:jar:1.1.4c:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.634 s
[INFO] Finished at: 2023-09-04T09:51:37+02:00
[INFO] ------------------------------------------------------------------------