maven-scm-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Winterflood, Jonathan" <jonathan.winterfl...@capgemini.com>
Subject RE: SCM and CVS Export
Date Mon, 09 Mar 2009 11:07:38 GMT
Hi Mary,

 

I think you are looking for the scm:bootstrap goal.

http://maven.apache.org/scm/plugins/index.html

 

It also seems like you might be misunderstanding the way to use Maven (understandably, due
to your experience with Ant):

 

Ant, AFAIK, is basically a way of expressing scripts.

Maven, however, describes the project so that plugins can do the work previously done by your
scripts.

 

With this in mind, I think you should be doing the following:

Create a POM _in_ your project, so that building it will work (locally, independent of the
source-fetching problem)

 

Then, for your fetch+build problem, do the following:

*	Either bootstrap from the POM (fetch the tag's POM manually, then exec mvn scm:bootstrap
on it), this will require you to:

	*	Setup the scm elements (<scm><connection>scm:svn:svn://host....</</)
in the POM.
	*	Fill in the scm plugin configuration so it knows what goals to run (if not the default
goal)

 

*	Or bootstrap manually, by specifying the needed elements on the command line (mvn scm:bootstrap
-Dparam=value ...)

 

HTH

 

Regards,

Jonathan Winterflood

Capgemini Ouest

________________________________

De : Hunt, Mary [mailto:mary.hunt@yale.edu] 
Envoyé : vendredi 6 mars 2009 11:20
À : scm-users@maven.apache.org
Cc : Hunt, Mary
Objet : SCM and CVS Export

 

I am new to Maven2, and but am an experienced Ant user.  I am trying to write a pom that will
do the following:

1.  Export source from CVS repository based on a tag

2.  Compile and package the exported source.

 

I have 2 problems.

1.  When I export the source from CVS it creates a duplicate folder structure.  See below...

                              <plugin>

              <artifactId>maven-scm-plugin</artifactId>

             <!-- <configuration>

                <skipCheckoutIfExists>true</skipCheckoutIfExists>

              </configuration>

            -->

              <executions>

 

                <execution>

                  <id>fetch-feature</id>

                  <phase>generate-sources</phase>

                  <goals>

                    <goal>export</goal>

                  </goals>

                  <configuration>

                    <connectionType>developerConnection</connectionType>

                    <exportDirectory>target\exported-sources</exportDirectory>

                    <scmVersion>${exportTag}</scmVersion>

                    <scmVersionType>tag</scmVersionType>

                  </configuration>

                </execution>

 

              </executions>

            </plugin>

 

The exported source ends up in target\exported-sources\target\exported-sources.  I would expect
that it would end up in target/exported-sources.

The working directory indicated at this time is:  Working directory: C:\Projects\Maven\cimp-app\target\exported-sources
(which is now empty except for a new target directory.

 

2.  What I really want to happen at this point is for the remainder of the build to operate
on the exported sources, but that is not happening.  I end up having to run my mvn package
command separately on the pom in the target\exported-sources\target\exported-sources.  With
ant, I did not have this issue, and I think I am stuck in some wrong-thinking about how to
use maven2.

 

Any suggestions would be appreciated.

 

Mary Hunt 
Technical Lead, Application Development 
Enterprise Development Services 
Information Technology Services, Yale University 
25 Science Park - 4th Floor 
New Haven, Connecticut 06511

voice: 203-436-3961 
fax: 203-436-4064 
web: http://www.yale.edu/its/web/ 

 

</PRE><p style="font-family:arial;color:grey" style="font-size:13px">This message
contains information that may be privileged or confidential and is the property of the Capgemini
Group. It is intended only for the person to whom it is addressed. If you are not the intended
recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or
use this message or any part thereof. If you receive this message in error, please notify
the sender immediately and delete all copies of this message.</p><PRE>

Mime
View raw message