Skip to content

Fix for batch mode not being able to replace required properties#14

Closed
max-norris wants to merge 1 commit intoapache:masterfrom
max-norris:master
Closed

Fix for batch mode not being able to replace required properties#14
max-norris wants to merge 1 commit intoapache:masterfrom
max-norris:master

Conversation

@max-norris
Copy link
Copy Markdown

https://issues.apache.org/jira/browse/ARCHETYPE-509

If I specify a required property and then use that in another required property, as follows:

    <requiredProperties>
        <requiredProperty key="groupName">
        </requiredProperty>
        <requiredProperty key="serviceName">
        </requiredProperty>
        <requiredProperty key="groupId">
            <defaultValue>com.example.${groupName}</defaultValue>
        </requiredProperty>
        <requiredProperty key="package">
            <defaultValue>com.example.${groupName}</defaultValue>
        </requiredProperty>
        <requiredProperty key="artifactId">
            <defaultValue>${serviceName}</defaultValue>
        </requiredProperty>
        <requiredProperty key="version">
            <defaultValue>1.0.0-SNAPSHOT</defaultValue>
        </requiredProperty>
    </requiredProperties>

When I run an archetype generate with those properties specified:

mvn archetype:generate -B -DarchetypeGroupId=com.example -DarchetypeArtifactId=example-archetype -DgroupName=MyGroup -DserviceName=MyService

I get the following output:

[INFO] Parent element not overwritten in /private/tmp/${serviceName}/${serviceName}-app/pom.xml
[INFO] Parent element not overwritten in /private/tmp/${serviceName}/${serviceName}-proxy/pom.xml
[INFO] Parent element not overwritten in /private/tmp/${serviceName}/${serviceName}-dto/pom.xml
[INFO] Parent element not overwritten in /private/tmp/${serviceName}/${serviceName}-integration-tests/pom.xml
[INFO] Parent element not overwritten in /private/tmp/${serviceName}/${serviceName}-codegen/pom.xml
[INFO] project created from Archetype in dir: /private/tmp/${serviceName}

asfgit pushed a commit that referenced this pull request Jan 24, 2017
this closes #14
Signed-off-by: rfscholte <rfscholte@apache.org>
@rfscholte
Copy link
Copy Markdown
Contributor

Fixed in 9857d34

@rfscholte rfscholte closed this Mar 16, 2019
@jira-importer
Copy link
Copy Markdown

Resolve #796

1 similar comment
@jira-importer
Copy link
Copy Markdown

Resolve #796

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants