It's all about the answers!

Ask a question

Maven SCM Plugin for RTC


0
4
David Lafreniere (4.8k7) | asked Jul 20 '10, 3:41 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
edited Oct 06 '16, 10:24 a.m.
Please use this forum topic to discuss the ongoing development of the Maven SCM Plugin for RTC.

I would especially like to know how users intend to use the Maven SCM Plugin and especially the Maven Release plugin in the context of RTC.

What would really help is if you could provide a short description of what you feel each scm goal should do. (What would help even more if you could provide a sample Jazz SCM CLI line on exactly what you feel should be done).

Often difficulty occurs because we are bound to the Maven SCM Plugin framework, and the level of information supplied to us for each goal may be too little or to much in order to easily map it 1:1 to an RTC use case scenario. RTC SCM is great at being flexible for team (or even personal) use, but it also has many "things" that other traditional SCM systems do not.

Questions of discussion could be:

1. Should the checkin goal automatically create and "complete" a change set with the given message/comment every time the checkin goal is executed?. Should it also "deliver" this change set with every checkin goal? or should it just check in files to the existing change set?

2. The checkout goal allows an optional passed in ScmVersion Maven object. For example, the release-plugin calls this checkout goal in the release:perform goal and used this ScmVersion object to represent a "snapshot" which was created in the release:prepare goal. However Jazz RTC does not allow you to checkout (i.e. "load") a particular snapshot. Can we come up with an agreed upon action for this scenario?
2a. One option would be to temporarily create another repository workspace which is based on the given snapshot. This would allow the user to checkout the files properly. However one problem is that these SCM goals act against the workspace defined in the SCM URL (in the pom.xml), thus future goals such as (status or checkin) would be against the original repository workspace, and not the one we checked out of...

3. The "project structure" of Maven projects and RTC/Eclipse projects are different. Maven has the concept of "parent projects" in which entire child projects exist below a parent project, whereas in Eclipse/RTC each project generally exists at the same root level. At the surface this doesn't appear to be a problem, but some Maven users may not be able to do what they want with the Jazz SCM provider. In particular, Jazz SCM does not allow checking out a project underneath another checked out project (i.e. can't have a sandbox in a sandbox).
3a. Ex: During an initial test run of release:perform (after performing after a release:prepare), I saw that the supplied checkout directory was "<releaseProject>\target\checkout" (Which Jazz Scm cannot do).

Please see the following Wiki document for additional information.
https://jazz.net/wiki/bin/view/Main/BuildFAQ#Does_Jazz_Team_Build_support_Mav

104 answers



permanent link
Nick Edgar (6.5k711) | answered May 01 '12, 10:45 a.m.
JAZZ DEVELOPER
That's great. Thank you very much, Chris, for your help in cleaning up the Jazz SCM Provider and getting it contributed to Apache Maven.

permanent link
Chris Graham (367814) | answered May 01 '12, 10:42 p.m.
You're welcome! Thank you! Especially for your help in wrapping my (been in SVN for too long) brain around it.

The next step is to get the maven release plugin with it's patch, and update it to SCM 1.7, and that will complete the entire process.

-Chris

That's great. Thank you very much, Chris, for your help in cleaning up the Jazz SCM Provider and getting it contributed to Apache Maven.

permanent link
Chris Graham (367814) | answered May 09 '12, 7:53 p.m.
Easy.

The maven-scm 1.7 modules (that includes the Jazz provider) has been voted upon, approved, staged and is now in the central repo.

The maven release plugin/manager has only just had the vote started a day or two ago. Once the vote has passed, and I'm sure that it will, it will be staged and within a few days available in central.

The new version of the maven release plugin is 2.3.

-Chris

Do you know when the release-plugin will be available in the central-repo? We dont have access to the internet and only our Nexus is allowed to access the main repo.

The plugin has been release last week, shouldnt it be uploaded by now?

Thx.

permanent link
Chris Graham (367814) | answered May 15 '12, 7:57 a.m.
The release plugin/manager 2.3 is now available in the central repository.

Enjoy.

-Chris

permanent link
Chris Graham (367814) | answered Jun 01 '12, 2:46 a.m.
The release plugin/manager 2.3.1 is now available in the central repository. Or should be.

Please use this for Jazz Maven work rather than the 2.3 release.

Enjoy.

-Chris

permanent link
Chris Graham (367814) | answered Jul 14 '12, 3:02 a.m.
Hi all.

The maven-release-plugin 2.3.2 has been released, which fixes a number of issues, some of which were Jazz SCM specific.

I recommend that 2.3 and 2.3.1 NOT be used. Use 2.3.2 instead.

-Chris


permanent link
Jason Gould (11) | answered Jun 05 '13, 9:08 a.m.

Hi there,

I have the plugin working fine, I do however have a query. My PA's are set to require an associated work item prior to deliver. Is there a way I can pass in a workitem number for the release plugin to use on a release:perform?

Thanks

Jason


Comments
Chris Graham commented Jun 25 '13, 6:01 a.m.

All Jazz SCM interaction is via the SCM(.exe) command.
If you can get that to work, then I can have a look at how you need to work with the maven plugin.
-Chris


Chris Graham commented Aug 16 '13, 2:32 a.m.

Hi Jason.

The WI that you need to pass in.
Is it static?
Does it change per release?

At it's simplest, I can associate a WI passed in via a -D.

Would that work?

-Chris


