Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish Banana WAR to Maven Central #201 #203

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ This release includes the following key new features and improvements:

You can find all previous [Release Notes](https://github.com/LucidWorks/banana/wiki/Release-Notes) on our wiki page.


### Changes to your dashboards
If you created dashboards for Banana 1.0.0, you did not have a global filtering panel. In some cases, these filter values can be implicitly set to defaults that may lead to strange search results. We recommend updating your old dashboards by adding a filtering panel. A good way to do it visually is to put the filtering panel on its own row and hide it when it is not needed.

Expand Down Expand Up @@ -112,7 +111,11 @@ __A__: Yes, from version 1.3 onwards, non-time series data are also supported.
3. LogStash: http://logstash.net/
4. SILK Use Cases: https://github.com/LucidWorks/silkusecases. Provides example configuration files, schemas and dashboards required to build applications that use Solr and Banana.

## Publishing WAR Artifacts to Maven Central

1. Get hold of [maven-ant-tasks-X.X.X.jar](http://search.maven.org/#search|gav|1|g%3A%22org.apache.maven%22%20AND%20a%3A%22maven-ant-tasks%22) and put it in this directory
2. Execute *ant -lib . deploy* from this directory, this will sign the Maven artifacts (currently just .war) and send them to a [Sonatype OSSRH](https://oss.sonatype.org/) staging repository. Details of how to set this up can be found [here](http://central.sonatype.org/pages/ossrh-guide.html). N.B. Ensure that you have an *release* profile contained within ~/.m2/settings.xml
3. Once you've read, and are happy with the staging repos, close it.

## Support

Expand Down
67 changes: 54 additions & 13 deletions build.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,57 @@
<?xml version="1.0"?>
<project name="Banana Project" basedir="." default="build-war">
<property file="build.properties"/>
<property name="src.dir" value="src"/>
<property name="build.dir" value="build"/>
<property name="name" value="banana"/>
<!--
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

<buildnumber/>
<target name="build-war" description="Build application as a WAR file">
<war destfile="${build.dir}/${name}-${build.number}.war" webxml="${src.dir}/WEB-INF/web.xml">
<fileset dir="${src.dir}">
<include name="**/*.*"/>
</fileset>
</war>
</target>
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name=banana
version=1.5.1
final.name=${name}-${version}
year=2015

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
Original file line number Diff line number Diff line change
@@ -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>
81 changes: 81 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?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.5.1</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:[email protected]/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>
<id></id>
<name></name>
<email></email>
</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>