Skip to content

Commit 04bf693

Browse files
committed
[AMQ-9485] Host activemq-protobuf modules for modernization
1 parent 0c1eabd commit 04bf693

54 files changed

Lines changed: 11788 additions & 3 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

activemq-protobuf-test/pom.xml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
Licensed to the Apache Software Foundation (ASF) under one or more
4+
contributor license agreements. See the NOTICE file distributed with
5+
this work for additional information regarding copyright ownership.
6+
The ASF licenses this file to You under the Apache License, Version 2.0
7+
(the "License"); you may not use this file except in compliance with
8+
the License. You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
-->
18+
<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">
19+
<modelVersion>4.0.0</modelVersion>
20+
21+
<parent>
22+
<groupId>org.apache.activemq</groupId>
23+
<artifactId>activemq-parent</artifactId>
24+
<version>6.3.0-SNAPSHOT</version>
25+
</parent>
26+
27+
<groupId>org.apache.activemq.protobuf</groupId>
28+
<artifactId>activemq-protobuf-test</artifactId>
29+
30+
<packaging>jar</packaging>
31+
<name>ActiveMQ :: Protocol Buffers Tests</name>
32+
33+
<dependencies>
34+
<dependency>
35+
<groupId>junit</groupId>
36+
<artifactId>junit</artifactId>
37+
<scope>test</scope>
38+
</dependency>
39+
<dependency>
40+
<groupId>org.apache.activemq.protobuf</groupId>
41+
<artifactId>activemq-protobuf</artifactId>
42+
<version>${project.version}</version>
43+
</dependency>
44+
</dependencies>
45+
46+
<build>
47+
<pluginManagement>
48+
<plugins>
49+
<plugin>
50+
<groupId>org.apache.activemq.protobuf</groupId>
51+
<artifactId>activemq-protobuf</artifactId>
52+
<version>${project.version}</version>
53+
</plugin>
54+
</plugins>
55+
</pluginManagement>
56+
<plugins>
57+
<plugin>
58+
<artifactId>maven-surefire-plugin</artifactId>
59+
<configuration>
60+
<includes>
61+
<include>**/*Test.java</include>
62+
</includes>
63+
</configuration>
64+
</plugin>
65+
<plugin>
66+
<groupId>org.apache.activemq.protobuf</groupId>
67+
<artifactId>activemq-protobuf</artifactId>
68+
<version>${project.version}</version>
69+
<executions>
70+
<execution>
71+
<goals>
72+
<goal>compile</goal>
73+
</goals>
74+
</execution>
75+
</executions>
76+
</plugin>
77+
</plugins>
78+
</build>
79+
80+
</project>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
//
2+
// Licensed to the Apache Software Foundation (ASF) under one or more
3+
// contributor license agreements. See the NOTICE file distributed with
4+
// this work for additional information regarding copyright ownership.
5+
// The ASF licenses this file to You under the Apache License, Version 2.0
6+
// (the "License"); you may not use this file except in compliance with
7+
// the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
//
17+
18+
package org.apache.activemq.protobuf;
19+
option java_outer_classname = "DeferredUnmarshal";
20+
option deferred_decode = true;
21+
22+
message Foo {
23+
24+
optional int32 field1 = 1;
25+
optional int64 field2 = 2;
26+
27+
}
28+
29+
30+
message Bar {
31+
option base_type=Foo;
32+
33+
// These are the Foo fields.
34+
optional int32 field1 = 1;
35+
optional int64 field2 = 2;
36+
37+
optional Foo field3 = 3;
38+
39+
}
40+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
// Protocol Buffers - Google's data interchange format
2+
// Copyright 2008 Google Inc.
3+
// http://code.google.com/p/protobuf/
4+
//
5+
// Licensed under the Apache License, Version 2.0 (the "License");
6+
// you may not use this file except in compliance with the License.
7+
// You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing, software
12+
// distributed under the License is distributed on an "AS IS" BASIS,
13+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
// See the License for the specific language governing permissions and
15+
// limitations under the License.
16+
17+
// Author: kenton@google.com (Kenton Varda)
18+
//
19+
// A proto file which tests the java_multiple_files option.
20+
21+
22+
import "unittest.proto";
23+
24+
package protobuf_unittest;
25+
26+
option java_multiple_files = true;
27+
option java_outer_classname = "MultipleFilesTestProto";
28+
29+
message MessageWithNoOuter {
30+
message NestedMessage {
31+
optional int32 i = 1;
32+
}
33+
enum NestedEnum {
34+
BAZ = 3;
35+
}
36+
optional NestedMessage nested = 1;
37+
repeated TestAllTypes foreign = 2;
38+
optional NestedEnum nested_enum = 3;
39+
optional EnumWithNoOuter foreign_enum = 4;
40+
}
41+
42+
enum EnumWithNoOuter {
43+
FOO = 1;
44+
BAR = 2;
45+
}
46+
47+
service ServiceWithNoOuter {
48+
rpc Foo(MessageWithNoOuter) returns(TestAllTypes);
49+
}
50+
51+
extend TestAllExtensions {
52+
optional int32 extension_with_outer = 1234567;
53+
}

0 commit comments

Comments
 (0)