You can get a buildnumber from your locally modified version, but it is going to be the revision number from svn, from the last time you did an update. Just suppress the doCheck.

<configuration>
        <doCheck>false</doCheck>
        <doUpdate>false</doUpdate>
</configuration>

J

On 27-Apr-07, at 9:48 AM, [EMAIL PROTECTED] wrote:

I know that the error is about locally modified files.. I understand English (-_^) (just kidding)

what I mean is : why I cant get a build number from my local modified version ? (if I can, how will I do ?) also I just want to precise that the project was developed and built many times using Ant, and now we're moving to maven, so I need to fill some properties like :

<property name="DIST" value="$ {MyDate}-v${noVersion}b${build.number}"/>

a helpful member of the list has pointed me to use  :

        <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>true</doCheck>
            <doUpdate>true</doUpdate>
          </configuration>

        </plugin>

so the plugin wanted scm ! I added :

 <scm>
     scm:svn:https://www.mycompany.ma/svnrepos/myAppName/v1.3
    scm:svn:https://www.mycompany.ma/svnrepos/myAppName/v1.3
    https://www.mycompany.ma/svnrepos/myAppName/v1.3
  </scm>

after that eclipse told me that scm is not recognized as an internal command, so I installed scm binaries (for windows) and now it tells that it's not permitted to generate build numbers for locally modified projects ?!

(how can I build a project locally if maven doesn't want to do the build ? )

please help me I'm out of solutions and above all I'm a newbie ! (a real one)

Thanks for helping
Nawfel


----- Message d'origine ----
De : Tim Kettler <[EMAIL PROTECTED]>
À : Maven Users List <users@maven.apache.org>
Envoyé le : Vendredi, 27 Avril 2007, 15h19mn 43s
Objet : Re: Cannot create the build number ?!

I agree that maven error messages are not always as self explaining as
they should but in this case it's quite obvious what's wrong:

[INFO]
---------------------------------------------------------------------- --
[ERROR] BUILD ERROR
[INFO]
---------------------------------------------------------------------- --
[INFO] Cannot create the build number because you have local
modifications :

Your Working copy contains localy modified files and the build-number
plugin doesn't lke that.

-Tim

[EMAIL PROTECTED] schrieb:
Hi Mavenizers,

After installing the subversion binaries, and retrying to compile I had this :

[DEBUG] Configuring mojo 'org.codehaus.mojo:maven-buildnumber- plugin:0.9.4:create' -->
[DEBUG]   (s) basedir = C:\works\workspaceM2\myAppName-v1.3
[DEBUG]   (s) doCheck = true
[DEBUG]   (s) doUpdate = true
[DEBUG] (f) project = [EMAIL PROTECTED] [DEBUG] (s) urlScm = scm:svn:https://www.mycompany.ma/svnrepos/ myAppName/v1.3
[DEBUG] -- end configuration --
[INFO] [buildnumber:create {execution: default}]
[INFO] Verifying there are no local modifications ...
[INFO] Executing: svn --non-interactive status
[INFO] Working directory: C:\works\workspaceM2\myAppName-v1.3
[INFO] Unknown file status: '!'.
[INFO] Unknown file status: '!'.
[INFO] Unknown file status: '!'.
[INFO] --------------------------------------------------------------------- ---
[ERROR] BUILD ERROR
[INFO] --------------------------------------------------------------------- --- [INFO] Cannot create the build number because you have local modifications :
[pom.xml:unknown]
[mvn:unknown]
[.project:modified]
[.classpath:modified]

[INFO] --------------------------------------------------------------------- ---
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot create the build number because you have local modifications :
[pom.xml:unknown]
[mvn:unknown]
[.project:modified]
[.classpath:modified]

at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (DefaultLifecycleExecutor.java:564) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi fecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal (DefaultLifecycleExecutor.java:459) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan dleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute (DefaultLifecycleExecutor.java:143)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced (Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode (Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot create the build number because you have local modifications :
[pom.xml:unknown]
[mvn:unknown]
[.project:modified]
[.classpath:modified]

at org.codehaus.mojo.buildNumber.BuildNumberMojo.checkForLocalModificati ons(BuildNumberMojo.java:347) at org.codehaus.mojo.buildNumber.BuildNumberMojo.execute (BuildNumberMojo.java:288) at org.apache.maven.plugin.DefaultPluginManager.executeMojo (DefaultPluginManager.java:443) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (DefaultLifecycleExecutor.java:539)
    ... 16 more
[INFO] --------------------------------------------------------------------- ---
[INFO] Total time: 33 seconds
[INFO] Finished at: Fri Apr 27 14:44:39 GMT 2007
[INFO] Final Memory: 4M/9M
[INFO] --------------------------------------------------------------------- ---



I just want a SIMPLE Build Number ! why is it so complicated ??

(sorry)

Thanks for helping
Nawfel BERAICH


--
Julian Wood <[EMAIL PROTECTED]>

Software Engineer
Teaching & Learning Centre
University of Calgary

http://tlc.ucalgary.ca


Reply via email to