2. Create local repository
go to project root directory and execute
$ git init
3. Create .gitignore file in project root directory (www.gitignore.io)
4. Add files to local repo using the following command
$ git add
2. Create local repository
go to project root directory and execute
$ git init
3. Create .gitignore file in project root directory (www.gitignore.io)
4. Add files to local repo using the following command
$ git add
<scm>
in the Root pom.xml<scm> <connection>scm:svn:http://none</connection> <developerConnection>scm:svn:https://none</developerConnection> <url>scm:svn:https://none</url> </scm>
buildnumber-maven-plugin
to each maven module project pom.xml file<build> ... <plugins> ... <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>buildnumber-maven-plugin</artifactId> <version>1.3</version> <executions> <execution> <phase>validate</phase> <goals> <goal>create</goal> </goals> </execution> </executions> <configuration> <format>{0}</format> <items> <item>buildNumber</item> </items> <!-- doCheck and doUpdate actually talk to repository if it's true, Check would check that there are no local changes. Update would update it --> <docheck>false</docheck> <doupdate>false</doupdate> </configuration> </plugin> </plugins> </build>
$ mvn install
<security-constraint>
<web-resource-collection>
<web-resource-name>Secure Page</web-resource-name>
<url-pattern>/securepages/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>xAdmin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>default</realm-name>
</login-config>
<security-role>
<role-name>xAdmin</role-name>
</security-role>
<security-role-assignment>
<role-name>xAdmin</role-name>
<principal-name>testGroup</principal-name>
</security-role-assignment>
#!/bin/bash war_file= ws_name= ROLE_NAME= while getopts f:n:r: option do case "${option}" in f) war_file=${OPTARG};; n) ws_name=${OPTARG};; r) ROLE_NAME=${OPTARG};; esac done OLD_TXT="<\/web-app>" NEW_TEXT="\n <security-constraint>\n <web-resource-collection>\n <web-resource-name>Secured-Pages<\/web-resource-name>\n <url-pattern>\/*<\/url-pattern>\n <\/web-resource-collection>\n <auth-constraint>\n <role-name>$ROLE_NAME<\/role-name>\n <\/auth-constraint>\n <\/security-constraint>\n \n <login-config>\n <auth-method>BASIC<\/auth-method>\n <realm-name>default<\/realm-name>\n <\/login-config>\n \n <security-role>\n <role-name>$ROLE_NAME<\/role-name>\n <\/security-role>\n<\/web-app>\n" cp $war_file $war_file.original jar xvf $war_file cd WEB-INF/ sed -i -r "s/$OLD_TXT/$NEW_TEXT/g" web.xml echo "<weblogic-web-app xmlns="'"http://www.bea.com/ns/weblogic/weblogic-web-app"'"> <context-root>"BanksESB_$ws_name"</context-root> <security-role-assignment> <role-name>$ROLE_NAME</role-name> <principal-name>$ROLE_NAME</principal-name> </security-role-assignment> </weblogic-web-app>" > weblogic.xml cd .. jar cvfM $war_file WEB-INF/* #zip war_file WEB-INF/* rm -r WEB-INF/