You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by JC Lagache <jc...@gmail.com> on 2008/10/20 20:43:50 UTC

Experience on Maven/ClearCase integration

This post describes the problems i found integrating ClearCase with my maven
project.
It also contains an issue request concerning the release-plugin
This can be a base document for thos who want to do the same thing.

Configuration :
Maven 2.0.8
Java 1.4.2_15
Rational ClearCase LT 7.0.0
Rational ClearCase LT 7.0.0.0_iFix01
Rational ClearCase LT 7.0.0.0_iFix02
cleartool 7.0.0.0 (Tue Apr 25 21:37:50  2006)

I've got a ClearCase project called myProject which contains 2 ClearCase
components myModule1 and myModule2.
My ClearCase view is physically located at C:\views\myProject.
>From a maven point of view, there is 2 projects located at
C:\views\myProject\myModule1 and C:\views\myProject\myModule2.
I want to integrate ClearCase to myModule1 project.

1) Integration of the maven scm plugin
pom.xml :

        scm:clearcase:load \myModule1
        
            scm:clearcase:load \myModule1
        


>mvn scm:bootstrap
[ERROR] cleartool: Error: Unrecognized command option: "-vw

ClearCase is the LT version so, create the file $user.home
/.scm/clearcase-settings.xml :

    false
    LT   


>mvn scm:bootstrap
[ERROR] cleartool: Error: A view cannot be created under another view's
storage
directory or snapshot view storage directory.

That's right, C:\views\myProject\myModule1 is a view storage.
pom.xml :

       org.apache.maven.plugins
       maven-scm-plugin
       
            
                        ..\..\${artifactId}-${version}
             
       


>mvn scm:bootstrap
OK

2) Integration of the maven release plugin
pom.xml :

     
            false
            myModule1-releases
            dav:http://server/myModule1/repository         
        
        
         myModule1-site           
         dav:http://server           
      
      
          false
          myModule1--snapshots           
          dav:http://server/myModule1/repository           
      
   
 ...

  
    org.apache.maven.wagon
    wagon-webdav           
  


>mvn release:perform
[INFO] Executing: C:\views\myProject\myModule1\target>>cmd.exe /X /C
"cleartool m
kview -snapshot -tag jclagache-HP12258259301-maven-checkout
C:\views\myProject\myModule1\target\checkout"
[ERROR] Provider message:
[ERROR] The cleartool command failed.
[ERROR] Command output:
[ERROR] cleartool: Error: A view cannot be created under another view's
storage
directory or snapshot view storage directory.

This is the same problem as with the scm plugin.
The release plugin don't care about the checkoutDirectory from the scm
plugin.

Issue : Can't the release plugin re-use the checkoutDirectory from the scm
plugin or can't the release:perform goal propose a checkoutDirectory
directory ?

The only solution is to change the workingDirectory property for this plugin
in the pom.xml :

  org.apache.maven.plugins
  maven-release-plugin              
                 
    ..\..\${artifactId}-${version}
  


>mvn release:perform
[INFO] Executing: mvn deploy site-deploy --no-plugin-updates -P env-testleh
-DperformRelease=true
[INFO] Scanning for projects...
        [INFO]
------------------------------------------------------------------------
        [INFO] Building Maven Default Project
        [INFO]    task-segment: [deploy, site-deploy]
        [INFO]
------------------------------------------------------------------------
        [INFO]
------------------------------------------------------------------------
        [ERROR] BUILD ERROR
        [INFO]
------------------------------------------------------------------------
        [INFO] Cannot execute mojo: resources. It requires a project with an
existing pom.xml, but the build is not using one.

In fact the working directory is also now ..\..\${artifactId}-${version} for
the deploy plug-in ...
pom.xml  :

  org.apache.maven.plugins
  maven-deploy-plugin              
                 
    ..\${project.build.directory}
  


>mvn release:perform
OK

Sorry for my poor english and this long post for an only one issue request.
Maybe this post will be usefull for one who want to integrate ClearCase with
their maven projects.


-- 
View this message in context: http://n2.nabble.com/Experience-on-Maven-ClearCase-integration-tp1356638p1356638.html
Sent from the maven users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org