You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/07/15 20:10:32 UTC

[GitHub] [solr] HoustonPutman opened a new pull request, #946: SOLR-16299: Remove symlinks for ref-guide examples

HoustonPutman opened a new pull request, #946:
URL: https://github.com/apache/solr/pull/946

   https://issues.apache.org/jira/browse/SOLR-16299
   
   The example classes now live in the ref-guide module, and all necessary validation (`compile`, `test`, `spotless`, etc.) are done on them. However they do not create a maven artifact or affect the jar checks in any way, which is what we want.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] uschindler commented on a diff in pull request #946: SOLR-16299: Remove symlinks for ref-guide examples

Posted by GitBox <gi...@apache.org>.
uschindler commented on code in PR #946:
URL: https://github.com/apache/solr/pull/946#discussion_r923658308


##########
solr/solr-ref-guide/java-examples.gradle:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+// Compiling, Testing and Validation for the java examples in the Solr Ref Guide
+
+apply plugin: 'java'
+

Review Comment:
   I think we should maybe unset the "main" sourceset completely and/or disable all tasks that try to compile the main classes.
   
   How about: `sourceSets.remove(sourceSets.main)`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] uschindler commented on a diff in pull request #946: SOLR-16299: Remove symlinks for ref-guide examples

Posted by GitBox <gi...@apache.org>.
uschindler commented on code in PR #946:
URL: https://github.com/apache/solr/pull/946#discussion_r923660168


##########
solr/solr-ref-guide/java-examples.gradle:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+// Compiling, Testing and Validation for the java examples in the Solr Ref Guide
+
+apply plugin: 'java'
+

Review Comment:
   Otherwise this would add a non-existing "main/src" directory to eclipse and other IDEs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] uschindler commented on pull request #946: SOLR-16299: Remove symlinks for ref-guide examples

Posted by GitBox <gi...@apache.org>.
uschindler commented on PR #946:
URL: https://github.com/apache/solr/pull/946#issuecomment-1187918380

   Ok so it turns the whole thing into a java subproject. The confusing thing is that the `apply plugin: 'java'` wasn't done in the main gradle file.
   
   I am +/-0 factoring it out to separate file.I'd prefer from the style persepctive to have app `apply` instructions at beginning of build.gradle. The "compile and test java code" part is then just down in the file with comments "antora stuff starts here", "examples stuff is here".


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] uschindler commented on pull request #946: SOLR-16299: Remove symlinks for ref-guide examples

Posted by GitBox <gi...@apache.org>.
uschindler commented on PR #946:
URL: https://github.com/apache/solr/pull/946#issuecomment-1186128544

   Looks good to me. If spotless and all works well.
   I am not fully sure if the examples Gradle file is a separate subproject now or is it just applied from refguide? The setup seems strange to me.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] uschindler commented on a diff in pull request #946: SOLR-16299: Remove symlinks for ref-guide examples

Posted by GitBox <gi...@apache.org>.
uschindler commented on code in PR #946:
URL: https://github.com/apache/solr/pull/946#discussion_r923664131


##########
solr/solr-ref-guide/java-examples.gradle:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+// Compiling, Testing and Validation for the java examples in the Solr Ref Guide
+
+apply plugin: 'java'
+

Review Comment:
   I think if "src/main" does not exist it will execute the tasks (including forbiddenapis,...), but all will execute with result "NO-SOURCE".
   So I think its fine, unless somebody adds a src/main folder.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] uschindler commented on a diff in pull request #946: SOLR-16299: Remove symlinks for ref-guide examples

Posted by GitBox <gi...@apache.org>.
uschindler commented on code in PR #946:
URL: https://github.com/apache/solr/pull/946#discussion_r923660168


##########
solr/solr-ref-guide/java-examples.gradle:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+// Compiling, Testing and Validation for the java examples in the Solr Ref Guide
+
+apply plugin: 'java'
+

Review Comment:
   Otherwise this would add a non-existing "src/main/" directory to eclipse and other IDEs.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] HoustonPutman commented on pull request #946: SOLR-16299: Remove symlinks for ref-guide examples

Posted by GitBox <gi...@apache.org>.
HoustonPutman commented on PR #946:
URL: https://github.com/apache/solr/pull/946#issuecomment-1187874914

   It's just a separate file thats applied to the same `refguide` project. I can move it all to the same `build.gradle`, but thought it might be easier to understand this way.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] uschindler commented on a diff in pull request #946: SOLR-16299: Remove symlinks for ref-guide examples

Posted by GitBox <gi...@apache.org>.
uschindler commented on code in PR #946:
URL: https://github.com/apache/solr/pull/946#discussion_r923907582


##########
solr/solr-ref-guide/java-examples.gradle:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+// Compiling, Testing and Validation for the java examples in the Solr Ref Guide
+
+apply plugin: 'java'
+

Review Comment:
   I think the same is described in above discussion. So at moment, theres no way to disable the main sourceset. If the directories do not exist in the refguide folder, I think we're fine. It is just stupid that all those tasks are generated and executed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] HoustonPutman commented on a diff in pull request #946: SOLR-16299: Remove symlinks for ref-guide examples

Posted by GitBox <gi...@apache.org>.
HoustonPutman commented on code in PR #946:
URL: https://github.com/apache/solr/pull/946#discussion_r923877781


##########
solr/solr-ref-guide/java-examples.gradle:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+// Compiling, Testing and Validation for the java examples in the Solr Ref Guide
+
+apply plugin: 'java'
+

Review Comment:
   When I use `sourceSets.remove(sourceSets.main)`, I get this error:
   
   ```
   FAILURE: Build failed with an exception.
   
   * What went wrong:
   A problem occurred configuring root project 'solr-root'.
   > SourceSet with name 'main' not found.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] uschindler commented on a diff in pull request #946: SOLR-16299: Remove symlinks for ref-guide examples

Posted by GitBox <gi...@apache.org>.
uschindler commented on code in PR #946:
URL: https://github.com/apache/solr/pull/946#discussion_r923665690


##########
solr/solr-ref-guide/java-examples.gradle:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+// Compiling, Testing and Validation for the java examples in the Solr Ref Guide
+
+apply plugin: 'java'
+

Review Comment:
   See issue here: https://discuss.gradle.org/t/impossible-to-remove-main-source-set-when-using-eclipse-plugin/1177



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] HoustonPutman merged pull request #946: SOLR-16299: Remove symlinks for ref-guide examples

Posted by GitBox <gi...@apache.org>.
HoustonPutman merged PR #946:
URL: https://github.com/apache/solr/pull/946


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


[GitHub] [solr] HoustonPutman commented on a diff in pull request #946: SOLR-16299: Remove symlinks for ref-guide examples

Posted by GitBox <gi...@apache.org>.
HoustonPutman commented on code in PR #946:
URL: https://github.com/apache/solr/pull/946#discussion_r924959800


##########
solr/solr-ref-guide/java-examples.gradle:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+// Compiling, Testing and Validation for the java examples in the Solr Ref Guide
+
+apply plugin: 'java'
+

Review Comment:
   Ahh sorry, somehow I missed one of your comments.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org