Hi Pankaj,

I don't think there is a dependency problem - maven would have reported any such error. That part all looks fine to me. It's still just not finding your scm, as you surmise. Maybe someone who is using an scm configured like yours could pipe up?

Did you try doing a mvn release:prepare (without the buildnumber)? Do you get the same error?

J

On 2-Apr-07, at 4:02 PM, Pankaj Tandon wrote:


Julian,
Thanks a lot for the suggestions.
I tried all possible url formats but no dice..
I suspect that maven is not able to find my scm. That is where I'm really puzzled..Shouldn't the pom of the buildnumber plugin have all dependencies
in it and if so, Maven should get them for me...no?

Here is what I am getting when I run mvn install


D:\projects\TestProject>mvn install
[INFO] Scanning for projects...
[INFO]
---------------------------------------------------------------------- ---
---
[INFO] Building TestProject
[INFO]    task-segment: [install]
[INFO]
---------------------------------------------------------------------- ---
---
[INFO] artifact org.apache.maven.plugins:maven-resources-plugin: checking
for up
dates from tlc
[INFO] artifact org.apache.maven.plugins:maven-compiler-plugin: checking for
upd
ates from tlc
[INFO] artifact org.apache.maven.plugins:maven-surefire-plugin: checking for
upd
ates from tlc
[INFO] artifact org.apache.maven.plugins:maven-jar-plugin: checking for
updates
from tlc
[INFO] artifact org.apache.maven.plugins:maven-install-plugin: checking for
upda
tes from tlc
[INFO] [buildnumber:create {execution: default}]
[INFO]
---------------------------------------------------------------------- --
[ERROR] BUILD ERROR
[INFO]
---------------------------------------------------------------------- --
[INFO] Cannot get the revision information from the scm repository :
Can't load the scm provider.

The scm url cannot be null.
[INFO]
---------------------------------------------------------------------- --
[INFO] For more information, run Maven with the -e switch
[INFO]
---------------------------------------------------------------------- --
[INFO] Total time: 9 seconds
[INFO] Finished at: Mon Apr 02 17:39:02 EDT 2007
[INFO] Final Memory: 4M/9M
[INFO]
---------------------------------------------------------------------- --

Here is what my POM looks like:

<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.TestProject</groupId>
  <artifactId>TestProject</artifactId>
  <packaging>jar</packaging>
  <version>1.0</version>
  <name>TestProject</name>
  <url>http://some.com</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>jfreechart</groupId>
      <artifactId>jfreechart</artifactId>
      <version>0.9.16</version>
    </dependency>
    <dependency>
      <groupId>jfree</groupId>
      <artifactId>jcommon</artifactId>
      <version>0.9.6</version>
    </dependency>
  </dependencies>

<pluginRepositories>
    <pluginRepository>
        <id>tlc</id>
        <name>TLC Repository</name>
        <url>http://commons.ucalgary.ca/pub/m2</url>
    </pluginRepository>
</pluginRepositories>

  <build>

    <plugins>
    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>maven-buildnumber-plugin</artifactId>
      <version>0.9.4</version>
      <executions>
        <execution>
          <phase>validate</phase>
          <goals>
            <goal>create</goal>
          </goals>
        </execution>
      </executions>
      <configuration>
        <doCheck>false</doCheck>
        <doUpdate>false</doUpdate>
 <scm>
  <connection>scm:svn:file:///D:/repos1</connection>
  <developerConnection>scm:svn:file:///D:/repos1</developerConnection>
  <url>scm:svn:file:///D:/repos1</url>
 </scm>
      </configuration>

    </plugin>
    </plugins>

<finalName>${project.artifactId}-${project.version}-r${buildNumber} </finalName>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
  </build>
</project>

I do have svn installed and it seems to be working just fine with Subclipse.
The command svn list -R -r12 returns valid values from repos1

Any other suggestions?
Thanks in advance,

Pankaj




Julian Wood wrote:

It probably has something to do with how you've set up your
subversion repository on a network drive. I've never tried it like
that, so I can't say whether or not your scm config is correct. My
scm config looks like this and works fine.

     <scm>
         <connection>scm:svn:http://apollo.ucalgary.ca:8800/
timesheets/trunk</connection>
         <developerConnection>scm:svn:http://apollo.ucalgary.ca:8800/
timesheets/trunk</developerConnection>
         <url>http://apollo.ucalgary.ca/websvntimesheets/listing.php?
repname=timesheets&amp;rev=0&amp;sc=0&amp;path=/trunk</url>
     </scm>

There is nothing else special on the buildnumber side needed - it
just uses whatever you've configured in your pom (if it can).

Check out http://maven.apache.org/scm/scm-url-format.html and http://
maven.apache.org/scm/subversion.html. Might be as simple as using a
pipe instead of a colon.

Also verify that maven can reach your subversion repository with some
other plugin (ie. release, changelog).

J


On 30-Mar-07, at 8:29 AM, Pankaj Tandon wrote:


Hi,
We need to incoporate build numbers into our codebase and so
started looking
at the buildnumberr plugin. It looks great and works fine if we
configure it
to spit out an incremental number like so:
      <configuration>
        <doCheck>false</doCheck>
        <doUpdate>false</doUpdate>
         <format>{0,number}</format>
         <items>
           <item>buildNumber0</item>
         </items>
      </configuration>

However, for the real thing we want it to integrate with
Subversion. We are
using Subclipse for our SVN client.

To do so, we are not able to configure buildnumber to use our scm.
Specifically, the instructions here:
http://commons.ucalgary.ca/projects/maven-buildnumber-plugin/
howto.html
do NOT state what exactly is the scm configuration that needs to be
set in
the POM.

Our Subversion repository is installed on  a network drive.

I looked here
http://apollo.ucalgary.ca/tlcprojectswiki/index.php/Public/
Project_Versioning_-_Best_Practices
and tried the following in the POM:

 <scm>
  <connection>file:///X:/repos</connection>
  <developerConnection>file:///X:/repos</developerConnection>
  <url>file:///X:/repos</url>
 </scm>

but that did not help either.

I continue to get:
[INFO] --------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] --------------------------------------------------------------
[INFO] Cannot get the revision information from the scm repository :
Can't load the scm provider.

The scm url cannot be null.



So what am I doing wrong? How do I integrate with Subversion using
Subclipse
as the SVN client?

Thanks in advance,

Pankaj


--
Julian Wood <[EMAIL PROTECTED]>

Software Engineer
Teaching & Learning Centre
University of Calgary

http://tlc.ucalgary.ca





--
View this message in context: http://www.nabble.com/Configure- buildnumber-and-Subversion-Subclipse-tf3492563s177.html#a9799904
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
Julian Wood <[EMAIL PROTECTED]>

Software Engineer
Teaching & Learning Centre
University of Calgary

http://tlc.ucalgary.ca


Reply via email to