Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maven dependencies not publishing to buildInfo #87

Open
javamllama opened this issue Jan 9, 2024 · 0 comments
Open

maven dependencies not publishing to buildInfo #87

javamllama opened this issue Jan 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@javamllama
Copy link

Describe the bug

When I have a pom.xml that has dependencies declared (see example below) and I run the
mvn artifactory:publish -Dpublish.record.all.dependencies=true (with the other required flags enabled too)
it is not adding the dependencies to the buildInfo record in artifactory.

Note: I tested this with 3.6.0, 3.6.1, and 3.6.2 of the build-info plugin and none of them seem to work.

See source code link for config option here: https://github.com/jfrog/build-info/blob/master/build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/ClientConfigurationFields.java#L38C39-L38C62

example pom:

<?xml version="1.0" encoding="UTF-8"?>
<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>com.myapp</groupId>
    <artifactId>mymavenapp</artifactId>
    <packaging>jar</packaging>
    <version>1.0</version>
    <name>mymavenapp</name>
    <url>https://github.com/myapp/mymavenapp</url>

    <properties>
        <java.version>11</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.11</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.3.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.10.1</version>
                <configuration>
                        <!-- <release>10</release> -->
                        <source>1.8</source>
                        <target>1.8</target>
                        <!-- <executable>/usr/lib/jvm/java-11-openjdk-amd64/bin/javac</executable> -->
                        <!-- <enablePreview>true</enablePreview> -->
                </configuration>
            </plugin>
            <!-- This is just to make sure the class is set as main class to execute from the jar-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.1.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer
                                        implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                                <transformer
                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>edu.forty.bits.expression.SwitchExpressions</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
            
  

Current behavior

publishes buildInfo but no dependencies included.

Reproduction steps

No response

Expected behavior

publishes dependencies with artifact modules in buildInfo similar to 2.x plugin behavior

Artifactory Maven plugin version

3.6.x

Operating system type and version

windows and RHE

JFrog Artifactory version

7.63.14

Maven version

3.9.6

@javamllama javamllama added the bug Something isn't working label Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant