Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Maven原型生成_Java_Maven_Portlet - Fatal编程技术网

Java Maven原型生成

Java Maven原型生成,java,maven,portlet,Java,Maven,Portlet,我使用mvn archetype:create from project命令,但我不知道如何自定义我的原型,例如,我有下一个prop xml文件: <?xml version="1.0" encoding="utf-8"?> <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-inst

我使用mvn archetype:create from project命令,但我不知道如何自定义我的原型,例如,我有下一个prop xml文件:

<?xml version="1.0" encoding="utf-8"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
             http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
             http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
    version="2.0">

    <portlet>
        <portlet-name>MyPortletName</portlet-name>
        <portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class>
        <init-param>
            <name>contextConfigLocation</name>
            <value>/WEB-INF/context/portlet-context.xml</value>
        </init-param>

        <supports>
            <mime-type>text/html</mime-type>
            <portlet-mode>view</portlet-mode>
        </supports>
        <portlet-info>
            <title>My portlet</title>
        </portlet-info>
    </portlet>
</portlet-app>
我希望在生成原型时将portlet名称和标题作为参数传递,xml中的一些行将更改为这样,例如:

...
<portlet-name>${portletName}</portlet-name>
....
<portlet-info>
        <title>${portletTitle}</title>
</portlet-info>
所以我想要一个完全定制的模板,有可能吗