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

ASF GitHub Bot commented on TINKERPOP-2391:
-------------------------------------------

FlorianHockmann commented on a change in pull request #1302:
URL: https://github.com/apache/tinkerpop/pull/1302#discussion_r458132265



##########
File path: gremlin-dotnet/src/pom.xml
##########
@@ -33,14 +33,43 @@ limitations under the License.
 
     <build>
         <plugins>
-            <!-- Override the execution from gremlin-dotnet to disable code 
generation from happening a second time -->
             <plugin>
                 <groupId>org.codehaus.gmavenplus</groupId>
                 <artifactId>gmavenplus-plugin</artifactId>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.codehaus.groovy</groupId>
+                        <artifactId>groovy-all</artifactId>
+                        <version>${groovy.version}</version>
+                        <type>pom</type>
+                        <scope>runtime</scope>
+                    </dependency>
+                </dependencies>
                 <executions>
                     <execution>
-                        <id>generate-dsl</id>
-                        <phase/>
+                        <id>update-version</id>

Review comment:
       This looks good to me, but I'm still wondering about the `generate-dsl` 
execution at the bottom of this file as that is still using the `*.template` 
files.
   But we can probably completely remove that part now as it seems to have only 
put the `project.version` back in the .NET project files in case a release 
candidate was deployed which might have used a .NET specific version like 
`3.5.0-rc1`.

##########
File path: gremlin-dotnet/src/pom.xml
##########
@@ -33,14 +33,43 @@ limitations under the License.
 
     <build>
         <plugins>
-            <!-- Override the execution from gremlin-dotnet to disable code 
generation from happening a second time -->
             <plugin>
                 <groupId>org.codehaus.gmavenplus</groupId>
                 <artifactId>gmavenplus-plugin</artifactId>
+                <dependencies>
+                    <dependency>
+                        <groupId>org.codehaus.groovy</groupId>
+                        <artifactId>groovy-all</artifactId>
+                        <version>${groovy.version}</version>
+                        <type>pom</type>
+                        <scope>runtime</scope>
+                    </dependency>
+                </dependencies>
                 <executions>
                     <execution>
-                        <id>generate-dsl</id>
-                        <phase/>
+                        <id>update-version</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <scripts>
+                                <script>
+def mavenVersion = "${project.version}"
+def rawVersion = mavenVersion.replace("-SNAPSHOT", "")
+def file = new File("${project.basedir}/Gremlin.Net/Gremlin.Net.csproj")
+file.write(file.getText("UTF-8").replaceFirst(/&lt;Version&gt;(.*)&lt;\/Version&gt;/,
 "&lt;Version&gt;" + mavenVersion + "&lt;/Version&gt;").
+                                 
replaceFirst(/&lt;FileVersion&gt;(.*)&lt;\/FileVersion&gt;/, 
"&lt;FileVersion&gt;" + rawVersion + ".0&lt;/FileVersion&gt;").

Review comment:
       We can do it like this, but I think that we can also just remove the 
elements `FileVersion` and `AssemblyVersion` from the `csproj` as they are 
optional and their default values are already what we set here explicitly, 
e.g., a `Version` of `3.5.0` leads to both `FileVersion` and `AssemblyVersion` 
being `3.5.0.0` and a `Version` of `3.5.0-SNAPSHOT` also results in `3.5.0.0`.
   So, I think that there is no point in specifying them explicitly in the 
`csproj` which means that we don't have to take care off them here.
   
   For reference: [This blog 
post](https://andrewlock.net/version-vs-versionsuffix-vs-packageversion-what-do-they-all-mean/)
 explains these version elements and their default values.
   
   But we can also keep this as is from my side as it should be working like 
this. I just thought that I mention it in case you want to simplify this a bit.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


> Drop GLV Templating System
> --------------------------
>
>                 Key: TINKERPOP-2391
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2391
>             Project: TinkerPop
>          Issue Type: Improvement
>          Components: build-release
>    Affects Versions: 3.5.0
>            Reporter: Stephen Mallette
>            Assignee: Stephen Mallette
>            Priority: Minor
>
> The GLV template system is not really helpful to the ongoing maintenance of 
> GLVs especially since we now have a unified test system for it. Remove the 
> templates for 3.5.0.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to