Skip to content

Commit

Permalink
Add build files.
Browse files Browse the repository at this point in the history
  • Loading branch information
athana committed Jan 5, 2017
1 parent cb26915 commit 91391db
Show file tree
Hide file tree
Showing 4 changed files with 205 additions and 0 deletions.
57 changes: 57 additions & 0 deletions build.xml
@@ -0,0 +1,57 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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 name="${name}" default="build-war" xmlns:ivy="antlib:org.apache.ivy.ant" xmlns:artifact="antlib:org.apache.maven.artifact.ant">

<property file="${basedir}/default.properties" />

<!-- define Maven coordinates, repository url and artifacts name etc -->
<property name="groupId" value="com.lucidworks" />
<property name="artifactId" value="${final.name}" />
<property name="maven-repository-url"
value="https://oss.sonatype.org/service/local/staging/deploy/maven2" />
<property name="maven-repository-id" value="sonatype-nexus-staging" />
<property name="maven-war" value="${build.dir}/${final.name}.war" />

<target name="build-war" description="Build application as a WAR file">
<war destfile="${build.dir}/${final.name}.war" webxml="${src.dir}/WEB-INF/web.xml">
<fileset dir="${src.dir}">
<include name="**/*.*" />
</fileset>
</war>
</target>

<!-- ================================================================== -->
<!-- Deploy to SonaType OSSRH -->
<!-- ================================================================== -->
<target name="deploy" depends="build-war" description="Deploy to SonaType OSSRH">
<!-- generate a pom file -->
<!-- ivy:makepom ivyfile="${ivy.file}" pomfile="${basedir}/pom.xml" templatefile="${basedir}/mvn.template">
<mapping conf="default" scope="compile"/> <mapping conf="runtime" scope="runtime"/>
</ivy:makepom-->
<!-- sign and deploy the war artifact -->
<artifact:mvn>
<arg
value="org.apache.maven.plugins:maven-gpg-plugin:1.5:sign-and-deploy-file" />
<arg value="-Durl=${maven-repository-url}" />
<arg value="-DrepositoryId=${maven-repository-id}" />
<arg value="-DpomFile=pom.xml" />
<arg value="-Dfile=${maven-war}" />
<arg value="-Prelease" />
</artifact:mvn>
</target>
</project>
15 changes: 15 additions & 0 deletions default.properties
@@ -0,0 +1,15 @@
name=banana
version=1.6.12
final.name=${name}-${version}
year=2016

basedir = ./
src.dir = ./src
build.dir = ./build
build.encoding = UTF-8
buildnumber=${scmBranch}@r${buildNumber}

test.src.dir = ./src/test
test.build.dir = ${build.dir}/test

ivy.version=2.2.0
51 changes: 51 additions & 0 deletions mvn.template
@@ -0,0 +1,51 @@
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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">
<modelVersion>4.0.0</modelVersion>
<groupId>${ivy.pom.groupId}</groupId>
<artifactId>${ivy.pom.artifactId}</artifactId>
<packaging>${ivy.pom.packaging}</packaging>
<version>${version}</version>
<name>Banana Project</name>
<description>${ivy.pom.description}</description>
<url>${ivy.pom.url}</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<build>
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test/</testSourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
82 changes: 82 additions & 0 deletions pom.xml
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
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">
<parent>
<groupId>org.sonatype.oss</groupId>
<artifactId>oss-parent</artifactId>
<version>7</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.lucidworks</groupId>
<artifactId>banana</artifactId>
<packaging>war</packaging>
<version>1.6.12</version>
<description>The Banana project was forked from Kibana, and works with all kinds of time series (and non-time series) data stored in Apache Solr.
</description>
<url>https://github.com/LucidWorks/banana</url>
<name>Banana Project</name>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>https://github.com/LucidWorks/banana</url>
<connection>scm:git:git://github.com/LucidWorks/banana.git</connection>
<developerConnection>scm:git:git@github.com/LucidWorks/banana.git</developerConnection>
<tag>HEAD</tag>
</scm>
<distributionManagement>
<repository>
<id>sonatype-nexus-staging</id>
<name>Nexus Staging Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<issueManagement>
<system>GitHub Issues</system>
<url>https://github.com/crawler-commons/crawler-commons/issues</url>
</issueManagement>
<developers>
<developer>
<name>Andrew Thanalertvisuti</name>
<email>andrew.thana@gmail.com</email>
<organization>Lucidworks</organization>
<organizationUrl>https://lucidworks.com/</organizationUrl>
</developer>
</developers>
<build>
<sourceDirectory>src</sourceDirectory>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

0 comments on commit 91391db

Please sign in to comment.