Reputation: 551
I have a tar.gz artifact that gets uploaded to Artifactory using Jenkins. Since this artifact is not based on a Maven project, there is no pom file and thus no maven-metadata.xml being generated in Artifactory. The latter being very useful for versioning, etc.
Is there any way to have Jenkins generate a pom file for a non-Maven project?
Upvotes: 1
Views: 1109
Reputation: 11
With a manual deploy on artifactory you can generate a pom.xml ,unfortunately this option is not available on the jenkins artifactory's plugin, but you can maybe create you own shell script , like :
#!/bin/bash
groupId=com.mycompany
artifactId=myproject
version=1.0.0
echo '<?xml version="1.0" encoding="UTF-8"?> <project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>'$groupId'</groupId>
<artifactId>'$artifactId'</artifactId>
<version>'$version'</version>
<description>Artifactory auto generated POM</description>
</project>' >> pom.xml
Anyway depending on your build tool and how you create the tar.gz package you can may be find more solutions ..
Regards
Upvotes: 1