0

gCurrently trying to make deployment of my web-project (EAR packed) into jboss, and met next problem:
settings.xml:

<settings>  
    ...  
    <servers>  
        <server>
            <id>default</id>  
            <password>xxx</password>  
            <username>xxx</username>  
        </server>
    </servers> 
    ...
</settings>

What do I need to write in jboss-as-maven-plugin configuration in maven pom.xml to make it take credentials from this section? For example, with Tomcat it was < server> parameter. I already tried "server","serverId","id", changing "username" to "name" in settings.xml - no effect.

The reason for this is security measure - lets say i wanna post this project on github etc, but don't want keeping credentials at file. Of-course, as i googled around, I so, how to handle it via command line - therefore, can be handled via IDE. But what in case of many projects etc?... Change everywhere?..

4

2 回答 2

1

如果您在配置中使用最新的插件 7.4.Final,您只需在 settings.xml 中提供服务器 ID。

<build>
    <plugins>
        <plugin>
            <groupId>org.jboss.as.plugins</groupId>
            <artifactId>jboss-as-maven-plugin</artifactId>
            <version>7.4.Final</version>
            <configuration>
                <id>default</id>
            </configuration>
        </plugin>
    </plugins>
</build>
于 2013-05-15T22:17:10.937 回答
0

在我们的项目中,我们在 maven 中定义了它

<build>
        <plugins>
            <plugin>
                <groupId>org.jboss.as.plugins</groupId>
                <artifactId>jboss-as-maven-plugin</artifactId>
                <version>7.1.1.Final</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
</build>

然后从 teamcity/Jenkins 部署它

-Djboss-as.hostname=x.x.x.x
-Djboss-as.username=admin
-Djboss-as.password=adminadmin
于 2013-05-21T07:27:32.370 回答