http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/051db092/pst/src/main/java/org/apache/wave/pst/style/PstStyler.java ---------------------------------------------------------------------- diff --git a/pst/src/main/java/org/apache/wave/pst/style/PstStyler.java b/pst/src/main/java/org/apache/wave/pst/style/PstStyler.java deleted file mode 100644 index ef8a437..0000000 --- a/pst/src/main/java/org/apache/wave/pst/style/PstStyler.java +++ /dev/null @@ -1,513 +0,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. - */ - -package org.apache.wave.pst.style; - -import com.google.common.base.Joiner; -import com.google.common.base.Preconditions; -import com.google.common.base.Strings; -import com.google.common.collect.Iterables; -import com.google.common.collect.Lists; -import com.google.common.io.CharStreams; -import com.google.common.io.Files; - -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.nio.charset.Charset; -import java.util.ArrayDeque; -import java.util.Iterator; -import java.util.List; - -/** - * A code styler using a Builder approach to configure styles using smaller - * reformatting components. - * - * TODO(kalman): take string literals into account. - * - * @author [email protected] (Benjamin Kalman) - */ -public final class PstStyler implements Styler { - - private static final String BACKUP_SUFFIX = ".prePstStyler"; - private static final String INDENT = " "; - private static final String[] ATOMIC_TOKENS = new String[] { - "} else {", - "} else if (", - "for (", - "/*-{", - "}-*/", - }; - - /** - * Builder for a series of composed style components. - */ - private static class StyleBuilder { - - /** - * Styles a single line, outputting generated lines to a generator. - * The styler may output anywhere between 0 and infinite lines. - */ - private interface LineStyler { - void next(String line, LineGenerator generator); - } - - /** - * Generates lines to some output sink. - */ - private interface LineGenerator { - void yield(CharSequence s); - } - - /** - * A pipeline of line stylers as a single line generator. - */ - private static final class LinePipeline implements LineGenerator { - private final LineStyler lineStyler; - private final LineGenerator next; - - private LinePipeline(LineStyler lineStyler, LineGenerator next) { - this.lineStyler = lineStyler; - this.next = next; - } - - /** - * Constructs a pipeline of line stylers. - * - * @param ls the line stylers to place in the pipeline - * @param sink the line generator at the end of the pipeline - * @return the head of the pipeline - */ - public static LinePipeline construct(Iterable<LineStyler> ls, LineGenerator sink) { - return new LinePipeline(head(ls), - (Iterables.size(ls) == 1) ? sink : construct(tail(ls), sink)); - } - - private static LineStyler head(Iterable<LineStyler> ls) { - return ls.iterator().next(); - } - - private static Iterable<LineStyler> tail(final Iterable<LineStyler> ls) { - return new Iterable<LineStyler>() { - @Override public Iterator<LineStyler> iterator() { - Iterator<LineStyler> tail = ls.iterator(); - tail.next(); - return tail; - } - }; - } - - @Override - public void yield(CharSequence s) { - lineStyler.next(s.toString(), next); - } - } - - /** - * Generates lines into a list. - */ - private static final class ListGenerator implements LineGenerator { - private final List<String> list = Lists.newArrayList(); - - @Override - public void yield(CharSequence s) { - list.add(s.toString()); - } - - public List<String> getList() { - return list; - } - } - - /** - * Maintains some helpful state across a styling. - */ - private abstract class StatefulLineStyler implements LineStyler { - private boolean inShortComment = false; - private boolean inLongComment = false; - private boolean inStartOfComment = false; - private boolean previousWasComment = false; - private int lineNumber = 0; - - protected boolean inComment() { - return inShortComment || inLongComment; - } - - protected boolean inStartOfComment() { - return inStartOfComment; - } - - protected boolean inLongComment() { - return inLongComment; - } - - protected int getLineNumber() { - return lineNumber; - } - - protected boolean previousWasComment() { - return previousWasComment; - } - - @Override - public final void next(String line, LineGenerator generator) { - lineNumber++; - // TODO(kalman): JSNI? - if (line.matches("^[ \t]*/\\*.*")) { - inLongComment = true; - inStartOfComment = true; - } - if (line.matches("^[ \t]*//.*")) { - inShortComment = true; - inStartOfComment = true; - } - doNext(line, generator); - previousWasComment = inShortComment || inLongComment; - if (line.contains("*/")) { - inLongComment = false; - } - inShortComment = false; - inStartOfComment = false; - } - - abstract void doNext(String line, LineGenerator generator); - } - - private final List<LineStyler> lineStylers = Lists.newArrayList(); - - /** - * Applies the state of the styler to a list of lines. - * - * @return the styled lines - */ - public List<String> apply(List<String> lines) { - ListGenerator result = new ListGenerator(); - LinePipeline pipeline = LinePipeline.construct(lineStylers, result); - for (String line : lines) { - pipeline.yield(line); - } - return result.getList(); - } - - public StyleBuilder addNewLineBefore(final char newLineBefore) { - lineStylers.add(new StatefulLineStyler() { - @Override public void doNext(String line, LineGenerator generator) { - // TODO(kalman): this is heavy-handed; be fine-grained and just don't - // split over tokens (need regexp, presumably). - if (inComment() || containsAtomicToken(line)) { - generator.yield(line); - return; - } - - StringBuilder s = new StringBuilder(); - for (char c : line.toCharArray()) { - if (c == newLineBefore) { - generator.yield(s); - s = new StringBuilder(); - } - s.append(c); - } - generator.yield(s); - } - }); - return this; - } - - public StyleBuilder addNewLineAfter(final char newLineAfter) { - lineStylers.add(new StatefulLineStyler() { - @Override public void doNext(String line, LineGenerator generator) { - // TODO(kalman): same as above. - if (inComment() || containsAtomicToken(line)) { - generator.yield(line); - return; - } - - StringBuilder s = new StringBuilder(); - for (char c : line.toCharArray()) { - s.append(c); - if (c == newLineAfter) { - generator.yield(s); - s = new StringBuilder(); - } - } - generator.yield(s); - } - }); - return this; - } - - public StyleBuilder trim() { - lineStylers.add(new LineStyler() { - @Override public void next(String line, LineGenerator generator) { - generator.yield(line.trim()); - } - }); - return this; - } - - public StyleBuilder removeRepeatedSpacing() { - lineStylers.add(new LineStyler() { - @Override public void next(String line, LineGenerator generator) { - generator.yield(line.replaceAll("[ \t]+", " ")); - } - }); - return this; - } - - public StyleBuilder stripBlankLines() { - lineStylers.add(new LineStyler() { - @Override public void next(String line, LineGenerator generator) { - if (!line.isEmpty()) { - generator.yield(line); - } - } - }); - return this; - } - - public StyleBuilder stripInitialBlankLine() { - lineStylers.add(new LineStyler() { - boolean firstLine = true; - @Override public void next(String line, LineGenerator generator) { - if (!firstLine || !line.isEmpty()) { - generator.yield(line); - } - firstLine = false; - } - }); - return this; - } - - public StyleBuilder stripDuplicateBlankLines() { - lineStylers.add(new LineStyler() { - boolean previousWasEmpty = false; - @Override public void next(String line, LineGenerator generator) { - if (!previousWasEmpty || !line.isEmpty()) { - generator.yield(line); - } - previousWasEmpty = line.isEmpty(); - } - }); - return this; - } - - public StyleBuilder indentBraces() { - lineStylers.add(new StatefulLineStyler() { - private int indentLevel = 0; - - @Override public void doNext(String line, LineGenerator generator) { - if (!ignore(line) && line.contains("}")) { - indentLevel--; - Preconditions.checkState(indentLevel >= 0, - "Indentation level reached < 0 on line " + getLineNumber() + " (" + line + ")"); - } - String result = ""; - if (!line.isEmpty()) { - result = Strings.repeat(INDENT, indentLevel) + line; - } - if (!ignore(line) && line.contains("{")) { - indentLevel++; - } - generator.yield(result.toString()); - } - - private boolean ignore(String line) { - // Ignore self-closing braces. - return line.contains("{") - && line.contains("}") - && line.indexOf('{') < line.lastIndexOf('}'); - } - }); - return this; - } - - public StyleBuilder indentLongComments() { - lineStylers.add(new StatefulLineStyler() { - @Override void doNext(String line, LineGenerator generator) { - if (inLongComment() && !inStartOfComment()) { - generator.yield(" " + line); - } else { - generator.yield(line); - } - } - }); - return this; - } - - public StyleBuilder doubleIndentUnfinishedLines() { - lineStylers.add(new StatefulLineStyler() { - boolean previousUnfinished = false; - - @Override public void doNext(String line, LineGenerator generator) { - generator.yield((previousUnfinished ? Strings.repeat(INDENT, 2) : "") + line); - previousUnfinished = - !inComment() && - !line.matches("^.*[;{},\\-/]$") && // Ends with an expected character. - !line.contains("@Override") && // or an annotation. - !line.isEmpty() && - !line.contains("//"); // Single-line comment. - } - }); - return this; - } - - public StyleBuilder addBlankLineBeforeMatching(final String regex) { - lineStylers.add(new StatefulLineStyler() { - @Override public void doNext(String line, LineGenerator generator) { - if ((!inComment() || inStartOfComment()) && line.matches(regex)) { - generator.yield(""); - } - generator.yield(line); - } - }); - return this; - } - - public StyleBuilder addBlankLineBeforeClasslikeWithNoPrecedingComment() { - lineStylers.add(new StatefulLineStyler() { - @Override public void doNext(String line, LineGenerator generator) { - if (!previousWasComment() - && line.matches(".*\\b(class|interface|enum)\\b.*")) { - generator.yield(""); - } - generator.yield(line); - } - }); - return this; - } - - public StyleBuilder addBlankLineAfterBraceUnlessInMethod() { - lineStylers.add(new StatefulLineStyler() { - // true for every level of braces that is a class-like construct - ArrayDeque<Boolean> stack = new ArrayDeque<Boolean>(); - boolean sawClasslike = false; - - @Override public void doNext(String line, LineGenerator generator) { - if (inComment()) { - generator.yield(line); - } else if (line.endsWith("}") && !line.contains("{")) { - generator.yield(line); - stack.pop(); - if (!stack.isEmpty() && stack.peek()) { - generator.yield(""); - } - } else { - // Perhaps we could match anonymous classes by adding "new" here, - // but this is not currently needed. - if (line.matches(".*\\b(class|interface|enum)\\b.*")) { - sawClasslike = true; - } - if (line.endsWith("{")) { - if (line.contains("}")) { - stack.pop(); - } - stack.push(sawClasslike); - sawClasslike = false; - } else if (line.endsWith(";")) { - sawClasslike = false; - } - generator.yield(line); - } - } - }); - return this; - } - - public StyleBuilder addBlankLineAfterMatching(final String regex) { - lineStylers.add(new StatefulLineStyler() { - boolean previousLineMatched = false; - - @Override public void doNext(String line, LineGenerator generator) { - if (previousLineMatched) { - generator.yield(""); - } - generator.yield(line); - previousLineMatched = line.matches(regex); - } - }); - return this; - } - - private boolean containsAtomicToken(String line) { - for (String token : ATOMIC_TOKENS) { - if (line.contains(token)) { - return true; - } - } - return false; - } - } - - @Override - public void style(File f, boolean saveBackup) { - List<String> lines = null; - try { - lines = CharStreams.readLines(new FileReader(f)); - } catch (IOException e) { - System.err.println("Couldn't find file " + f.getName() + " to style: " + e.getMessage()); - return; - } - - Joiner newlineJoiner = Joiner.on('\n'); - - if (saveBackup) { - File backup = new File(f.getAbsolutePath() + BACKUP_SUFFIX); - try { - Files.write(newlineJoiner.join(lines), backup, Charset.defaultCharset()); - } catch (IOException e) { - System.err.println("Couldn't write backup " + backup.getName() + ": " + e.getMessage()); - return; - } - } - - try { - Files.write(newlineJoiner.join(styleLines(lines)), f, Charset.defaultCharset()); - } catch (IOException e) { - System.err.println("Couldn't write styled file " + f.getName() + ": " + e.getMessage()); - return; - } - } - - private List<String> styleLines(List<String> lines) { - return new StyleBuilder() - .trim() - .removeRepeatedSpacing() - .addNewLineBefore('}') - .addNewLineAfter('{') - .addNewLineAfter('}') - .addNewLineAfter(';') - .trim() - .removeRepeatedSpacing() - .stripBlankLines() - .trim() - .indentBraces() - .indentLongComments() - .addBlankLineBeforeMatching("[ \t]*@Override.*") - .addBlankLineBeforeMatching(".*/\\*\\*.*") - .addBlankLineAfterMatching("package.*") - .addBlankLineBeforeMatching("package.*") - .addBlankLineBeforeClasslikeWithNoPrecedingComment() - .addBlankLineAfterBraceUnlessInMethod() - .stripDuplicateBlankLines() - .doubleIndentUnfinishedLines() - .stripInitialBlankLine() - // TODO: blank line before first method or constructor if that has no javadoc - .apply(lines); - } -}
http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/051db092/pst/src/main/java/org/apache/wave/pst/style/Styler.java ---------------------------------------------------------------------- diff --git a/pst/src/main/java/org/apache/wave/pst/style/Styler.java b/pst/src/main/java/org/apache/wave/pst/style/Styler.java deleted file mode 100644 index 3621411..0000000 --- a/pst/src/main/java/org/apache/wave/pst/style/Styler.java +++ /dev/null @@ -1,45 +0,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. - */ - -package org.apache.wave.pst.style; - -import java.io.File; - -/** - * Styles a source file. - * - * @author [email protected] (Benjamin Kalman) - */ -public interface Styler { - - /** - * Styles a source file. - * - * @param f the file to style - * @param saveBackup whether to save a backup - */ - void style(File f, boolean saveBackup); - - /** - * No-op implementation. - */ - Styler EMPTY = new Styler() { - @Override public void style(File f, boolean saveBackup) {} - }; -} http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/051db092/pst/src/main/java/org/apache/wave/pst/testing/RandomProtobufGenerator.java ---------------------------------------------------------------------- diff --git a/pst/src/main/java/org/apache/wave/pst/testing/RandomProtobufGenerator.java b/pst/src/main/java/org/apache/wave/pst/testing/RandomProtobufGenerator.java deleted file mode 100644 index 369e21a..0000000 --- a/pst/src/main/java/org/apache/wave/pst/testing/RandomProtobufGenerator.java +++ /dev/null @@ -1,170 +0,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. - */ - -package org.apache.wave.pst.testing; - -import com.google.common.collect.Lists; -import com.google.common.collect.Maps; -import com.google.protobuf.ByteString; -import com.google.protobuf.Descriptors.Descriptor; -import com.google.protobuf.Descriptors.EnumDescriptor; -import com.google.protobuf.Descriptors.EnumValueDescriptor; -import com.google.protobuf.Descriptors.FieldDescriptor; -import com.google.protobuf.GeneratedMessage; -import com.google.protobuf.Message.Builder; - -import java.util.List; -import java.util.Map; -import java.util.Random; - -/** - * Generates random protocol buffers with all fields given a value. - * - * @author [email protected] (Benjamin Kalman) - */ -public final class RandomProtobufGenerator<E extends GeneratedMessage> { - - private static final int MAX_LIST_LENGTH = 10; - private static final int MAX_STRING_LENGTH = 10; - - private final Random random; - private final GeneratedMessage instance; - private final Map<Descriptor, GeneratedMessage> moreInstances; - - private RandomProtobufGenerator(Random random, GeneratedMessage instance, - Map<Descriptor, GeneratedMessage> moreInstances) { - this.random = random; - this.instance = instance; - this.moreInstances = moreInstances; - } - - /** - * Creates a random protobuf generator, for a main type (instance) and a list - * of any extra instances that will be needed to generate that instance. - * - * @param random random number generator - * @param instance the protobuf instance used as a template to generate more - * random protobuf - * @param moreInstances protobuf templates for any inner messages the - * protobuf depends on - * @return the random protobuf generator - */ - public static <T extends GeneratedMessage> RandomProtobufGenerator<T> create(Random random, - GeneratedMessage instance, GeneratedMessage... moreInstances) { - // NOTE: it would be nice to determine this internally e.g. through (java or proto) reflection. - Map<Descriptor, GeneratedMessage> moreInstancesMap = Maps.newHashMap(); - for (GeneratedMessage gm : moreInstances) { - moreInstancesMap.put(gm.getDescriptorForType(), gm); - } - return new RandomProtobufGenerator<T>(random, instance, moreInstancesMap); - } - - /** - * Generates a random protocol buffer, filling in all fields and giving - * repeated values 0..n items. - */ - public E generate() { - return generate(0); - } - - /** - * Generates a random protocol buffer, filling in all required fields but - * with a p chance of not setting an optional field and p chance of having - * an empty repeated field. - */ - @SuppressWarnings("unchecked") - public E generate(double p) { - Builder builder = instance.newBuilderForType(); - Descriptor descriptor = instance.getDescriptorForType(); - for (FieldDescriptor field : descriptor.getFields()) { - if (!field.isRequired() && random.nextDouble() < p) { - continue; - } - builder.setField(field, getRandomValue(field, p)); - } - return (E) builder.build(); - } - - private Object getRandomValue(FieldDescriptor field, double p) { - if (field.isRepeated()) { - List<Object> values = Lists.newArrayList(); - for (int i = 0, length = random.nextInt(MAX_LIST_LENGTH); i < length; i++) { - values.add(getRandomSingleValue(field, p)); - } - return values; - } else { - return getRandomSingleValue(field, p); - } - } - - private Object getRandomSingleValue(FieldDescriptor field, double p) { - switch (field.getJavaType()) { - case BOOLEAN: - return random.nextBoolean(); - case BYTE_STRING: - return getRandomByteString(); - case DOUBLE: - return random.nextDouble(); - case ENUM: - return getRandomEnum(field.getEnumType()); - case FLOAT: - return random.nextFloat(); - case INT: - return random.nextInt(); - case LONG: - return random.nextLong(); - case MESSAGE: - return getRandomMessage(field, p); - case STRING: - return getRandomString(); - default: - return null; - } - } - - private ByteString getRandomByteString() { - byte[] bytes = new byte[32]; - random.nextBytes(bytes); - return ByteString.copyFrom(bytes); - } - - private EnumValueDescriptor getRandomEnum(EnumDescriptor enumD) { - List<EnumValueDescriptor> values = enumD.getValues(); - return values.get(random.nextInt(values.size())); - } - - private GeneratedMessage getRandomMessage(FieldDescriptor field, double p) { - GeneratedMessage instance = moreInstances.get(field.getMessageType()); - if (instance == null) { - throw new IllegalArgumentException("Couldn't find instance for message " - + field.getMessageType().getFullName()); - } - return new RandomProtobufGenerator<GeneratedMessage>(random, instance, moreInstances) - .generate(p); - } - - private String getRandomString() { - String alphabet = "abc{}[]<>\\\"'"; - StringBuilder s = new StringBuilder(); - for (int i = 0, length = random.nextInt(MAX_STRING_LENGTH); i < length; i++) { - s.append(alphabet.charAt(random.nextInt(alphabet.length()))); - } - return s.toString(); - } -} http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/051db092/pst/src/main/proto/google/protobuf/descriptor.proto ---------------------------------------------------------------------- diff --git a/pst/src/main/proto/google/protobuf/descriptor.proto b/pst/src/main/proto/google/protobuf/descriptor.proto deleted file mode 100644 index a753601..0000000 --- a/pst/src/main/proto/google/protobuf/descriptor.proto +++ /dev/null @@ -1,687 +0,0 @@ -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// https://developers.google.com/protocol-buffers/ -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Author: [email protected] (Kenton Varda) -// Based on original Protocol Buffers design by -// Sanjay Ghemawat, Jeff Dean, and others. -// -// The messages in this file describe the definitions found in .proto files. -// A valid .proto file can be translated directly to a FileDescriptorProto -// without any other information (e.g. without reading its imports). - - - -package google.protobuf; -option java_package = "com.google.protobuf"; -option java_outer_classname = "DescriptorProtos"; - -// descriptor.proto must be optimized for speed because reflection-based -// algorithms don't work during bootstrapping. -option optimize_for = SPEED; - -// The protocol compiler can output a FileDescriptorSet containing the .proto -// files it parses. -message FileDescriptorSet { - repeated FileDescriptorProto file = 1; -} - -// Describes a complete .proto file. -message FileDescriptorProto { - optional string name = 1; // file name, relative to root of source tree - optional string package = 2; // e.g. "foo", "foo.bar", etc. - - // Names of files imported by this file. - repeated string dependency = 3; - // Indexes of the public imported files in the dependency list above. - repeated int32 public_dependency = 10; - // Indexes of the weak imported files in the dependency list. - // For Google-internal migration only. Do not use. - repeated int32 weak_dependency = 11; - - // All top-level definitions in this file. - repeated DescriptorProto message_type = 4; - repeated EnumDescriptorProto enum_type = 5; - repeated ServiceDescriptorProto service = 6; - repeated FieldDescriptorProto extension = 7; - - optional FileOptions options = 8; - - // This field contains optional information about the original source code. - // You may safely remove this entire field whithout harming runtime - // functionality of the descriptors -- the information is needed only by - // development tools. - optional SourceCodeInfo source_code_info = 9; -} - -// Describes a message type. -message DescriptorProto { - optional string name = 1; - - repeated FieldDescriptorProto field = 2; - repeated FieldDescriptorProto extension = 6; - - repeated DescriptorProto nested_type = 3; - repeated EnumDescriptorProto enum_type = 4; - - message ExtensionRange { - optional int32 start = 1; - optional int32 end = 2; - } - repeated ExtensionRange extension_range = 5; - - repeated OneofDescriptorProto oneof_decl = 8; - - optional MessageOptions options = 7; -} - -// Describes a field within a message. -message FieldDescriptorProto { - enum Type { - // 0 is reserved for errors. - // Order is weird for historical reasons. - TYPE_DOUBLE = 1; - TYPE_FLOAT = 2; - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if - // negative values are likely. - TYPE_INT64 = 3; - TYPE_UINT64 = 4; - // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if - // negative values are likely. - TYPE_INT32 = 5; - TYPE_FIXED64 = 6; - TYPE_FIXED32 = 7; - TYPE_BOOL = 8; - TYPE_STRING = 9; - TYPE_GROUP = 10; // Tag-delimited aggregate. - TYPE_MESSAGE = 11; // Length-delimited aggregate. - - // New in version 2. - TYPE_BYTES = 12; - TYPE_UINT32 = 13; - TYPE_ENUM = 14; - TYPE_SFIXED32 = 15; - TYPE_SFIXED64 = 16; - TYPE_SINT32 = 17; // Uses ZigZag encoding. - TYPE_SINT64 = 18; // Uses ZigZag encoding. - }; - - enum Label { - // 0 is reserved for errors - LABEL_OPTIONAL = 1; - LABEL_REQUIRED = 2; - LABEL_REPEATED = 3; - // TODO(sanjay): Should we add LABEL_MAP? - }; - - optional string name = 1; - optional int32 number = 3; - optional Label label = 4; - - // If type_name is set, this need not be set. If both this and type_name - // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. - optional Type type = 5; - - // For message and enum types, this is the name of the type. If the name - // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping - // rules are used to find the type (i.e. first the nested types within this - // message are searched, then within the parent, on up to the root - // namespace). - optional string type_name = 6; - - // For extensions, this is the name of the type being extended. It is - // resolved in the same manner as type_name. - optional string extendee = 2; - - // For numeric types, contains the original text representation of the value. - // For booleans, "true" or "false". - // For strings, contains the default text contents (not escaped in any way). - // For bytes, contains the C escaped value. All bytes >= 128 are escaped. - // TODO(kenton): Base-64 encode? - optional string default_value = 7; - - // If set, gives the index of a oneof in the containing type's oneof_decl - // list. This field is a member of that oneof. Extensions of a oneof should - // not set this since the oneof to which they belong will be inferred based - // on the extension range containing the extension's field number. - optional int32 oneof_index = 9; - - optional FieldOptions options = 8; -} - -// Describes a oneof. -message OneofDescriptorProto { - optional string name = 1; -} - -// Describes an enum type. -message EnumDescriptorProto { - optional string name = 1; - - repeated EnumValueDescriptorProto value = 2; - - optional EnumOptions options = 3; -} - -// Describes a value within an enum. -message EnumValueDescriptorProto { - optional string name = 1; - optional int32 number = 2; - - optional EnumValueOptions options = 3; -} - -// Describes a service. -message ServiceDescriptorProto { - optional string name = 1; - repeated MethodDescriptorProto method = 2; - - optional ServiceOptions options = 3; -} - -// Describes a method of a service. -message MethodDescriptorProto { - optional string name = 1; - - // Input and output type names. These are resolved in the same way as - // FieldDescriptorProto.type_name, but must refer to a message type. - optional string input_type = 2; - optional string output_type = 3; - - optional MethodOptions options = 4; -} - - -// =================================================================== -// Options - -// Each of the definitions above may have "options" attached. These are -// just annotations which may cause code to be generated slightly differently -// or may contain hints for code that manipulates protocol messages. -// -// Clients may define custom options as extensions of the *Options messages. -// These extensions may not yet be known at parsing time, so the parser cannot -// store the values in them. Instead it stores them in a field in the *Options -// message called uninterpreted_option. This field must have the same name -// across all *Options messages. We then use this field to populate the -// extensions when we build a descriptor, at which point all protos have been -// parsed and so all extensions are known. -// -// Extension numbers for custom options may be chosen as follows: -// * For options which will only be used within a single application or -// organization, or for experimental options, use field numbers 50000 -// through 99999. It is up to you to ensure that you do not use the -// same number for multiple options. -// * For options which will be published and used publicly by multiple -// independent entities, e-mail [email protected] -// to reserve extension numbers. Simply provide your project name (e.g. -// Object-C plugin) and your porject website (if available) -- there's no need -// to explain how you intend to use them. Usually you only need one extension -// number. You can declare multiple options with only one extension number by -// putting them in a sub-message. See the Custom Options section of the docs -// for examples: -// https://developers.google.com/protocol-buffers/docs/proto#options -// If this turns out to be popular, a web service will be set up -// to automatically assign option numbers. - - -message FileOptions { - - // Sets the Java package where classes generated from this .proto will be - // placed. By default, the proto package is used, but this is often - // inappropriate because proto packages do not normally start with backwards - // domain names. - optional string java_package = 1; - - - // If set, all the classes from the .proto file are wrapped in a single - // outer class with the given name. This applies to both Proto1 - // (equivalent to the old "--one_java_file" option) and Proto2 (where - // a .proto always translates to a single class, but you may want to - // explicitly choose the class name). - optional string java_outer_classname = 8; - - // If set true, then the Java code generator will generate a separate .java - // file for each top-level message, enum, and service defined in the .proto - // file. Thus, these types will *not* be nested inside the outer class - // named by java_outer_classname. However, the outer class will still be - // generated to contain the file's getDescriptor() method as well as any - // top-level extensions defined in the file. - optional bool java_multiple_files = 10 [default=false]; - - // If set true, then the Java code generator will generate equals() and - // hashCode() methods for all messages defined in the .proto file. - // - In the full runtime, this is purely a speed optimization, as the - // AbstractMessage base class includes reflection-based implementations of - // these methods. - //- In the lite runtime, setting this option changes the semantics of - // equals() and hashCode() to more closely match those of the full runtime; - // the generated methods compute their results based on field values rather - // than object identity. (Implementations should not assume that hashcodes - // will be consistent across runtimes or versions of the protocol compiler.) - optional bool java_generate_equals_and_hash = 20 [default=false]; - - // If set true, then the Java2 code generator will generate code that - // throws an exception whenever an attempt is made to assign a non-UTF-8 - // byte sequence to a string field. - // Message reflection will do the same. - // However, an extension field still accepts non-UTF-8 byte sequences. - // This option has no effect on when used with the lite runtime. - optional bool java_string_check_utf8 = 27 [default=false]; - - - // Generated classes can be optimized for speed or code size. - enum OptimizeMode { - SPEED = 1; // Generate complete code for parsing, serialization, - // etc. - CODE_SIZE = 2; // Use ReflectionOps to implement these methods. - LITE_RUNTIME = 3; // Generate code using MessageLite and the lite runtime. - } - optional OptimizeMode optimize_for = 9 [default=SPEED]; - - // Sets the Go package where structs generated from this .proto will be - // placed. There is no default. - optional string go_package = 11; - - - - // Should generic services be generated in each language? "Generic" services - // are not specific to any particular RPC system. They are generated by the - // main code generators in each language (without additional plugins). - // Generic services were the only kind of service generation supported by - // early versions of proto2. - // - // Generic services are now considered deprecated in favor of using plugins - // that generate code specific to your particular RPC system. Therefore, - // these default to false. Old code which depends on generic services should - // explicitly set them to true. - optional bool cc_generic_services = 16 [default=false]; - optional bool java_generic_services = 17 [default=false]; - optional bool py_generic_services = 18 [default=false]; - - // Is this file deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for everything in the file, or it will be completely ignored; in the very - // least, this is a formalization for deprecating files. - optional bool deprecated = 23 [default=false]; - - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message MessageOptions { - // Set true to use the old proto1 MessageSet wire format for extensions. - // This is provided for backwards-compatibility with the MessageSet wire - // format. You should not use this for any other reason: It's less - // efficient, has fewer features, and is more complicated. - // - // The message must be defined exactly as follows: - // message Foo { - // option message_set_wire_format = true; - // extensions 4 to max; - // } - // Note that the message cannot have any defined fields; MessageSets only - // have extensions. - // - // All extensions of your type must be singular messages; e.g. they cannot - // be int32s, enums, or repeated messages. - // - // Because this is an option, the above two restrictions are not enforced by - // the protocol compiler. - optional bool message_set_wire_format = 1 [default=false]; - - // Disables the generation of the standard "descriptor()" accessor, which can - // conflict with a field of the same name. This is meant to make migration - // from proto1 easier; new code should avoid fields named "descriptor". - optional bool no_standard_descriptor_accessor = 2 [default=false]; - - // Is this message deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the message, or it will be completely ignored; in the very least, - // this is a formalization for deprecating messages. - optional bool deprecated = 3 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message FieldOptions { - // The ctype option instructs the C++ code generator to use a different - // representation of the field than it normally would. See the specific - // options below. This option is not yet implemented in the open source - // release -- sorry, we'll try to include it in a future version! - optional CType ctype = 1 [default = STRING]; - enum CType { - // Default mode. - STRING = 0; - - CORD = 1; - - STRING_PIECE = 2; - } - // The packed option can be enabled for repeated primitive fields to enable - // a more efficient representation on the wire. Rather than repeatedly - // writing the tag and type for each element, the entire array is encoded as - // a single length-delimited blob. - optional bool packed = 2; - - - - // Should this field be parsed lazily? Lazy applies only to message-type - // fields. It means that when the outer message is initially parsed, the - // inner message's contents will not be parsed but instead stored in encoded - // form. The inner message will actually be parsed when it is first accessed. - // - // This is only a hint. Implementations are free to choose whether to use - // eager or lazy parsing regardless of the value of this option. However, - // setting this option true suggests that the protocol author believes that - // using lazy parsing on this field is worth the additional bookkeeping - // overhead typically needed to implement it. - // - // This option does not affect the public interface of any generated code; - // all method signatures remain the same. Furthermore, thread-safety of the - // interface is not affected by this option; const methods remain safe to - // call from multiple threads concurrently, while non-const methods continue - // to require exclusive access. - // - // - // Note that implementations may choose not to check required fields within - // a lazy sub-message. That is, calling IsInitialized() on the outher message - // may return true even if the inner message has missing required fields. - // This is necessary because otherwise the inner message would have to be - // parsed in order to perform the check, defeating the purpose of lazy - // parsing. An implementation which chooses not to check required fields - // must be consistent about it. That is, for any particular sub-message, the - // implementation must either *always* check its required fields, or *never* - // check its required fields, regardless of whether or not the message has - // been parsed. - optional bool lazy = 5 [default=false]; - - // Is this field deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for accessors, or it will be completely ignored; in the very least, this - // is a formalization for deprecating fields. - optional bool deprecated = 3 [default=false]; - - // EXPERIMENTAL. DO NOT USE. - // For "map" fields, the name of the field in the enclosed type that - // is the key for this map. For example, suppose we have: - // message Item { - // required string name = 1; - // required string value = 2; - // } - // message Config { - // repeated Item items = 1 [experimental_map_key="name"]; - // } - // In this situation, the map key for Item will be set to "name". - // TODO: Fully-implement this, then remove the "experimental_" prefix. - optional string experimental_map_key = 9; - - // For Google-internal migration only. Do not use. - optional bool weak = 10 [default=false]; - - - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumOptions { - - // Set this option to true to allow mapping different tag names to the same - // value. - optional bool allow_alias = 2; - - // Is this enum deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum, or it will be completely ignored; in the very least, this - // is a formalization for deprecating enums. - optional bool deprecated = 3 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message EnumValueOptions { - // Is this enum value deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the enum value, or it will be completely ignored; in the very least, - // this is a formalization for deprecating enum values. - optional bool deprecated = 1 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message ServiceOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // Is this service deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the service, or it will be completely ignored; in the very least, - // this is a formalization for deprecating services. - optional bool deprecated = 33 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - -message MethodOptions { - - // Note: Field numbers 1 through 32 are reserved for Google's internal RPC - // framework. We apologize for hoarding these numbers to ourselves, but - // we were already using them long before we decided to release Protocol - // Buffers. - - // Is this method deprecated? - // Depending on the target platform, this can emit Deprecated annotations - // for the method, or it will be completely ignored; in the very least, - // this is a formalization for deprecating methods. - optional bool deprecated = 33 [default=false]; - - // The parser stores options it doesn't recognize here. See above. - repeated UninterpretedOption uninterpreted_option = 999; - - // Clients can define custom options in extensions of this message. See above. - extensions 1000 to max; -} - - -// A message representing a option the parser does not recognize. This only -// appears in options protos created by the compiler::Parser class. -// DescriptorPool resolves these when building Descriptor objects. Therefore, -// options protos in descriptor objects (e.g. returned by Descriptor::options(), -// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions -// in them. -message UninterpretedOption { - // The name of the uninterpreted option. Each string represents a segment in - // a dot-separated name. is_extension is true iff a segment represents an - // extension (denoted with parentheses in options specs in .proto files). - // E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents - // "foo.(bar.baz).qux". - message NamePart { - required string name_part = 1; - required bool is_extension = 2; - } - repeated NamePart name = 2; - - // The value of the uninterpreted option, in whatever type the tokenizer - // identified it as during parsing. Exactly one of these should be set. - optional string identifier_value = 3; - optional uint64 positive_int_value = 4; - optional int64 negative_int_value = 5; - optional double double_value = 6; - optional bytes string_value = 7; - optional string aggregate_value = 8; -} - -// =================================================================== -// Optional source code info - -// Encapsulates information about the original source file from which a -// FileDescriptorProto was generated. -message SourceCodeInfo { - // A Location identifies a piece of source code in a .proto file which - // corresponds to a particular definition. This information is intended - // to be useful to IDEs, code indexers, documentation generators, and similar - // tools. - // - // For example, say we have a file like: - // message Foo { - // optional string foo = 1; - // } - // Let's look at just the field definition: - // optional string foo = 1; - // ^ ^^ ^^ ^ ^^^ - // a bc de f ghi - // We have the following locations: - // span path represents - // [a,i) [ 4, 0, 2, 0 ] The whole field definition. - // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). - // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). - // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). - // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). - // - // Notes: - // - A location may refer to a repeated field itself (i.e. not to any - // particular index within it). This is used whenever a set of elements are - // logically enclosed in a single code segment. For example, an entire - // extend block (possibly containing multiple extension definitions) will - // have an outer location whose path refers to the "extensions" repeated - // field without an index. - // - Multiple locations may have the same path. This happens when a single - // logical declaration is spread out across multiple places. The most - // obvious example is the "extend" block again -- there may be multiple - // extend blocks in the same scope, each of which will have the same path. - // - A location's span is not always a subset of its parent's span. For - // example, the "extendee" of an extension declaration appears at the - // beginning of the "extend" block and is shared by all extensions within - // the block. - // - Just because a location's span is a subset of some other location's span - // does not mean that it is a descendent. For example, a "group" defines - // both a type and a field in a single declaration. Thus, the locations - // corresponding to the type and field and their components will overlap. - // - Code which tries to interpret locations should probably be designed to - // ignore those that it doesn't understand, as more types of locations could - // be recorded in the future. - repeated Location location = 1; - message Location { - // Identifies which part of the FileDescriptorProto was defined at this - // location. - // - // Each element is a field number or an index. They form a path from - // the root FileDescriptorProto to the place where the definition. For - // example, this path: - // [ 4, 3, 2, 7, 1 ] - // refers to: - // file.message_type(3) // 4, 3 - // .field(7) // 2, 7 - // .name() // 1 - // This is because FileDescriptorProto.message_type has field number 4: - // repeated DescriptorProto message_type = 4; - // and DescriptorProto.field has field number 2: - // repeated FieldDescriptorProto field = 2; - // and FieldDescriptorProto.name has field number 1: - // optional string name = 1; - // - // Thus, the above path gives the location of a field name. If we removed - // the last element: - // [ 4, 3, 2, 7 ] - // this path refers to the whole field declaration (from the beginning - // of the label to the terminating semicolon). - repeated int32 path = 1 [packed=true]; - - // Always has exactly three or four elements: start line, start column, - // end line (optional, otherwise assumed same as start line), end column. - // These are packed into a single field for efficiency. Note that line - // and column numbers are zero-based -- typically you will want to add - // 1 to each before displaying to a user. - repeated int32 span = 2 [packed=true]; - - // If this SourceCodeInfo represents a complete declaration, these are any - // comments appearing before and after the declaration which appear to be - // attached to the declaration. - // - // A series of line comments appearing on consecutive lines, with no other - // tokens appearing on those lines, will be treated as a single comment. - // - // Only the comment content is provided; comment markers (e.g. //) are - // stripped out. For block comments, leading whitespace and an asterisk - // will be stripped from the beginning of each line other than the first. - // Newlines are included in the output. - // - // Examples: - // - // optional int32 foo = 1; // Comment attached to foo. - // // Comment attached to bar. - // optional int32 bar = 2; - // - // optional string baz = 3; - // // Comment attached to baz. - // // Another line attached to baz. - // - // // Comment attached to qux. - // // - // // Another line attached to qux. - // optional double qux = 4; - // - // optional string corge = 5; - // /* Block comment attached - // * to corge. Leading asterisks - // * will be removed. */ - // /* Block comment attached to - // * grault. */ - // optional int32 grault = 6; - optional string leading_comments = 3; - optional string trailing_comments = 4; - } -} http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/051db092/pst/src/main/proto/org/apache/wave/pst/protobuf/extensions.proto ---------------------------------------------------------------------- diff --git a/pst/src/main/proto/org/apache/wave/pst/protobuf/extensions.proto b/pst/src/main/proto/org/apache/wave/pst/protobuf/extensions.proto deleted file mode 100644 index d9b8e9a..0000000 --- a/pst/src/main/proto/org/apache/wave/pst/protobuf/extensions.proto +++ /dev/null @@ -1,34 +0,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. - -syntax = "proto2"; - -import "google/protobuf/descriptor.proto"; - -option java_package = "org.apache.wave.pst.protobuf"; -option java_outer_classname = "Extensions"; - -extend google.protobuf.FieldOptions { - // Annotates an int64, noting that only the lower 52 bits are important. - // This allows languages without 64-bit primitives (like JavaScript) to use - // other primtive types instead. - // - // Annotation ids are apparently meant to be globally unique. Not sure why, - // given that proto names and field ids do not have to be globally unique. - // If it becomes an issue, get a unique number from the number distributor. - optional bool int52 = 50000 [default = false]; -} http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/051db092/scripts/release/artifact-sign.sh ---------------------------------------------------------------------- diff --git a/scripts/release/artifact-sign.sh b/scripts/release/artifact-sign.sh deleted file mode 100644 index 004d5f0..0000000 --- a/scripts/release/artifact-sign.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/zsh - -# 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. - - -#Assumes it is being run in the base directory. - -PRE="dist/apache-wave-" -for f in $PRE*; do -gpg --armor --output $f.asc --detach-sig $f -gpg --print-md SHA512 $f > $f.sha -done \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/051db092/scripts/vagrant/application.conf ---------------------------------------------------------------------- diff --git a/scripts/vagrant/application.conf b/scripts/vagrant/application.conf deleted file mode 100644 index 887528f..0000000 --- a/scripts/vagrant/application.conf +++ /dev/null @@ -1,23 +0,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. - -# Configuration for the Apache Wave Server for Vagrant VM port forward. - - -core { - http_frontend_addresses : ["0.0.0.0:9898"] -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/051db092/scripts/vagrant/setup-fedora.sh ---------------------------------------------------------------------- diff --git a/scripts/vagrant/setup-fedora.sh b/scripts/vagrant/setup-fedora.sh deleted file mode 100644 index 7c1123f..0000000 --- a/scripts/vagrant/setup-fedora.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash - -# 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. - -# install the dependencies -dnf install -y ant java-1.8.0-openjdk mongodb -# create install location -cd /opt -sudo mkdir apache -cd apache -sudo mkdir wave -# create the binary -cd /vagrant -./gradlew clean createDist - -# Get Apache Wave version -WAVE_VERSION=`sed "s/[\\t ]*=[\\t ]*/=/g" wave/config/wave.conf | grep ^version= | cut -f2 -d=` - -cd distributions -sudo tar -C /opt/apache/wave -zxvf apache-wave-bin-$WAVE_VERSION.tar -cd .. -cp scripts/vagrant/application.conf /opt/apache/wave/apache-wave/config/application.conf \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/051db092/scripts/vagrant/setup-ubuntu.sh ---------------------------------------------------------------------- diff --git a/scripts/vagrant/setup-ubuntu.sh b/scripts/vagrant/setup-ubuntu.sh deleted file mode 100644 index 41eae45..0000000 --- a/scripts/vagrant/setup-ubuntu.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -# 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. - -# install the dependencies -sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 -echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list -sudo add-apt-repository ppa:openjdk-r/ppa -apt-get update -apt-get install -y ant openjdk-8-jdk mongodb-org -# set jdk version -JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ -export JAVA_HOME -# create install location -cd /opt -sudo mkdir apache -cd apache -sudo mkdir wave -# create the binary -cd /vagrant -./gradlew clean createDist - -# Get Apache Wave version -WAVE_VERSION=`sed "s/[\\t ]*=[\\t ]*/=/g" wave/config/wave.conf | grep ^version= | cut -f2 -d=` - -cd distributions -sudo tar -C /opt/apache/wave -zxvf apache-wave-bin-$WAVE_VERSION.tar.gz -cd .. -cp scripts/vagrant/application.conf /opt/apache/wave/apache-wave/config/application.conf http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/051db092/scripts/vagrant/setup-win-choco.cmd ---------------------------------------------------------------------- diff --git a/scripts/vagrant/setup-win-choco.cmd b/scripts/vagrant/setup-win-choco.cmd deleted file mode 100644 index ee4f7c6..0000000 --- a/scripts/vagrant/setup-win-choco.cmd +++ /dev/null @@ -1,18 +0,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. - -@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/051db092/scripts/vagrant/setup-win.cmd ---------------------------------------------------------------------- diff --git a/scripts/vagrant/setup-win.cmd b/scripts/vagrant/setup-win.cmd deleted file mode 100644 index 63d9d56..0000000 --- a/scripts/vagrant/setup-win.cmd +++ /dev/null @@ -1,19 +0,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. - -choco install ant jdk8 mongodb -my -xcopy c:\vagrant C:\Users\IEUser\Documents\Apache-Wave /IYS \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/051db092/settings.gradle ---------------------------------------------------------------------- diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index 049f73d..0000000 --- a/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -include "wave", "pst" \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-wave/blob/051db092/sonar-project.properties ---------------------------------------------------------------------- diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index b8e0e6a..0000000 --- a/sonar-project.properties +++ /dev/null @@ -1,22 +0,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. - -sonar.projectKey=org.apache.wave:wave -sonar.projectName=Apache Wave -sonar.projectVersion=1.0 -sonar.sources=./pst/src/main/java, ./wave/src/main/java -sonar.tests=./wave/src/test/java \ No newline at end of file