permanent link
Chris Graham (367814) | answered Jun 05 '13, 10:39 p.m.
edited Jun 25 '13, 6:02 a.m.
PA?

What, _exactly_ are you looking for here?
What do you need to happen?
As I can not make any sense of what you are asking for.

Please spell it out, ta.

-Chris


permanent link
Oguzhan Ozavar (112) | answered Jun 13 '13, 12:20 p.m.
edited Jun 13 '13, 1:26 p.m.
Hi all,

Our maven2 build fails to release locks after release prepare completion. There is no error in the log file and the build results are successfull. We use useEditMode parameter which should be releasing the acquired locks implicitly at the end of the build. We also use workingDirectory parameter because of the load snapshot issue.

Locks are acquired successfully as seen below, however, i could not find any release lock attampt in the log file.

ANY COMMENTS??


EDIT: I found that the temporary workspaces created by maven-plugin-for-rtc to workarround the load sandbox issue, do not have their flow target stream set. Since the scm lock acquire command requires a repo ws with a valid flow target (see below documentation) I suspect the scm lock release command might be executing on that temp workspace. Another issue is these temporary workspaces are not being deleted after build completion (which may cause redundant disk usage and some other problems).

http://maven.apache.org/scm/maven-scm-providers/maven-scm-provider-jazz/
The implementation uses the scm lock acquire command, and uses the implicit flow targets defined for the repository workspace. If none are defined, the command will fail.



[DEBUG] Executing edit command...
[INFO] Executing: cmd.exe /X /C "scm lock acquire --repository-uri https://e2ertc.tt-tim.tr:9443/ccm --username SDLCJazz --password ***** D:\AVEA_CODE_WORK_AREA\crm\workspaces\ttg_musteri_riza_dev\com.avea.ttmusteririza\pom.xml"
[INFO] Working directory: D:\AVEA_CODE_WORK_AREA\crm\workspaces\ttg_musteri_riza_dev\com.avea.ttmusteririza
[DEBUG] Consumed line :Locks successfully acquired.

build definition and pending changes view

Here is the pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.avea.ttmusteririza</groupId>
    <artifactId>com.avea.ttmusteririza</artifactId>
    <version>0.0.36-SNAPSHOT</version>
    <name>com.avea.ttmusteririza</name>
    <description>TT - TTNet - Avea Musteri Rizasi Application</description>

    <scm>
        <connection>scm:jazz:SDLCJazz;5dlc.J@zz@https://e2ertc.tt-tim.tr:9443/ccm:CRM Sales Dev - TTG - R1 Development - vadiguzel Workspace</connection>
    </scm>
    <repositories>
        <repository>
            <id>public</id>
            <name>Public Repositories</name>
            <url>http://10.248.72.68:8081/nexus/content/repositories/public</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>public</id>
            <name>Public Repositories</name>
            <url>http://10.248.72.68:8081/nexus/content/repositories/public</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
        </pluginRepository>
    </pluginRepositories>


    <distributionManagement>
        <repository>
            <id>releases</id>
            <url>http://10.248.72.68:8081/nexus/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
            <id>snapshots</id>
            <url>http://10.248.72.68:8081/nexus/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <preparationGoals>clean deploy -Dmaven.test.skip=true</preparationGoals>
                    <goals>deploy -P release</goals>
                    <username>SDLCJazz</username>
                    <password>*****</password>
                    <releaseProfiles>release</releaseProfiles>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-jazz</artifactId>
                        <version>1.8.1</version>
                    </dependency>

                </dependencies>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>test-compile</goal>
                        </goals>
                        <configuration>
                            <source>1.6</source>
                            <target>1.6</target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-junit4</artifactId>
            <version>2.4.3</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc6</artifactId>
            <version>10.2.0.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>dbunit-maven-plugin</artifactId>
            <version>1.0-beta-3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.dbunit</groupId>
            <artifactId>dbunit</artifactId>
            <version>2.4.8</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>sql-maven-plugin</artifactId>
            <version>1.3</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>3.2.2.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>3.2.2.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>3.2.2.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>3.2.2.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>3.2.2.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>3.2.2.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>1.6.11</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjtools</artifactId>
            <version>1.6.2</version>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>1.6.11</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-dbcp</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>1.2.2</version>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4.7</version>
        </dependency>
        <dependency>
            <groupId>sshtools</groupId>
            <artifactId>j2ssh-core</artifactId>
            <version>0.2.9</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.17</version>
        </dependency>
    </dependencies>
</project>

Comments
Oguzhan Ozavar commented Jun 13 '13, 12:22 p.m.

PS: Sory for the long post that I could not find how to post the long text within a scrolling textarea...


permanent link
Chris Graham (367814) | answered Jun 25 '13, 5:57 a.m.
Try this:

<plugin>
                <groupid>org.apache.maven.plugins</groupid>
                <artifactid>maven-release-plugin</artifactid>
                <version>2.4.1</version>
                <configuration>
                    <preparationgoals>clean verify -Dmaven.test.skip=true</preparationgoals>
                    <username>SDLCJazz</username>
                    <password>*****</password>
                </configuration>
</plugin>

Personally, I'd get right of the preparationgoals anyway - I've only ever used that from the command line (and you do not want the deploy at this step), that is what release:perform does.

the scm stuff is not needed to be listed separately, as the release plugin 2.4+ already has the right deps for the jazz stuff anyway.

and why are you using locks? I tested the lock acquire/release manually from the command line, but not as a part of the release process.

-Chris

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.