From 4f2031596a650a788e1d914bf5c5e2842d63406e Mon Sep 17 00:00:00 2001 From: Jonas Kunz Date: Tue, 11 Apr 2023 14:09:27 +0200 Subject: [PATCH 1/3] Generate sources for tracer project, add dummy classes to force javadoc generation in agent artifacts. --- apm-agent-tracer/pom.xml | 16 ++++++++++++ .../src/main/java/apm/JavadocPlaceHolder.java | 25 +++++++++++++++++++ .../src/main/java/apm/package-info.java | 22 ++++++++++++++++ .../co/elastic/apm/JavadocPlaceHolder.java | 25 +++++++++++++++++++ .../java/co/elastic/apm/package-info.java | 22 ++++++++++++++++ 5 files changed, 110 insertions(+) create mode 100644 elastic-apm-agent-java8/src/main/java/apm/JavadocPlaceHolder.java create mode 100644 elastic-apm-agent-java8/src/main/java/apm/package-info.java create mode 100644 elastic-apm-agent/src/main/java/co/elastic/apm/JavadocPlaceHolder.java create mode 100644 elastic-apm-agent/src/main/java/co/elastic/apm/package-info.java diff --git a/apm-agent-tracer/pom.xml b/apm-agent-tracer/pom.xml index f668f9cacf..a148c5d851 100644 --- a/apm-agent-tracer/pom.xml +++ b/apm-agent-tracer/pom.xml @@ -16,4 +16,20 @@ ${project.basedir}/.. + + + + maven-source-plugin + + + generate-source-jar + package + + jar-no-fork + + + + + + diff --git a/elastic-apm-agent-java8/src/main/java/apm/JavadocPlaceHolder.java b/elastic-apm-agent-java8/src/main/java/apm/JavadocPlaceHolder.java new file mode 100644 index 0000000000..51e357fc10 --- /dev/null +++ b/elastic-apm-agent-java8/src/main/java/apm/JavadocPlaceHolder.java @@ -0,0 +1,25 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. 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 apm; + +/** + * Required to force javadoc generation. + */ +public class JavadocPlaceHolder { +} diff --git a/elastic-apm-agent-java8/src/main/java/apm/package-info.java b/elastic-apm-agent-java8/src/main/java/apm/package-info.java new file mode 100644 index 0000000000..9e94b344bc --- /dev/null +++ b/elastic-apm-agent-java8/src/main/java/apm/package-info.java @@ -0,0 +1,22 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. 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. + */ +/** + * This project contains the Java 8 build of the elastic apm java agent. + */ +package apm; diff --git a/elastic-apm-agent/src/main/java/co/elastic/apm/JavadocPlaceHolder.java b/elastic-apm-agent/src/main/java/co/elastic/apm/JavadocPlaceHolder.java new file mode 100644 index 0000000000..2fce3f8abc --- /dev/null +++ b/elastic-apm-agent/src/main/java/co/elastic/apm/JavadocPlaceHolder.java @@ -0,0 +1,25 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. 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 co.elastic.apm; + +/** + * Required to force javadoc generation. + */ +public class JavadocPlaceHolder { +} diff --git a/elastic-apm-agent/src/main/java/co/elastic/apm/package-info.java b/elastic-apm-agent/src/main/java/co/elastic/apm/package-info.java new file mode 100644 index 0000000000..8f356b0c99 --- /dev/null +++ b/elastic-apm-agent/src/main/java/co/elastic/apm/package-info.java @@ -0,0 +1,22 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. 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. + */ +/** + * This project contains the Java 7 build of the elastic apm java agent. + */ +package co.elastic.apm; From 977f7bf8edef5a19ea80d4a018d3540f7b370cba Mon Sep 17 00:00:00 2001 From: Jonas Kunz Date: Tue, 11 Apr 2023 14:48:57 +0200 Subject: [PATCH 2/3] Fix package --- .../src/main/java/{ => co/elastic}/apm/JavadocPlaceHolder.java | 2 +- .../src/main/java/{ => co/elastic}/apm/package-info.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename elastic-apm-agent-java8/src/main/java/{ => co/elastic}/apm/JavadocPlaceHolder.java (97%) rename elastic-apm-agent-java8/src/main/java/{ => co/elastic}/apm/package-info.java (97%) diff --git a/elastic-apm-agent-java8/src/main/java/apm/JavadocPlaceHolder.java b/elastic-apm-agent-java8/src/main/java/co/elastic/apm/JavadocPlaceHolder.java similarity index 97% rename from elastic-apm-agent-java8/src/main/java/apm/JavadocPlaceHolder.java rename to elastic-apm-agent-java8/src/main/java/co/elastic/apm/JavadocPlaceHolder.java index 51e357fc10..2fce3f8abc 100644 --- a/elastic-apm-agent-java8/src/main/java/apm/JavadocPlaceHolder.java +++ b/elastic-apm-agent-java8/src/main/java/co/elastic/apm/JavadocPlaceHolder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package apm; +package co.elastic.apm; /** * Required to force javadoc generation. diff --git a/elastic-apm-agent-java8/src/main/java/apm/package-info.java b/elastic-apm-agent-java8/src/main/java/co/elastic/apm/package-info.java similarity index 97% rename from elastic-apm-agent-java8/src/main/java/apm/package-info.java rename to elastic-apm-agent-java8/src/main/java/co/elastic/apm/package-info.java index 9e94b344bc..158e41bd52 100644 --- a/elastic-apm-agent-java8/src/main/java/apm/package-info.java +++ b/elastic-apm-agent-java8/src/main/java/co/elastic/apm/package-info.java @@ -19,4 +19,4 @@ /** * This project contains the Java 8 build of the elastic apm java agent. */ -package apm; +package co.elastic.apm; From 6867126e79481a45809e64959942b2d8dee8b750 Mon Sep 17 00:00:00 2001 From: Jonas Kunz Date: Tue, 11 Apr 2023 14:51:03 +0200 Subject: [PATCH 3/3] Review suggestions --- .../co/elastic/apm/{ => premain/java8}/JavadocPlaceHolder.java | 2 +- .../java/co/elastic/apm/{ => premain/java8}/package-info.java | 2 +- .../co/elastic/apm/{ => premain/java7}/JavadocPlaceHolder.java | 2 +- .../java/co/elastic/apm/{ => premain/java7}/package-info.java | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename elastic-apm-agent-java8/src/main/java/co/elastic/apm/{ => premain/java8}/JavadocPlaceHolder.java (95%) rename elastic-apm-agent-java8/src/main/java/co/elastic/apm/{ => premain/java8}/package-info.java (95%) rename elastic-apm-agent/src/main/java/co/elastic/apm/{ => premain/java7}/JavadocPlaceHolder.java (95%) rename elastic-apm-agent/src/main/java/co/elastic/apm/{ => premain/java7}/package-info.java (95%) diff --git a/elastic-apm-agent-java8/src/main/java/co/elastic/apm/JavadocPlaceHolder.java b/elastic-apm-agent-java8/src/main/java/co/elastic/apm/premain/java8/JavadocPlaceHolder.java similarity index 95% rename from elastic-apm-agent-java8/src/main/java/co/elastic/apm/JavadocPlaceHolder.java rename to elastic-apm-agent-java8/src/main/java/co/elastic/apm/premain/java8/JavadocPlaceHolder.java index 2fce3f8abc..48109aa306 100644 --- a/elastic-apm-agent-java8/src/main/java/co/elastic/apm/JavadocPlaceHolder.java +++ b/elastic-apm-agent-java8/src/main/java/co/elastic/apm/premain/java8/JavadocPlaceHolder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package co.elastic.apm; +package co.elastic.apm.premain.java8; /** * Required to force javadoc generation. diff --git a/elastic-apm-agent-java8/src/main/java/co/elastic/apm/package-info.java b/elastic-apm-agent-java8/src/main/java/co/elastic/apm/premain/java8/package-info.java similarity index 95% rename from elastic-apm-agent-java8/src/main/java/co/elastic/apm/package-info.java rename to elastic-apm-agent-java8/src/main/java/co/elastic/apm/premain/java8/package-info.java index 158e41bd52..bdcaa05438 100644 --- a/elastic-apm-agent-java8/src/main/java/co/elastic/apm/package-info.java +++ b/elastic-apm-agent-java8/src/main/java/co/elastic/apm/premain/java8/package-info.java @@ -19,4 +19,4 @@ /** * This project contains the Java 8 build of the elastic apm java agent. */ -package co.elastic.apm; +package co.elastic.apm.premain.java8; diff --git a/elastic-apm-agent/src/main/java/co/elastic/apm/JavadocPlaceHolder.java b/elastic-apm-agent/src/main/java/co/elastic/apm/premain/java7/JavadocPlaceHolder.java similarity index 95% rename from elastic-apm-agent/src/main/java/co/elastic/apm/JavadocPlaceHolder.java rename to elastic-apm-agent/src/main/java/co/elastic/apm/premain/java7/JavadocPlaceHolder.java index 2fce3f8abc..23fd15300f 100644 --- a/elastic-apm-agent/src/main/java/co/elastic/apm/JavadocPlaceHolder.java +++ b/elastic-apm-agent/src/main/java/co/elastic/apm/premain/java7/JavadocPlaceHolder.java @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -package co.elastic.apm; +package co.elastic.apm.premain.java7; /** * Required to force javadoc generation. diff --git a/elastic-apm-agent/src/main/java/co/elastic/apm/package-info.java b/elastic-apm-agent/src/main/java/co/elastic/apm/premain/java7/package-info.java similarity index 95% rename from elastic-apm-agent/src/main/java/co/elastic/apm/package-info.java rename to elastic-apm-agent/src/main/java/co/elastic/apm/premain/java7/package-info.java index 8f356b0c99..8eb8c951bb 100644 --- a/elastic-apm-agent/src/main/java/co/elastic/apm/package-info.java +++ b/elastic-apm-agent/src/main/java/co/elastic/apm/premain/java7/package-info.java @@ -19,4 +19,4 @@ /** * This project contains the Java 7 build of the elastic apm java agent. */ -package co.elastic.apm; +package co.elastic.apm.premain.java7;