|
53 | 53 | <izpack.installation.info.appversion>${project.version}</izpack.installation.info.appversion> |
54 | 54 | <izpack.installation.info.author.name>${project.organization.name}</izpack.installation.info.author.name> |
55 | 55 | <izpack.installation.info.author.email>${contact.email}</izpack.installation.info.author.email> |
| 56 | + |
| 57 | + <!-- This module has no Java sources. Suppress the real source/javadoc plugins |
| 58 | + activated by the release-build profile; placeholder JARs are produced |
| 59 | + instead to satisfy Maven Central requirements. --> |
| 60 | + <maven.source.skip>true</maven.source.skip> |
| 61 | + <maven.javadoc.skip>true</maven.javadoc.skip> |
56 | 62 | </properties> |
57 | 63 |
|
58 | 64 | <dependencies> |
|
117 | 123 | <configuration> |
118 | 124 | <installFile>${izpack.resources.target}/install.xml</installFile> |
119 | 125 | <baseDir>${project.basedir}/../exist-distribution/target/exist-distribution-dir</baseDir> |
120 | | - <includeProperties>apache.httpcomponents.core.version,apache.httpcomponents.version,apache.xmlrpc.version,appassembler.version,aspectj.version,git.commit.id,git.commit.id.abbrev,git.closest.tag.name,git.closest.tag.commit.count,git.commit.time,git.commit.id.describe,contact.email,exquery.distribution.version,icu.version,jetty.version,izpack.installation.info.appversion,izpack.installation.info.author.email,izpack.installation.info.author.name,izpack.installation.info.url,izpack.resources.src,izpack.resources.target,izpack.version,jansi.version,jaxb.api.version,jaxb.impl.version,log4j.version,lucene.version,milton.version,project.build.sourceEncoding,project.copyright.name,saxon.version,xmlresolver.version,maven.compiler.release</includeProperties> |
| 126 | + <!-- DP: this is effecitvely a whitelist of safe properties to pass to the installer. 5 izpack..., mave.compiler, saxon and xmlresolver are in use. --> |
| 127 | + <includeProperties>apache.httpcomponents.core.version,apache.httpcomponents.version,apache.xmlrpc.version,appassembler.version,aspectj.version,git.commit.id,git.commit.id.abbrev,git.closest.tag.name,git.closest.tag.commit.count,git.commit.time,git.commit.id.describe,contact.email,exquery.distribution.version,icu.version,jetty.version,izpack.installation.info.appversion,izpack.installation.info.author.email,izpack.installation.info.author.name,izpack.installation.info.url,izpack.resources.src,izpack.resources.target,izpack.version,jansi.version,jaxb.api.version,jaxb.impl.version,log4j.version,lucene.version,project.build.sourceEncoding,project.copyright.name,saxon.version,xmlresolver.version,maven.compiler.release</includeProperties> |
121 | 128 | <autoIncludeUrl>true</autoIncludeUrl> |
122 | 129 | <autoIncludeDevelopers>true</autoIncludeDevelopers> |
123 | 130 | </configuration> |
124 | 131 | </plugin> |
125 | 132 |
|
| 133 | + <!-- Produce placeholder -sources.jar and -javadoc.jar for Maven Central. |
| 134 | + Central requires these for all non-pom artifacts; a README is |
| 135 | + sufficient when there are no Java sources to document. --> |
126 | 136 | <plugin> |
127 | 137 | <groupId>org.apache.maven.plugins</groupId> |
128 | | - <artifactId>maven-install-plugin</artifactId> |
129 | | - <configuration> |
130 | | - <skip>true</skip> |
131 | | - </configuration> |
132 | | - </plugin> |
133 | | - |
134 | | - <plugin> |
135 | | - <groupId>org.apache.maven.plugins</groupId> |
136 | | - <artifactId>maven-deploy-plugin</artifactId> |
137 | | - <configuration> |
138 | | - <skip>true</skip> |
139 | | - </configuration> |
| 138 | + <artifactId>maven-jar-plugin</artifactId> |
| 139 | + <executions> |
| 140 | + <execution> |
| 141 | + <id>placeholder-sources</id> |
| 142 | + <phase>package</phase> |
| 143 | + <goals> |
| 144 | + <goal>jar</goal> |
| 145 | + </goals> |
| 146 | + <configuration> |
| 147 | + <classifier>sources</classifier> |
| 148 | + <classesDirectory>${project.basedir}/src/main/resources</classesDirectory> |
| 149 | + </configuration> |
| 150 | + </execution> |
| 151 | + <execution> |
| 152 | + <id>placeholder-javadoc</id> |
| 153 | + <phase>package</phase> |
| 154 | + <goals> |
| 155 | + <goal>jar</goal> |
| 156 | + </goals> |
| 157 | + <configuration> |
| 158 | + <classifier>javadoc</classifier> |
| 159 | + <classesDirectory>${project.basedir}/src/main/resources</classesDirectory> |
| 160 | + </configuration> |
| 161 | + </execution> |
| 162 | + </executions> |
140 | 163 | </plugin> |
141 | 164 | </plugins> |
142 | 165 | </build> |
|
179 | 202 | <id>exist-release</id> |
180 | 203 | <build> |
181 | 204 | <plugins> |
182 | | - <!-- This is needed in a profile to workaround https://github.com/jutzig/github-release-plugin/issues/50 --> |
183 | 205 | <plugin> |
184 | | - <groupId>de.jutzig</groupId> |
185 | | - <artifactId>github-release-plugin</artifactId> |
| 206 | + <groupId>org.codehaus.mojo</groupId> |
| 207 | + <artifactId>exec-maven-plugin</artifactId> |
186 | 208 | <executions> |
187 | 209 | <execution> |
188 | 210 | <id>github-upload</id> |
189 | 211 | <phase>deploy</phase> |
190 | 212 | <goals> |
191 | | - <goal>release</goal> |
| 213 | + <goal>exec</goal> |
192 | 214 | </goals> |
193 | | - <inherited>true</inherited> |
194 | 215 | <configuration> |
195 | | - <description> |
196 | | - Release Notes: https://exist-db.org/exist/apps/wiki/blogs/eXist/exist${project.version} |
197 | | - |
198 | | - Maven Central: https://search.maven.org/search?q=g:org.exist-db |
199 | | - </description> |
200 | | - <releaseName>eXist-db ${project.version}</releaseName> |
201 | | - <tag>eXist-${project.version}</tag> |
202 | | - <fileSets> |
203 | | - <fileSet> |
204 | | - <directory>${project.build.directory}</directory> |
205 | | - <includes> |
206 | | - <include>${project.artifactId}-${project.version}.jar</include> |
207 | | - </includes> |
208 | | - </fileSet> |
209 | | - </fileSets> |
| 216 | + <executable>bash</executable> |
| 217 | + <arguments> |
| 218 | + <argument>-c</argument> |
| 219 | + <!-- Create the GitHub release if it does not yet exist (e.g. local |
| 220 | + release with CI unavailable), otherwise upload into the existing |
| 221 | + one (e.g. CI already created it from the tag push). --> |
| 222 | + <argument>file="${project.build.directory}/${project.artifactId}-${project.version}.jar"; gh release create "eXist-${project.version}" --title "eXist-db ${project.version}" --generate-notes "$file" || gh release upload "eXist-${project.version}" "$file" --clobber</argument> |
| 223 | + </arguments> |
210 | 224 | </configuration> |
211 | 225 | </execution> |
212 | 226 | </executions> |
|
0 commit comments