Skip to content

Commit

Permalink
Merge pull request #792 from chathurawidanage/0.4.0
Browse files Browse the repository at this point in the history
missing maven changes from 0.3.0
  • Loading branch information
supunkamburugamuve authored Dec 3, 2019
2 parents ab2d11d + 0b875a9 commit c904179
Show file tree
Hide file tree
Showing 4 changed files with 209 additions and 73 deletions.
14 changes: 14 additions & 0 deletions tools/maven.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ def t2_java_lib(
resource_jars = resource_jars,
)

native.genrule(
name = name + "-javadoc",
srcs = [":" + name],
outs = [name + "-javadoc.jar"],
cmd = "cp $(SRCS) $@",
)

if (generate_pom):
pom_file(
name = "pom",
Expand All @@ -63,6 +70,13 @@ def t2_proto_java_lib(name, srcs = [], deps = [], artifact_name = "", generate_p
resource_jars = [":%s" % name],
)

native.genrule(
name = "j%s" % name + "-javadoc",
srcs = [":" + ("j%s" % name)],
outs = [("j%s" % name) + "-javadoc.jar"],
cmd = "cp $(SRCS) $@",
)

if (generate_pom):
pom_file(
name = "pom",
Expand Down
125 changes: 122 additions & 3 deletions tools/pom-template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
<!-- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
<!-- // See the License for the specific language governing permissions and -->
<!-- // limitations under the License. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand All @@ -23,14 +25,17 @@
<artifactId>{artifact_id}</artifactId>
<name>{artifact_name}</name>
<version>{pom_version}</version>
<description>Twister2 Big Data Hosting Environment: A composable framework for high-performance data analytics</description>
<description>Twister2 Big Data Hosting Environment: A composable framework for high-performance
data analytics
</description>
<url>https://github.com/DSC-SPIDAL/twister2</url>
<packaging>{packaging}</packaging>

<scm>
<url>https://github.com/DSC-SPIDAL/twister2</url>
<connection>scm:git:git://github.com/DSC-SPIDAL/twister2.git</connection>
<developerConnection>scm:git:ssh://[email protected]/DSC-SPIDAL/twister2.git</developerConnection>
<developerConnection>scm:git:ssh://[email protected]/DSC-SPIDAL/twister2.git
</developerConnection>
<tag>HEAD</tag>
</scm>

Expand All @@ -51,7 +56,121 @@
<url>http://iu.edu</url>
</organization>

<build>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<localCheckout>true</localCheckout>
<pushChanges>false</pushChanges>
<mavenExecutorId>forked-path</mavenExecutorId>
<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
<version>1.9.5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

<profiles>
<!-- GPG Signature on release -->
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/
</url>
</repository>
</distributionManagement>

<dependencies>
{generated_bzl_deps}
</dependencies>

</project>
3 changes: 1 addition & 2 deletions util/mvn/deploy-to-maven-central.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ bash $(dirname $0)/execute-deploy.sh \
"gpg:sign-and-deploy-file" \
"$version_name" \
"-DrepositoryId=ossrh" \
"-Durl=https://oss.sonatype.org/content/repositories/snapshots" \
# "-Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/" \
"-Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2" \
"-Dgpg.keyname=${key}"

# Publish javadocs to gh-pages
Expand Down
Loading

0 comments on commit c904179

Please sign in to comment.