jfrog-cli icon indicating copy to clipboard operation
jfrog-cli copied to clipboard

Maven install misses poms with newer maven plugins

Open jvalkeal opened this issue 3 years ago β€’ 1 comments

Describe the bug Deploy to artifactory and only jar is uploaded. Spring boot 3.x upgraded to use 3.0.0 of maven-deploy-plugin and maven-install-plugin. It looks like with these plugin versions build info recording doesn't work and thus pom is not uploaded.

I assume this issue is about these maven plugin versions as taking skeleton project using boot 2.7.2 works just fine.

To Reproduce Simple boot 3 skeleton project from start.spring.io

I have local artifactory to test and just configured project with:

jf rt mvnc \
  --server-id-deploy=local \
  --repo-deploy-releases=libs-snapshot \
  --repo-deploy-snapshots=libs-snapshot

Artifactory or jf cli version doesn't seem to matter as we're seeing this also in repo.spring.io.

Expected behavior Both jar and pom should get deployed.

Versions jf version 2.21.5

Additional context

$ jf rt mvn clean install -B -DskipTests
13:00:40 [🟠Warn] You are using a deprecated syntax of the command.
	The new command syntax is quite similar to the syntax used by the native maven client.
	All you need to do is to add 'jf' as a prefix to the command.
	For example:
	$ jf mvn ...
	The --build-name and --build-number options are still supported.
13:00:40 [πŸ”΅Info] The build-info-extractor jar is not cached locally. Downloading it now...
 You can set the repository from which this jar is downloaded. Read more about it at https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-DownloadingtheMavenandGradleExtractorJARs
13:00:40 [πŸ”΅Info] Downloading build-info-extractor from https://releases.jfrog.io/artifactory/oss-release-local/org/jfrog/buildinfo/build-info-extractor-maven3/2.36.2/build-info-extractor-maven3-2.36.2-uber.jar
13:00:44 [πŸ”΅Info] Running Mvn...
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Scanning for projects...
[main] INFO org.jfrog.build.extractor.maven.BuildInfoRecorder - Initializing Artifactory Build-Info Recording
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --------------------------< com.example:demo >--------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Building demo 0.0.1-SNAPSHOT
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --------------------------------[ jar ]---------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-clean-plugin:3.2.0:clean (default-clean) @ demo ---
[main] INFO org.apache.maven.plugins.clean.CleanMojo - Deleting /home/jvalkealahti/work/artifactory/mess/demo/target
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-resources-plugin:3.2.0:resources (default-resources) @ demo ---
[main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - Using 'UTF-8' encoding to copy filtered resources.
[main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - Using 'UTF-8' encoding to copy filtered properties files.
[main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - Copying 1 resource
[main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - Copying 0 resource
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-compiler-plugin:3.10.1:compile (default-compile) @ demo ---
[main] INFO org.apache.maven.plugin.compiler.CompilerMojo - Changes detected - recompiling the module!
[main] INFO org.codehaus.plexus.compiler.javac.JavacCompiler - Compiling 1 source file to /home/jvalkealahti/work/artifactory/mess/demo/target/classes
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ demo ---
[main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - Using 'UTF-8' encoding to copy filtered resources.
[main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - Using 'UTF-8' encoding to copy filtered properties files.
[main] INFO org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering - skip non existing resourceDirectory /home/jvalkealahti/work/artifactory/mess/demo/src/test/resources
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) @ demo ---
[main] INFO org.apache.maven.plugin.compiler.TestCompilerMojo - Changes detected - recompiling the module!
[main] INFO org.codehaus.plexus.compiler.javac.JavacCompiler - Compiling 1 source file to /home/jvalkealahti/work/artifactory/mess/demo/target/test-classes
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-surefire-plugin:2.22.2:test (default-test) @ demo ---
[main] INFO org.apache.maven.plugin.surefire.SurefirePlugin - Tests are skipped.
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-jar-plugin:3.2.2:jar (default-jar) @ demo ---
[main] INFO org.codehaus.plexus.archiver.jar.JarArchiver - Building jar: /home/jvalkealahti/work/artifactory/mess/demo/target/demo-0.0.1-SNAPSHOT.jar
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- spring-boot-maven-plugin:3.0.0-SNAPSHOT:repackage (repackage) @ demo ---
[main] INFO org.springframework.boot.maven.RepackageMojo - Replacing main artifact with repackaged archive
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - 
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - --- maven-install-plugin:3.0.0:install (default-install) @ demo ---
[main] INFO org.codehaus.plexus.PlexusContainer - Installing /home/jvalkealahti/work/artifactory/mess/demo/pom.xml to /home/jvalkealahti/.m2/repository/com/example/demo/0.0.1-SNAPSHOT/demo-0.0.1-SNAPSHOT.pom
[main] INFO org.codehaus.plexus.PlexusContainer - Installing /home/jvalkealahti/work/artifactory/mess/demo/target/demo-0.0.1-SNAPSHOT.jar to /home/jvalkealahti/.m2/repository/com/example/demo/0.0.1-SNAPSHOT/demo-0.0.1-SNAPSHOT.jar
[pool-2-thread-1] INFO org.jfrog.build.extractor.maven.ArtifactoryManagerBuilder - [pool-2-thread-1] Deploying artifact: http://localhost:8081/artifactory/libs-snapshot/com/example/demo/0.0.1-SNAPSHOT/demo-0.0.1-SNAPSHOT.jar
[main] INFO org.jfrog.build.extractor.maven.BuildDeploymentHelper - Artifactory Build Info Recorder: publish build info set to false, build info will not be published...
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD SUCCESS
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time:  2.922 s
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2022-07-27T13:00:48+01:00
[main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
[main] WARNING org.apache.maven.DefaultMaven - The requested profile "spring" could not be activated because it does not exist.
13:00:48 [πŸ”΅Info] These files were uploaded:

πŸ“¦ libs-snapshot
└── πŸ“ com
    └── πŸ“ example
        └── πŸ“ demo
            └── πŸ“ 0.0.1-SNAPSHOT
                └── πŸ“„ demo-0.0.1-20220727.120045-1.jar

{
  "status": "success",
  "totals": {
    "success": 1,
    "failure": 0
  }
}

jvalkeal avatar Jul 27 '22 12:07 jvalkeal

Any update on this problem? I'm seeing this problem too.

hsoehalim avatar Mar 11 '24 15:03 hsoehalim