Skip to content

Commit

Permalink
Generate pom.xml from Makefile.
Browse files Browse the repository at this point in the history
Change-Id: I1e3e4ba409116d8bef9b2d09d0708260fb9c5c33
  • Loading branch information
tsuna committed Jan 28, 2012
1 parent 17a1218 commit 5b4466e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
build/
pom.xml
target/
17 changes: 15 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2010, 2011 StumbleUpon, Inc. All rights reserved.
# Copyright (c) 2010-2012 StumbleUpon, Inc. All rights reserved.
# This file is part of Async HBase.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -39,7 +39,8 @@ suasync_SOURCES = \
src/DeferredGroup.java \
src/TimeoutException.java \

suasync_LIBADD = libs/slf4j-api-1.6.0.jar
SLF4J_API_VERSION := 1.6.0
suasync_LIBADD = libs/slf4j-api-$(SLF4J_API_VERSION).jar
AM_JAVACFLAGS = -Xlint
package_dir = $(subst .,/,$(package))
classes=$(suasync_SOURCES:src/%.java=$(top_builddir)/$(package_dir)/%.class)
Expand Down Expand Up @@ -95,4 +96,16 @@ distclean: clean
rm -rf $(top_builddir)/api
test ! -d $(top_builddir) || rmdir $(top_builddir)

pom.xml: pom.xml.in Makefile
{ \
echo '<!-- Generated by Makefile on '`date`' -->'; \
sed <$< \
-e 's/@SLF4J_API_VERSION@/$(SLF4J_API_VERSION)/' \
-e 's/@spec_title@/$(spec_title)/' \
-e 's/@spec_vendor@/$(spec_vendor)/' \
-e 's/@spec_version@/$(spec_version)/' \
; \
} >$@-t
mv $@-t $@

.PHONY: all jar clean distclean doc check
8 changes: 4 additions & 4 deletions pom.xml → pom.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

<groupId>com.stumbleupon</groupId>
<artifactId>async</artifactId>
<version>1.1.0</version>
<name>StumbleUpon Async Library</name>
<version>@spec_version@</version>
<name>@spec_title@</name>
<organization>
<name>StumbleUpon, Inc.</name>
<name>@spec_vendor@</name>
<url>http://www.stumbleupon.com</url>
</organization>
<description>
Expand Down Expand Up @@ -117,7 +117,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>[1.6.0,)</version>
<version>[@SLF4J_API_VERSION@,)</version>
</dependency>
</dependencies>

Expand Down

0 comments on commit 5b4466e

Please sign in to comment.