<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Trigger Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/trigger/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/trigger/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Tue, 11 May 2021 05:26:06 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>DBMS Interview Q&#038;A Part- 2</title>
		<link>https://www.scmgalaxy.com/tutorials/dbms-interview-qa-part-2/</link>
		
		<dc:creator><![CDATA[Chandan Kumar]]></dc:creator>
		<pubDate>Tue, 11 May 2021 05:12:12 +0000</pubDate>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[dbms]]></category>
		<category><![CDATA[Denormalization]]></category>
		<category><![CDATA[Engineers]]></category>
		<category><![CDATA[Interview]]></category>
		<category><![CDATA[Joins]]></category>
		<category><![CDATA[Locks]]></category>
		<category><![CDATA[Primary Key]]></category>
		<category><![CDATA[Questions]]></category>
		<category><![CDATA[Transaction]]></category>
		<category><![CDATA[Trigger]]></category>
		<guid isPermaLink="false">https://www.scmgalaxy.com/tutorials/?p=6166</guid>

					<description><![CDATA[<p>Q1. Can you create a table without using create command ? A. Yes, we can create table with the help [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/dbms-interview-qa-part-2/">DBMS Interview Q&#038;A Part- 2</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h5 class="wp-block-heading">Q1. Can you create a table without using create command ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Yes, we can create table with the help of SELECT INTO statement. It<br>copies content of one table to another table. However, there should be<br>at least one table from where we can copy content.<br>Example :  Copying all columns : select * into new_table from old_table where<br>condition<br>Copying specific column : select col1,col2 into new_table from old_table<br>where condition<br>Creating new empty table : select * into new_table from old_table where 1<br>= 0</p>



<h5 class="wp-block-heading">Q2. What is Denormalization ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> It is the reverse process of Normalization. It is the process of trying to<br>improve the readability of the database by grouping data. Denormalization<br>is also used for speeding up the performance.</p>



<h5 class="wp-block-heading">Q3. What are Joins ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Join clause are used to combine rows from two or more tables,<br>depending upon the columns between them.</p>



<h5 class="wp-block-heading">Q4. What are the different types of Joins ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Different types of Joins are :</p>



<ol class="wp-block-list"><li><strong>INNER JOIN</strong> : It returns all records that are common in both tables.</li><li><strong>LEFT OUTER JOIN</strong> : It returns all records from the left table, and matched records from right table</li><li><strong>RIGHT OUTER JOIN</strong> : It returns all records from the right table, and matched records from left table.</li><li><strong>FULL OUTER JOIN</strong> : It returns all records when there is a match in either left or right table.</li></ol>



<h5 class="wp-block-heading">Q5. Explain Transaction ?</h5>



<p class="wp-block-paragraph"><strong>A. </strong>Transaction refers to the collection of multiple statements, that are<br>responsible for transferring a database from one consistent state to another<br>consistent state.</p>



<h5 class="wp-block-heading">Q6. Explain the role of views in database ?</h5>



<p class="wp-block-paragraph">A.View refers to the virtual table. We can create view using create view<br>statement.</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
CREATE VIEW as Select col1
FROM table1
where CONDITION;
</pre></div>


<h5 class="wp-block-heading">Q7. Explain Trigger ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Triggers are defined as special kind of stored programs, which are<br>automatically executed whenever a specific operation occurs in the<br>database server.</p>



<h5 class="wp-block-heading">Q8. What are Locks ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Locking is the mechanism to protect data integrity and ensure data<br>consistency during transactions. Locks are the most common cause of<br>blocked processes. Stronger the Isolation level, more the chances of<br>blocking.</p>



<h5 class="wp-block-heading">Q9. Explain different types of Locks ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> Locks are broadly characterized into following types :</p>



<p class="wp-block-paragraph"><strong>Shared Locks</strong> : These locks are acquired by readers during read<br>operations. In other words, these locks exist when two transactions are<br>granted read access. Data updation is not allowed until shared lock is<br>released.<br><strong>Exclusive Locks</strong> : In exclusive lock, data items can be both read as well<br>as written by the transaction. In Exclusive lock, multiple transactions do not<br>modify the same data simultaneously.</p>



<h5 class="wp-block-heading">Q10. What is Super Key ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> An attribute or set of attributes that uniqueness in database is refered to<br>as Super key. It is the superset of Candidate key.</p>



<h5 class="wp-block-heading">Q11. What is Candidate Key ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> A minimal set of attribute/attributes that can be used to uniquely identify<br>a single row in a given relation is refered to as Candidate key.</p>



<h5 class="wp-block-heading">Q12. Explain Primary Key ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> DB Designer selects one of the candidate key as primary key for a<br>relation for the purpose of identification of a tuple uniquely. It is identified<br>during table creation.</p>



<h5 class="wp-block-heading">Q13. What is Composite Key ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> If a primary key has more than one attribute, then it is referred to as<br>Composite key.</p>



<h5 class="wp-block-heading">Q14. Explain Foreign Key ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> A set of attribute/attributes that is used to establish and enforce a link<br>between data in two or more relations.</p>



<h5 class="wp-block-heading">Q15. Can a table have more than one primary key ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> No.</p>



<h5 class="wp-block-heading">Q16. Can We Have NULL Value in Primary Key?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> No.</p>



<h5 class="wp-block-heading">Q17. What are cursors ?</h5>



<p class="wp-block-paragraph"><strong>A.</strong> A cursor is a temporary work area created in system memory when a<br>SQL statement is executed. A cursor can hold more than one row, but can<br>process only one row at a time.</p>



<h5 class="wp-block-heading">Q18.<strong>What are the differences between Hash join, Merge join and Nested loops?</strong></h5>



<figure class="wp-block-table"><table><tbody><tr><td class="has-text-align-center" data-align="center"><strong>Hash join</strong></td><td class="has-text-align-center" data-align="center"><strong>Merge join</strong></td><td class="has-text-align-center" data-align="center"><strong>Nested loops</strong></td></tr><tr><td class="has-text-align-center" data-align="center">The hash join is used when you have to join large tables.</td><td class="has-text-align-center" data-align="center">Merge join is used when projections of the joined tables are sorted on the join columns.</td><td class="has-text-align-center" data-align="center">The nested loop consists of an outer loop and an inner loop.</td></tr></tbody></table></figure>



<h5 class="wp-block-heading">Q19. <strong>What do you understand by Proactive, Retroactive and Simultaneous Update</strong> ?</h5>



<ol class="wp-block-list"><li><strong>Proactive Update:</strong> These updates are applied to the database before it becomes effective in the real-world environment.</li><li><strong>Retroactive Update:</strong> These retroactive updates are applied to a database after it becomes effective in the real-world environment.</li><li><strong>Simultaneous Update:</strong> These updates are applied to the database at the same instance of time as it becomes effective in a real-world environment.</li></ol>



<h5 class="wp-block-heading">Q20.<strong>What do you understand by Data Independence?</strong></h5>



<p class="wp-block-paragraph"><strong>A. </strong>When you say an application has data independence, it implies that the application is independent of the storage structure and data access strategies of data.</p>



<p class="wp-block-paragraph"></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/dbms-interview-qa-part-2/">DBMS Interview Q&#038;A Part- 2</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Trigger builds remotely in Jenkins? &#124; Jenkins Tutorials &#124; scmGalaxy</title>
		<link>https://www.scmgalaxy.com/tutorials/how-to-trigger-builds-remotely-in-jenkins/</link>
					<comments>https://www.scmgalaxy.com/tutorials/how-to-trigger-builds-remotely-in-jenkins/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sat, 07 Jan 2017 06:57:01 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Builds]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[Jenkins Tutorial]]></category>
		<category><![CDATA[Remotely]]></category>
		<category><![CDATA[Trigger]]></category>
		<category><![CDATA[Trigger builds]]></category>
		<category><![CDATA[Trigger builds remotely in Jenkins]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2017/01/07/how-to-trigger-builds-remotely-in-jenkins/</guid>

					<description><![CDATA[<p>How to Trigger builds remotely in Jenkins? 1. Create a user &#8211; You need to create a user in jenkins [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-trigger-builds-remotely-in-jenkins/">How to Trigger builds remotely in Jenkins? | Jenkins Tutorials | scmGalaxy</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img fetchpriority="high" decoding="async" class="size-full wp-image-2956 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/how-to-trigger-builds-remot.png" alt="trigger-builds-remotely-in-jenkins" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/how-to-trigger-builds-remot.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/01/how-to-trigger-builds-remot-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></div>
<div><strong>How to Trigger builds remotely in Jenkins?</strong></div>
<div></div>
<div><strong>1. Create a user &#8211; You need to create a user in jenkins using you would like to trigger a jenkins jobs from remote loction or script</strong></div>
<div></div>
<div>How to create users in Jenkins?</div>
<div>Manage Jenkins &#8211;&gt; Manage Users &#8211;&gt; Create User</div>
<div></div>
<div><strong>2. Assign a right privillage to the specific user?</strong></div>
<div>How to assign privillage to the user?</div>
<div>Manage Jenkins &#8211;&gt; Configure Global Security &#8211;&gt; Enabled &#8220;Anyone can do anything&#8221;</div>
<div>OR</div>
<div>Manage Jenkins &#8211;&gt; Configure Global Security &#8211;&gt; Configure &#8220;Matrix-based security&#8221; for the specific users and assign atleast following Permissions.</div>
<div></div>
<div>Overall &#8211; Read</div>
<div>Job &#8211; Build</div>
<div>Job &#8211; Read</div>
<div>Job &#8211; Workspace</div>
<div></div>
<div><strong>3. Find out jenkins user &#8220;API Token&#8221;</strong></div>
<div>How to find jenkins user &#8220;API Token&#8221;?</div>
<div>&#8220;</div>
<div>Click on the user name located at top right(e.g http://54.171.140.1:8080/user/admin1/) &#8211;&gt; Configure &#8211;&gt; Locate the &#8220;API Token&#8221; section.</div>
<div></div>
<div><strong>4. Enabled &#8220;Trigger builds remotely&#8221; in Jenkins Job Configuration.</strong></div>
<div>Click on the desired job &#8211;&gt; Configure &#8211;&gt; Locate the &#8220;Trigger builds remotely&#8221; under &#8220;Build Triggers&#8221; Tab</div>
<div>Enabled the check box of &#8220;Trigger builds remotely&#8221;</div>
<div>Provide some Authentication Token e.g &#8211; iFBDOBhNhaxL4T9ass93HRXun2JF161Z</div>
<div>$ Save</div>
<div></div>
<div><strong>5. Formulate the command to run using curl. </strong></div>
<div>&gt; curl &#8211;user userid:API-Token http://IP OR HOST:PORT/job/JOB_NAME/build?token=Authentication_Token</div>
<div>eg.curl &#8211;user admin1:91367cf0389eaf89669f74c9963c9fb3 http://54.171.140.1:8080/job/ANT-BUILD/build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z</div>
<div></div>
<div><strong>Some of other formats which is being tried in google but need to be tested with specific users. there are working with &#8220;Anonymous&#8221;</strong></div>
<div>&gt; curl -X POST http://admin1:91367cf0389eaf89669f74c9963c9fb3@54.171.140.1:8080/job/ANT-BUILD/build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z</div>
<div></div>
<div>
<p>&gt; wget <a href="http://admin1:91367cf0389eaf89669f74c9963c9fb3@54.171.140.1:8080/job/ANT-BUILD/build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z">http://admin1:91367cf0389eaf89669f74c9963c9fb3@54.171.140.1:8080/job/ANT-BUILD/build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z</a></p>
<p>WORKING WITH NEW JENKINS<br />
&gt; wget &#8211;auth-no-challenge &#8211;user=admin &#8211;password=5ad344f0518640f62d0483084bb889bc http://13.126.143.49:8080/job/ANT//build?token=iFBDOBhNhaxL4T9ass93HRXun2JF161Z</p>
</div>
<p><strong>If you are using wget 1.11 against Jenkins version 1.586 and above with the JENKINS-25169 fix, you might need to use the following options:</strong><br />
wget &#8211;auth-no-challenge &#8211;http-user=user &#8211;http-password=apiToken &#8211;secure-protocol=TLSv1 http://jenkins.yourcompany.com/job/your_job/build?token=TOKEN</p>
<p><strong>If you are using wget 1.11, you might need to use the following options:</strong><br />
wget &#8211;auth-no-challenge &#8211;http-user=user &#8211;http-password=apiToken http://jenkins.yourcompany.com/job/your_job/build?token=TOKEN</p>
<p><strong>With wget 1.10.x the following is enough (but will not work with 1.11.x) :</strong><br />
wget http://user:apiToken@jenkins.yourcompany.com/job/your_job/build?token=TOKEN</p>
<div>
<div><strong>If you are a Windows User!</strong></div>
<div></div>
<div>‘gitbash’ is a program combined of git and bash. A bash is shell that runs commands once you type the name of command and press enter. <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></div>
<div></div>
<div>Download  the git bash from here <a href="https://git-scm.com/download/win" target="_blank" rel="noopener">https://git-scm.com/download/win</a> and install it.</div>
<div></div>
</div>
<div></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/how-to-trigger-builds-remotely-in-jenkins/">How to Trigger builds remotely in Jenkins? | Jenkins Tutorials | scmGalaxy</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/how-to-trigger-builds-remotely-in-jenkins/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Jenkins Command line Reference for login and trigger a job</title>
		<link>https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/</link>
					<comments>https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Thu, 05 Feb 2015 00:00:00 +0000</pubDate>
				<category><![CDATA[Jenkins]]></category>
		<category><![CDATA[Command line]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[How to login in Jenkins]]></category>
		<category><![CDATA[How to trigger a job in Jenkins]]></category>
		<category><![CDATA[Jenkins Command line]]></category>
		<category><![CDATA[Jenkins Command line Guide]]></category>
		<category><![CDATA[Jenkins Command line Reference]]></category>
		<category><![CDATA[Jenkins Command line Tutorial]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[Login]]></category>
		<category><![CDATA[Login Jenkins]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[Reference]]></category>
		<category><![CDATA[Steps]]></category>
		<category><![CDATA[Trigger]]></category>
		<category><![CDATA[Ways]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2015/02/05/jenkins-command-line-reference-for-login-and-trigger-a-job/</guid>

					<description><![CDATA[<p>Grep will return 0 while the build is running: $ curl http://myjenkins/job/myjob/lastBuild/api/json &#124; grep &#8211;color result\&#8221;:null $ echo $? Trigger [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/">Jenkins Command line Reference for login and trigger a job</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img decoding="async" class="alignnone size-full wp-image-3535 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/jenkins-command-line-refere.png" alt="jenkins-command-line-reference" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/jenkins-command-line-refere.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2015/02/jenkins-command-line-refere-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p><b>Grep will return 0 while the build is running:</b></p>
<p>$ curl http://myjenkins/job/myjob/lastBuild/api/json | grep &#8211;color result\&#8221;:null</p>
<p>$ echo $?</p>
<p><strong>Trigger a Jenkins Job from command line</strong></p>
<p>$ wget http://yourserver/job/MyJobname/build?delay=0sec</p>
<p>$ wget -O &#8211; $HUDSON_URL/job/JOBNAME/build</p>
<p><strong>Trigger a Jenkins Job without authentication</strong></p>
<p>$ curl http://jenkins:8080/job/my%20job/build</p>
<p><strong>Trigger a Jenkins Job with authentication</strong></p>
<p>$ curl &#8211;user dbacher:$MY_API_TOKEN http://jenkins:8080/job/my%20job/build</p>
<p>$ curl &#8211;user &lt;your_jenkins_username&gt;:&lt;your_jenkins_API_key&gt; http://&lt;jenkins_server_url&gt;/job/&lt;your_jenkins_job_name&gt;/build</p>
<p><strong>Running commands against a secure Jenkins (basic auth or ssh keys)</strong></p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins help &#8211;username me &#8211;password mypassword</p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins help -i ~/.ssh/id_rsa</p>
<p><strong>Triggering a job build against a secure Jenkins (avoiding a 1.5 year old open bug!)</strong></p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins build &#8216;My Awesome Jenkins Job&#8217; -i ~/.ssh/id_rsa</p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins build &#8216;My Awesome Jenkins Job&#8217; -i ~/.ssh/id_rsa -s -v</p>
<p><strong>Passing parameters when triggering a job build</strong></p>
<p>$ java -jar jenkins-cli.jar -s http://myjenkins build &#8216;Deploy XYZ App&#8217; -i ~/.ssh/id_rsa -s -v -p target_env=api.cloudfoundry.com -p branch=master</p>
<p><strong>Reference</strong></p>
<p><a href="http://starkandwayne.com/articles/2013/04/12/jenkins-builds-from-cli/" target="_blank" rel="noopener">http://starkandwayne.com/articles/2013/04/12/jenkins-builds-from-cli/</a></p>
<p><a href="http://www.scmgalaxy.com/index.php?option=com_k2&amp;view=item&amp;id=890:ways-to-login-jenkins-using-command-line&amp;Itemid=120" target="_blank" rel="noopener">http://www.scmgalaxy.com/index.php?option=com_k2&amp;view=item&amp;id=890:ways-to-login-jenkins-using-command-line&amp;Itemid=120</a></p>
<p><strong>Appendix</strong></p>
<p>1. How to get your_jenkins_API_key?</p>
<ul>
<li>Login to your Jenkins.</li>
<li>Click on the username in the top right.</li>
<li>Click on Configure.</li>
<li>Click on ‘Show API Token’ button.</li>
<li>You got it.</li>
</ul>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/">Jenkins Command line Reference for login and trigger a job</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/jenkins-command-line-reference-for-login-and-trigger-a-job/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Profiles in Maven &#8211; How to Build Maven Profile ?</title>
		<link>https://www.scmgalaxy.com/tutorials/profiles-in-maven/</link>
					<comments>https://www.scmgalaxy.com/tutorials/profiles-in-maven/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Wed, 14 Apr 2010 11:00:46 +0000</pubDate>
				<category><![CDATA[Apache Maven]]></category>
		<category><![CDATA[Build profile]]></category>
		<category><![CDATA[Build Profiles in Maven]]></category>
		<category><![CDATA[How to build Maven Profile]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[Maven Profile Guide]]></category>
		<category><![CDATA[Maven Profile Instructions]]></category>
		<category><![CDATA[Maven Profile References]]></category>
		<category><![CDATA[Maven Profile Tutorials]]></category>
		<category><![CDATA[Maven Profile User Guide]]></category>
		<category><![CDATA[Maven Profiles]]></category>
		<category><![CDATA[Profiles]]></category>
		<category><![CDATA[Profiles in Maven]]></category>
		<category><![CDATA[Trigger]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2010/04/14/profiles-in-maven/</guid>

					<description><![CDATA[<p>Reference: Apache Maven,Current version User Guide Profiles in Maven  Use of profile: Maven 2.0 goes to great lengths to ensure [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/profiles-in-maven/">Profiles in Maven &#8211; How to Build Maven Profile ?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h1><img decoding="async" class="alignnone size-full wp-image-4268" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2010/04/profiles-in-maven.png" alt="profiles-in-maven" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2010/04/profiles-in-maven.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2010/04/profiles-in-maven-300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></h1>
<h1>Reference: Apache Maven,Current version User Guide</h1>
<h2>Profiles in Maven</h2>
<p><b> </b>Use of profile:</p>
<p>Maven 2.0 goes to great lengths to ensure that builds are portable. Among other things, this means allowing build configuration inside the POM, avoiding <b>all </b>filesystem references (in inhertiance,<br />
dependencies, and other places), and leaning much more heavily on the local repository to store the metadata needed to make this possible.</p>
<p>However, sometimes portability is not entirely possible. Under certain conditions, plugins may need to be configured with local filesystem paths. Under other circumstances, a slightly different<br />
dependency set will be required, and the project&#8217;s artifact name may need to be adjusted slightly. And at still other times, you may even need to include a whole plugin in the build lifecycle depending on the detected build environment.</p>
<p>To address these circumstances, Maven 2.0 introduces the concept of a build profile. Profiles are specified using a subset of the elements available in the POM itself (plus one extra section), and are<br />
triggered in any of a variety of ways. They modify the POM at build time, and are meant to be used in complementary sets to give equivalent-but-different parameters for a set of target environments<br />
(providing, for example, the path of the appserver root in the development, testing, and production environments). As such, profiles can easily lead to differing build results from different members of your team. However, used properly, profiles can be used while still preserving project portability. This will also minimize the use of -f option of maven which allows user to create another POM with different parameters or configuration to build which makes it more maintainable since it is running with one POM only.</p>
<h2>What are the different types of profile? Where is each defined?</h2>
<p>• Per Project: Defined in the POM itself (pom.xml).<br />
• Per User: Defined in the Maven-settings (%USER_HOME%/.m2/settings.xml).<br />
• Global: Defined in the global maven-settings (%M2_HOME%/conf/settings.xml).<br />
• Profile descriptor: a descriptor located in project basedir (profiles.xml)</p>
<h2>How can a profile be triggered? How does this vary according to the type of profile being used?</h2>
<ul>
<li>A profile can be triggered/activated in several ways:</li>
<li>Explicitly</li>
<li>Through Maven settings</li>
<li>Based on environment variables</li>
<li>OS settings</li>
<li>Present or missing files</li>
</ul>
<h2>Profiles can be explicitly specified using the -P CLI option.</h2>
<p>This option takes an argument that is a comma-delimited list of profile-ids to use. When this option is specified, no profiles other than those specified in the option argument will be activated.</p>
<p>mvn groupId:artifactId:goal -P profile-1,profile-2</p>
<h2>Profiles can be activated in the Maven settings, via the section.</h2>
<p>This section takes a list of elements, each containing a profile-id inside.</p>
<p>&#8230;</p>
<p>profile-1</p>
<p>&#8230;</p>
<p>Profiles listed in the tag would be activated by default everytime a project use it.</p>
<h2>Profiles can be automatically triggered based on the detected state of the build environment.</h2>
<p>These triggers are specified via an section in the profile itself. Currently, this detection is<br />
limited to prefix-matching of the JDK version, the presence of a system property or the value of a<br />
system property. Here are some examples.<br />
The follwing configuration will trigger the profile when the JDK&#8217;s version starts with &#8220;1.4&#8221; (eg.<br />
&#8220;1.4.0_08&#8221;, &#8220;1.4.2_07&#8221;, &#8220;1.4&#8221;):</p>
<p>1.4</p>
<p>&#8230;<br />
The following honours versions 1.3, 1.4 and 1.5.</p>
<p>[1.3,1.6)</p>
<p>&#8230;<br />
<i>Note: </i>an upper bound such as ,1.5] is likely not to include most releases of 1.5, since they will have an additional &#8220;patch&#8221; release such as _05 that is not taken into consideration in the above range.</p>
<h2>This next one will activate based on OS settings.</h2>
<p>See the Maven Enforcer Plugin for more details about OS values.</p>
<p>Windows XP<br />
Windows<br />
x86<br />
5.1.2600</p>
<p>&#8230;<br />
This will activate the profile when the system property &#8220;debug&#8221; is specified with any value:</p>
<p>debug</p>
<p>&#8230;<br />
This example will trigger the profile when the system property &#8220;environment&#8221; is specified with the<br />
value &#8220;test&#8221;:</p>
<p>environment<br />
test</p>
<p>&#8230;<br />
<b>Note</b>: Environment variable FOO would be set like env.FOO.</p>
<h2>Present or missing files</h2>
<p>To activate this you would type this on the command line: mvn groupId:artifactId:goal -Denvironment=test</p>
<p>This example will trigger the profile when the generated file target/generated-sources/axistools/wsdl2java/org/apache/maven is missing.</p>
<p>target/generated-sources/axistools/wsdl2java/org/apache/maven</p>
<p>&#8230;<br />
<b>Note</b>: The tags and could be interpolated with some patterns like ${user.home}. Profiles can also be active by default using a configuration like the following:</p>
<p>profile-1</p>
<p>true</p>
<p>&#8230;<br />
This profile will automatically be active for all builds unless another profile in the same pom is activated using one of the previously described methods. All profiles that are active by default are automatically deactivated when a profile in the pom is activated on the command line or through its activation config. 20.1.2.2</p>
<h2>Deactivating a profile</h2>
<p>Starting with Maven 2.0.10, one or more profiles can be deactivated using the command line by prefixing their identifier with either the character &#8216;!&#8217; or &#8216;-&#8216; as shown below:</p>
<p>mvn groupId:artifactId:goal -P !profile-1,!profile-2</p>
<p>This can be used to deactivate profiles marked as activeByDefault or profiles that would otherwise be activated through their activation config.</p>
<p><b>Next &#8230;.? Coming Soon</b></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/profiles-in-maven/">Profiles in Maven &#8211; How to Build Maven Profile ?</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/profiles-in-maven/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Write Trigger in Perforce? &#8211; Perforce Triggers Guide</title>
		<link>https://www.scmgalaxy.com/tutorials/writing-trigger-in-perforce/</link>
					<comments>https://www.scmgalaxy.com/tutorials/writing-trigger-in-perforce/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Fri, 30 Jan 2009 09:58:17 +0000</pubDate>
				<category><![CDATA[Perforce]]></category>
		<category><![CDATA[Create]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[Implement]]></category>
		<category><![CDATA[p4 triggers]]></category>
		<category><![CDATA[Perforce trigger build]]></category>
		<category><![CDATA[Perforce trigger types]]></category>
		<category><![CDATA[Perforce Triggers]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Trigger]]></category>
		<category><![CDATA[Trigger in Perforce]]></category>
		<category><![CDATA[Trigger Techniques]]></category>
		<category><![CDATA[Trigger types]]></category>
		<category><![CDATA[Triggers Guide]]></category>
		<category><![CDATA[Triggers Tips]]></category>
		<category><![CDATA[Triggers Tutorial]]></category>
		<category><![CDATA[Write]]></category>
		<category><![CDATA[Writing Trigger]]></category>
		<category><![CDATA[Writing Trigger in Perforce]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2009/01/30/writing-trigger-in-perforce/</guid>

					<description><![CDATA[<p>1 Introduction Perforce introduced the first server-side trigger in release 99.1 with the pre-submit trigger. This trigger satisfied a long-standing [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/writing-trigger-in-perforce/">How to Write Trigger in Perforce? &#8211; Perforce Triggers Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3976 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2009/01/trigger-in-perforce.png" alt="trigger-in-perforce" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2009/01/trigger-in-perforce.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2009/01/trigger-in-perforce-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></p>
<p><span style="font-family: verdana, geneva;"><span style="color: #993300;"><strong style="font-size: 14px;">1 Introduction</strong></span><br />
Perforce introduced the first server-side trigger in release 99.1 with the pre-submit trigger. This trigger satisfied a long-standing desire in the user community, but demand continued for more hooks. In release 2004.2, Perforce squarely hit the need with the addition of five new trigger types. Release 2005.1 adds yet one more trigger type to this list rounding out one of the categories of triggers to completeness. This paper discusses triggers, techniques for implementing them and purposes for using them. It presumes a general knowledge of scripting. The examples follow in several programming languages. They should be easy to follow with knowledge of general programming, and any more arcane constructs will be explained. The paper also presumes a reasonable knowledge of Perforce scripting alternatives, such as that presented in [Bowles2005]. Although this paper will address the scripting of triggers comprehensively, it will refer to other Perforce scripting contexts and to Perforce commands with an assumption of familiarity.</span></p>
<p><span style="font-family: verdana, geneva;"><strong>1.1 What is a trigger?</strong><br />
Triggers are programs that run on the server immediately in response to some welldefined event in Perforce. Therefore, the context for a trigger is running on the server<br />
using the trigger mechanism to start. Triggers are typically written in a shell script such as Perl, Python or Ruby due to the flexibility and facilities they provide. However, triggers can be written in any programming language that can interface with Perforce, including UNIX shell (sh, ksh, csh and work-alikes) and compiled languages like C/C++.</span></p>
<p><span style="font-family: verdana, geneva;"><strong>1.2 Types of triggers</strong><br />
Triggers fall into two categories. Pre-submit triggers enable actions in response to the submission of changelists. Form triggers allow actions in response to various stages of the life cycle of a form, regardless of the form type. This section provides a brief overview of the trigger types in preparation for the more detailed discussion.<br />
<strong>1.2.1 Pre-submit triggers</strong><br />
There are three types of pre-submit triggers corresponding to different points in the life cycle of a submission.<br />
• “Submit” triggers execute after the changelist has been created but before the files have been transferred, allowing inspection of the changelist details but disallowing file inspection.<br />
• “Content” triggers execute after file transfer but before commit, allowing for inspection of the files.<br />
• “Commit” triggers execute after the commit, allowing inspection of the changelist and file contents, but disallowing canceling of the submission.</span></p>
<p><span style="font-family: verdana, geneva;"><strong>1.2.2 Form triggers</strong><br />
Form triggers come in four types depending on the point in the form’s life cycle in which they are invoked.<br />
• “Out” triggers execute when the form is generated and can modify the form before it is presented to the user.<br />
• “In” triggers execute when the form is sent back to Perforce but before it is parsed, also allowing modification of the form on its way in.<br />
• “Save” triggers execute after the form has been parsed but before it is saved, allowing reaction to the form but not modification.<br />
• “Delete” triggers execute before a form is deleted, allowing failure of the deletion.</span></p>
<p><span style="font-family: verdana, geneva;"><strong>1.3 Why use a trigger?</strong><br />
Knowing why to use a trigger is partially a matter of knowing what are the competing alternatives. The alternatives naturally come from other contexts, since triggers define a context of their own. This section details the salient operational characteristics of triggers and contrasts them with Perforce alternatives. The three primary alternatives to triggers are wrapper scripts, such as p4wrapper, 1 review daemons, and journal tailers. A variation on the wrapper script would be a script available from the Tools menu in P4Win.</span></p>
<p><span style="font-family: verdana, geneva;"><strong>1.3.1 Synchronous execution</strong><br />
Triggers execute synchronously in response to their associated event. This provides an immediacy of response that is sometimes required or at least highly desirable. One option that provides synchronous execution could be an action invoked from a wrapper script such as p4wrapper. Another option would be to forego synchronous execution and rely on frequently running review daemons. Journal tailers would also perform asynchronously, although with very rapid and event-driven response.<br />
<strong>1.3.2 Immediate user feedback on error</strong><br />
Triggers can provide messages back to the user, but only on error. Messages are not delivered on successful execution. A wrapper script can deliver messages to the user regardless of whether an error occurs or not. Review daemons and journal tailers can only provide feedback through indirect mechanisms.<br />
<strong>1.3.3 Enforceability</strong><br />
Enforceability refers to the ability of an administrator to ensure that the script will run regardless of the client program used to initiate the operation. Because triggers are<br />
installed on and executed by the server in response to server events, they will execute regardless of the client program. Wrapper scripts will only be invoked when the wrapper is used, whereas direct use of p4 or use of a different client program will circumvent the desired action. Review daemons and journal tailers are also enforceable due to their context on the server.</span></p>
<p><span style="font-family: verdana, geneva;"><strong>1.3.4 Modify a form</strong><br />
Form triggers can modify a form as it is delivered to the user or as it is sent back to Perforce. Wrapper scripts share this characteristic. Review daemons and journal tailers can not modify forms except to the extent that any user or administrator can after the operation has finished.<br />
<strong>1.3.5 Customize any action</strong><br />
Form triggers have a limited ability to customize actions that involve forms, but they do not have the ability to react to any arbitrary command. Similarly, pre-submit triggers can only react to submits. Review daemons can only react to commands whose side effects can be reliably observed, something that is not readily available from the command line in many cases or from review mechanisms. Journal tailers have the ability to react to any action that affects database entries, which includes almost all.<br />
<strong>1.3.6 Optimization for bulk processing</strong><br />
The review mechanism gives the ability to process a large number of actions in an orderly and efficient manner as long as those changes impact a counter. This optimization is not readily if at all available to triggers, wrappers or journal tailers due to their association with individual commands or journal entries.</span></p>
<p><span style="font-family: verdana, geneva;"><strong>1.3.7 Deterministic execution</strong><br />
Triggers and wrappers provide an exact and deterministic understanding of when they will execute relative to the command that initiates them. Review daemons are generally driven in a time-based manner and therefore do not execute deterministically relative to the Perforce command. Journal tailers are closer to deterministic than review daemons, but can conceivably execute prior to completion of a command.<br />
<strong>1.3.8 Summary</strong><br />
The following table summarizes the characteristics of the scripting contexts that compete with triggers for Perforce scripting.</span></p>
<p><span style="font-family: verdana, geneva;"> </span></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/writing-trigger-in-perforce/">How to Write Trigger in Perforce? &#8211; Perforce Triggers Guide</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/writing-trigger-in-perforce/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
