Skip to content

Commit

Permalink
Changes from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher committed Feb 7, 2024
1 parent fa32e06 commit c03a8fe
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import java.nio.file.Files
import java.nio.file.Paths

projectDirectory = Paths.get(request.outputDirectory, request.artifactId).toFile()
projectDirectory = Paths.get(request.outputDirectory, request.artifactId);

def run(String command) {
def process = command.execute(null, projectDirectory);
def process = command.execute(null, projectDirectory.toFile());
process.consumeProcessOutput(System.out, System.err)
process.waitFor()
if (process.exitValue() != 0) {
Expand All @@ -12,3 +13,6 @@ def run(String command) {
}

run("mvn wrapper:wrapper")
Files.move(projectDirectory.resolve(".mvn"), projectDirectory.resolve("scripts").resolve(".mvn"))
Files.move(projectDirectory.resolve("mvnw"), projectDirectory.resolve("scripts").resolve("mvnw"))
Files.move(projectDirectory.resolve("mvnw.cmd"), projectDirectory.resolve("scripts").resolve("mvnw.cmd"))
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ under the License.

<requiredProperties>
<requiredProperty key="distributionName" />
<requiredProperty key="version">
<!-- Work-around for https://issues.apache.org/jira/browse/ARCHETYPE-308
By using an expression, we should prompt for the value, with a default of 1.0.0-SNAPSHOT -->
<defaultValue>${package.getClass().forName("java.lang.String").getConstructor($package.getClass().forName("java.lang.String")).newInstance("1.0.0-SNAPSHOT")}</defaultValue>
</requiredProperty>
</requiredProperties>

<fileSets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ source target/go-to-scripts-dir.sh

Re-build:
```bash
./mvnw clean package
./scripts/mvnw clean package
```

Then start afresh:
Expand Down

0 comments on commit c03a8fe

Please sign in to comment.