Open slawekjaranowski opened 8 years ago
Hi @slawekjaranowski , There are 2 configuration issues in the plugin DSL configured in your pom.xml. Fixing them solves the issue. This is the current configuration:
<build>
<plugins>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>2.4.0</version>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
</execution>
</executions>
<configuration>
<publisher>
<contextUrl>http://localhost/</contextUrl>
<repoKey>release-local</repoKey>
<snapshotRepoKey>snapshot-local</snapshotRepoKey>
<username>deployer</username>
<password>deployerpas</password>
</publisher>
</configuration>
</plugin>
</plugins>
</build>
You'll need to add the inherited tag to the DSL
<inherited>false</inherited>
Also, the configuration tag should be inside the execution tag. After fixing these issues, your plugin configuration should look like this:
<build>
<plugins>
<plugin>
<groupId>org.jfrog.buildinfo</groupId>
<artifactId>artifactory-maven-plugin</artifactId>
<version>2.4.0</version>
<inherited>false</inherited>
<executions>
<execution>
<id>build-info</id>
<goals>
<goal>publish</goal>
</goals>
<configuration>
<publisher>
<contextUrl>http://localhost:8080/artifactory</contextUrl>
<repoKey>libs-release-local</repoKey>
<snapshotRepoKey>libs-snapshot-local</snapshotRepoKey>
<username>admin</username>
<password>password</password>
</publisher>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
We recommend using the following references when configuring the plugin:
Proposed solution with disabled configuration inheritance is not acceptable for us.
We have many projects which use artifactory, and we have one project called "Super POM" where we have global configuration.
So when we disable configuration inheritance we must copy configuration from one place to many other projects. Of course it will produce many work with maintenance.
Do you have another proposition how to maintain configuration for artifactory in one place for many projects?
Thanks for sharing this input @slawekjaranowski. We will work on finding a solution for this issue.
I am running into the same limitation. We have a parent POM other projects are supposed to use, which is why we can't disable inheritance. Looking at the code I was assuming that to work but I am also running into the stack overflow.
A quick Google search reveals some blog post outlining how to build a plugin that only runs in the project root.
I recently ran into this issue as well on this project.
Everything was working as expected until this commit : travis build which consist to upgrade the version a plugin in a sub module
Reverting the commit fixed it : travis build
Going deeper, upgrading the version to the root POM of the project definitively fix it so that I was able to re enable the reverted commit : travis build
Hope this could help to diagnose this issue.
Hi @slawekjaranowski, @drautureau-sonarsource, @olivergierke, We have released a new version (2.6.0) of the Maven Artifactory plugin which includes the fix for this issue. You are welcome to use it.
thanks @romangurevitch for the notification.
FYI, I just tried it and I am getting this error:
[ERROR] Failed to execute goal org.jfrog.buildinfo:artifactory-maven-plugin:2.6.0:publish (build-info) on project sonarqube: Execution build-info of goal org.jfrog.buildinfo:artifactory-maven-plugin:2.6.0:publish failed: Plugin org.jfrog.buildinfo:artifactory-maven-plugin:2.6.0 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.jfrog.buildinfo:build-info-api:jar:2.6.x-SNAPSHOT, org.jfrog.buildinfo:build-info-extractor-maven3:jar:2.6.x-SNAPSHOT: Could not find artifact org.jfrog.buildinfo:build-info-api:jar:2.6.x-SNAPSHOT -> [Help 1]
Thanks @drautureau-sonarsource, We have fixed the dependencies, you can use it now.
Did you redeployed same version of artifact on JCenter ? If so, users will have to remove it from their Artifactory/Nexus/Archiva but also from local repositories on build machines/slaves.
BTW, I confirm that it fixes my use case (after removing the JCenter cache from the Artifactory instance). 2.6.1 would be welcome to avoid any confusion ! Thanks
Thanks @hgomez-sonarsource , @drautureau-sonarsource, Your feedback is very valuable and welcome. We have released new version, 2.6.1.
<executions> <execution> <id>build-info</id> <goals> <goal>publish</goal> </goals> <configuration> <publisher> <contextUrl>http://localhost:8080/artifactory</contextUrl> <repoKey>libs-release-local</repoKey> <snapshotRepoKey>libs-snapshot-local</snapshotRepoKey> <username>admin</username> <password>password</password> </publisher> </configuration> </execution> </executions>
I'm facing the same issue what is the solution?
In maven project with many modules and if one of them we use plugin as extension during "deploy" we got StackOverflowError.
Build generate many logs and don't stop.
You can test example project: https://github.com/PayU-Tech/artifactory-test
Fragment of log: