|
59 | 59 | <!-- final name of the generated debian and rpm package --> |
60 | 60 | <package.name>${artifactId}</package.name> |
61 | 61 |
|
| 62 | + <!-- properties used for artifact upload on artifactory repository --> |
| 63 | + <kura.repo.distribution>CHANGEME</kura.repo.distribution> |
| 64 | + <kura.repo.module>CHANGEME</kura.repo.module> |
| 65 | + |
62 | 66 | <!-- edit following fields and file deb/control/control --> |
63 | 67 | <summary>Summary line (do not end this line with a dot, max 60 chars)</summary> |
64 | 68 | <long.description>Here goes the long description of the packages, in this case this is an example addon for the Eclipse Kura Framework.</long.description> |
65 | 69 | </properties> |
66 | 70 |
|
| 71 | + <profiles> |
| 72 | + <!-- Internal profile: FOR INTERNAL USE ONLY - active if -DreleaseBuild is *not* specified. --> |
| 73 | + <profile> |
| 74 | + <id>debugBuild</id> |
| 75 | + <activation> |
| 76 | + <property> |
| 77 | + <name>!releaseBuild</name> |
| 78 | + </property> |
| 79 | + </activation> |
| 80 | + <properties> |
| 81 | + <maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format> |
| 82 | + <package.snapshot>git${maven.build.timestamp}.${git.commit.id.abbrev}</package.snapshot> |
| 83 | + |
| 84 | + <package.version>${release.version}~${package.snapshot}</package.version> |
| 85 | + <package.revision>1</package.revision> |
| 86 | + </properties> |
| 87 | + </profile> |
| 88 | + <!-- Internal profile: FOR INTERNAL USE ONLY - active if -DreleaseBuild *is* specified. --> |
| 89 | + <profile> |
| 90 | + <id>releaseBuild</id> |
| 91 | + <activation> |
| 92 | + <property> |
| 93 | + <name>releaseBuild</name> |
| 94 | + </property> |
| 95 | + </activation> |
| 96 | + <properties> |
| 97 | + <package.version>${release.version}</package.version> |
| 98 | + <package.revision>1</package.revision> |
| 99 | + </properties> |
| 100 | + <build> |
| 101 | + <plugins> |
| 102 | + <plugin> |
| 103 | + <groupId>org.apache.maven.plugins</groupId> |
| 104 | + <artifactId>maven-enforcer-plugin</artifactId> |
| 105 | + <version>3.5.0</version> |
| 106 | + <executions> |
| 107 | + <execution> |
| 108 | + <id>enforce-no-snapshots</id> |
| 109 | + <goals> |
| 110 | + <goal>enforce</goal> |
| 111 | + </goals> |
| 112 | + <configuration> |
| 113 | + <rules> |
| 114 | + <requireReleaseVersion> |
| 115 | + <message>No snapshots allowed for release builds!</message> |
| 116 | + </requireReleaseVersion> |
| 117 | + </rules> |
| 118 | + <fail>true</fail> |
| 119 | + </configuration> |
| 120 | + </execution> |
| 121 | + </executions> |
| 122 | + </plugin> |
| 123 | + </plugins> |
| 124 | + </build> |
| 125 | + </profile> |
| 126 | + </profiles> |
| 127 | + |
67 | 128 | <build> |
68 | 129 | <plugins> |
| 130 | + <!-- Responsible for removing the "-SNAPSHOT" from the project.version --> |
| 131 | + <plugin> |
| 132 | + <groupId>org.codehaus.mojo</groupId> |
| 133 | + <artifactId>build-helper-maven-plugin</artifactId> |
| 134 | + <version>3.6.0</version> |
| 135 | + <executions> |
| 136 | + <execution> |
| 137 | + <id>regex-property</id> |
| 138 | + <goals> |
| 139 | + <goal>regex-property</goal> |
| 140 | + </goals> |
| 141 | + <configuration> |
| 142 | + <name>release.version</name> |
| 143 | + <value>${project.version}</value> |
| 144 | + <regex>-SNAPSHOT</regex> |
| 145 | + <replacement></replacement> |
| 146 | + <failIfNoMatch>false</failIfNoMatch> |
| 147 | + </configuration> |
| 148 | + </execution> |
| 149 | + </executions> |
| 150 | + </plugin> |
| 151 | + |
| 152 | + <!-- Responsible for retrieving the short git commit (defaults to length 7)--> |
| 153 | + <plugin> |
| 154 | + <groupId>io.github.git-commit-id</groupId> |
| 155 | + <artifactId>git-commit-id-maven-plugin</artifactId> |
| 156 | + <version>9.0.1</version> |
| 157 | + <executions> |
| 158 | + <execution> |
| 159 | + <id>get-the-git-infos</id> |
| 160 | + <goals> |
| 161 | + <goal>revision</goal> |
| 162 | + </goals> |
| 163 | + <phase>initialize</phase> |
| 164 | + </execution> |
| 165 | + </executions> |
| 166 | + <configuration> |
| 167 | + <injectAllReactorProjects>true</injectAllReactorProjects> |
| 168 | + <generateGitPropertiesFile>false</generateGitPropertiesFile> |
| 169 | + <skipPoms>false</skipPoms> |
| 170 | + <includeOnlyProperties> |
| 171 | + <includeOnlyProperty>^git.commit.id.abbrev$</includeOnlyProperty> |
| 172 | + </includeOnlyProperties> |
| 173 | + </configuration> |
| 174 | + </plugin> |
69 | 175 | <plugin> |
70 | 176 | <groupId>com.coderplus.maven.plugins</groupId> |
71 | 177 | <artifactId>copy-rename-maven-plugin</artifactId> |
|
98 | 204 | </goals> |
99 | 205 | <configuration> |
100 | 206 | <verbose>true</verbose> |
101 | | - <deb>${basedir}/target/deb/${package.name}_${project.version}_${deb.architecture}.deb</deb> |
| 207 | + <deb>${basedir}/target/deb/${package.name}_${package.version}-${package.revision}_${deb.architecture}.deb</deb> |
| 208 | + <snapshotExpand>true</snapshotExpand> |
| 209 | + <snapshotTemplate>${package.snapshot}</snapshotTemplate> |
102 | 210 | <controlDir>${project.basedir}/deb/control</controlDir> |
103 | 211 | <skipPOMs>false</skipPOMs> |
104 | 212 | <dataSet> |
|
119 | 227 | </mapper> |
120 | 228 | </data> |
121 | 229 |
|
122 | | - <!-- |
123 | | - |
| 230 | + <!-- |
| 231 | +
|
124 | 232 | If all the source file are managed in the same way, it is also |
125 | 233 | possible to specify a 'directory' data type to include all the files |
126 | 234 | present in the specify path |
127 | | - |
| 235 | +
|
128 | 236 | <data> |
129 | 237 | <src>${basedir}/target/input_files</src> |
130 | 238 | <dst>${jar.name}_${project.version}.jar</dst> |
|
137 | 245 | <filemode>600</filemode> |
138 | 246 | </mapper> |
139 | 247 | </data> |
140 | | - |
| 248 | +
|
141 | 249 | --> |
142 | 250 | </dataSet> |
143 | 251 | </configuration> |
|
166 | 274 | <description>${long.description}</description> |
167 | 275 | <license>EPL 2.0 (https://www.eclipse.org/legal/epl-2.0/)</license> |
168 | 276 |
|
| 277 | + <projversion>${package.version}</projversion> |
| 278 | + <release>${package.revision}</release> |
| 279 | + |
| 280 | + <requires> |
| 281 | + <require>kura-core >= 6.0.0~, kura-core < 7.0.0~</require> |
| 282 | + </requires> |
| 283 | + |
169 | 284 | <mappings> |
170 | 285 | <!-- Repeate the 'mapping' schema multiple time if you want to |
171 | 286 | manage different files indipendentely, specifying for each one the |
|
188 | 303 | </sources> |
189 | 304 | </mapping> |
190 | 305 |
|
191 | | - <!-- |
192 | | - |
| 306 | + <!-- |
| 307 | +
|
193 | 308 | If all the source file are managed in the same way, it is also possible to specify the path to a |
194 | 309 | directory to include all the files present in that |
195 | | - |
| 310 | +
|
196 | 311 | <mapping> |
197 | 312 | <directory>${addon.installation.dir}</directory> |
198 | 313 | <filemode>600</filemode> |
|
205 | 320 | </source> |
206 | 321 | </sources> |
207 | 322 | </mapping> |
208 | | - |
| 323 | +
|
209 | 324 | --> |
210 | 325 | </mappings> |
211 | 326 |
|
|
0 commit comments