[ 
https://issues.apache.org/jira/browse/MASSEMBLY-992?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17797923#comment-17797923
 ] 

ASF GitHub Bot commented on MASSEMBLY-992:
------------------------------------------

elharo commented on code in PR #174:
URL: 
https://github.com/apache/maven-assembly-plugin/pull/174#discussion_r1429161427


##########
src/site/apt/examples/using-inline-descriptors.apt.vm:
##########
@@ -0,0 +1,86 @@
+ ------
+  Using Inline Assembly Descriptors
+ ------
+  Slawomir Jaranowski
+ ------
+  2023-12-17
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ https://maven.apache.org/doxia/references/apt-format.html
+
+Using Inline Assembly Descriptors
+
+* Introduction
+
+  For simple usage we can inline Assembly descriptor into project 
configuration.

Review Comment:
   the project configuration



##########
src/site/apt/examples/using-inline-descriptors.apt.vm:
##########
@@ -0,0 +1,86 @@
+ ------
+  Using Inline Assembly Descriptors
+ ------
+  Slawomir Jaranowski
+ ------
+  2023-12-17
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ https://maven.apache.org/doxia/references/apt-format.html
+
+Using Inline Assembly Descriptors
+
+* Introduction
+
+  For simple usage we can inline Assembly descriptor into project 
configuration.
+  We don't need to create additional file with Assembly descriptor.

Review Comment:
   an additional



##########
src/site/apt/examples/using-inline-descriptors.apt.vm:
##########
@@ -0,0 +1,86 @@
+ ------
+  Using Inline Assembly Descriptors
+ ------
+  Slawomir Jaranowski
+ ------
+  2023-12-17
+ ------
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ https://maven.apache.org/doxia/references/apt-format.html
+
+Using Inline Assembly Descriptors
+
+* Introduction
+
+  For simple usage we can inline Assembly descriptor into project 
configuration.
+  We don't need to create additional file with Assembly descriptor.
+
+  It can allow simplify configuration in case of inherited,

Review Comment:
   delete "allow"
   sounds like a sentence fragment? Is something missing? inherited what?





> Facility to define assembly descriptor in body of POM
> -----------------------------------------------------
>
>                 Key: MASSEMBLY-992
>                 URL: https://issues.apache.org/jira/browse/MASSEMBLY-992
>             Project: Maven Assembly Plugin
>          Issue Type: New Feature
>            Reporter: Garret Wilson
>            Assignee: Slawomir Jaranowski
>            Priority: Major
>             Fix For: 3.7.0
>
>
> The Maven Assembly Plugin allows custom descriptors to be defined, but only 
> in an external file. Please add the capability to define the descriptor in 
> the body of the POM itself.
> Requiring a separate descriptor file makes it almost impossible to declare an 
> assembly in a parent POM so that it can be inherited by child POMs. The 
> documentation describe a way to [share 
> descriptors|https://maven.apache.org/plugins/maven-assembly-plugin/examples/sharing-descriptors.html],
>  but it is complex and doesn't obviously support Maven property interpolation.
> Without this facility, in order to easily inherit an assembly from a parent 
> POM, I'm currently resorting to workaround involving AntRun to generate an 
> assembly descriptor on the fly. See [this 
> {{pom.xml}}|https://github.com/globalmentor/globalmentor-root/blob/main/pom.xml].
>  It's pretty convoluted and tedious to get right. In addition, it has to be 
> placed in a phase that is guaranteed to run before the execution of the Maven 
> Assembly Plugin itself.
> {code:xml}
>           <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-antrun-plugin</artifactId>
>             <executions>
>               <execution>
>                 <!--
>                   Generates an assembly descriptor for the binary 
> distribution.
>                 -->
>                 <id>generate-bin-assembly-descriptor</id>
>                 <phase>prepare-package</phase>
>                 <goals>
>                   <goal>run</goal>
>                 </goals>
>                 <configuration>
>                   <skip>${_isSkipGenerateExe}</skip>
>                   <target>
>                     <echo file="${assemblyDirectory}/bin.xml" 
> encoding="UTF-8">
>                       <![CDATA[<assembly 
> xmlns="http://maven.apache.org/ASSEMBLY/2.0.0"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
> xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.0.0 
> http://maven.apache.org/xsd/assembly-2.0.0.xsd";>
>   <id>bin</id>
>   <formats>
>     <format>tar.xz</format>
>     <format>zip</format>
>   </formats>
>   <fileSets>
>     <fileSet>
>       <directory>${project.build.directory}</directory>
>       <includes>
>         <include>*-exe.jar</include>
>       </includes>
>       <outputDirectory>bin</outputDirectory>
>     </fileSet>
>     <fileSet>
>       <directory>${binOutputDirectory}</directory>
>       <outputDirectory>bin</outputDirectory>
>       <!--
>         Set access permissions to `-rwxrwxr-x`, which corresponds to adding 
> `+x` to a created file.
>         Manually setting permissions files in the archive is necessary for 
> building on Windows,
>         because input files will have lost attributes during the build 
> process.
>       -->
>       <fileMode>0775</fileMode>
>     </fileSet>
>   </fileSets>
> </assembly>]]>
>                     </echo>
>                   </target>
>                 </configuration>
>               </execution>
>             </executions>
>           </plugin>
> {code}
> This was requested and finally implemented for Versions Maven Plugin; see 
> [#258|https://github.com/mojohaus/versions/issues/258] and 
> [#684|https://github.com/mojohaus/versions/issues/684], along with [_Versions 
> Maven Plugin rules that are 
> inheritable_|https://stackoverflow.com/q/72416739] on Stack Overflow.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to