Java/Wicket: Compile Basic Hello World with Resources

谁说我不能喝 提交于 2019-12-04 04:58:34

The solution, if you want your HTML in the wicket best practice place (with your classes) is to add this to the build section of your pom.

<build>
    <resources>
        <resource>
            <filtering>false</filtering>
            <directory>src/main/resources</directory>
        </resource>
        <resource>
            <filtering>false</filtering>
            <directory>src/main/java</directory>
            <includes>
                <include>**</include>
            </includes>
            <excludes>
                <exclude>**/*.java</exclude>
            </excludes>
        </resource>
    </resources>
</build>
</project>

You should put you HelloWorld.html file into src/main/webapp folder. This way it will be included in the war file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!