forked from empear-analytics/zookeeper
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ZOOKEEPER-3786: Simplify version generation
Simplify generation of VersionInfoMain.java and Info.java by using maven-resource-plugin's built-in resource filtering at build time. This eliminates the need to use VerGen to generate java source files during the build. Also make other slight pom improvements: 1. Remove trailing tab character in Ted's name in pom.xml 2. Simplify spotbugs skipping in contrib pom.xml 3. Add m2e configuration for build plugin executions to be ignored by Eclipse, for developers (like me) using Eclipse IDE 4. Format build time in a more international-friendly and less ambiguous way (year first, then month, then day, using UTC instead of GMT) Link to issue: https://issues.apache.org/jira/browse/ZOOKEEPER-3786 Author: Christopher Tubbs <[email protected]> Reviewers: Enrico Olivelli <[email protected]>, Mate Szalay-Beko <[email protected]> Closes apache#1310 from ctubbsii/use-resource-filtering-for-version-info
- Loading branch information
1 parent
51da75c
commit 45e252b
Showing
7 changed files
with
79 additions
and
318 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,7 +117,7 @@ | |
<developers> | ||
<developer> | ||
<id>tdunning</id> | ||
<name>Ted Dunning </name> | ||
<name>Ted Dunning</name> | ||
<email>[email protected]</email> | ||
<timezone>-8</timezone> | ||
</developer> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
zookeeper-server/src/main/java-filtered/org/apache/zookeeper/version/Info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package org.apache.zookeeper.version; | ||
|
||
public interface Info { | ||
int MAJOR=${parsedVersion.majorVersion}; | ||
int MINOR=${parsedVersion.minorVersion}; | ||
int MICRO=${parsedVersion.incrementalVersion}; | ||
String QUALIFIER="${parsedVersion.qualifier}".isEmpty() ? null : "${parsedVersion.qualifier}"; | ||
int REVISION=-1; //@deprecated, please use REVISION_HASH | ||
String REVISION_HASH="${mvngit.commit.id}"; | ||
String BUILD_DATE="${build.time}"; | ||
} |
25 changes: 25 additions & 0 deletions
25
zookeeper-server/src/main/java-filtered/org/apache/zookeeper/version/VersionInfoMain.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* 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. | ||
*/ | ||
|
||
package org.apache.zookeeper.version; | ||
|
||
public class VersionInfoMain implements org.apache.zookeeper.version.Info { | ||
public static void main(String[] args) { | ||
System.out.println("Apache ZooKeeper, version ${project.version} ${build.time}"); | ||
} | ||
} |
202 changes: 0 additions & 202 deletions
202
zookeeper-server/src/main/java/org/apache/zookeeper/version/util/VerGen.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.