You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by Simon Laws <si...@googlemail.com> on 2010/07/05 13:49:56 UTC

Re: svn commit: r960329 - /tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml

On Sun, Jul 4, 2010 at 1:02 PM,  <an...@apache.org> wrote:
> Author: antelder
> Date: Sun Jul  4 12:02:25 2010
> New Revision: 960329
>
> URL: http://svn.apache.org/viewvc?rev=960329&view=rev
> Log:
> Reenable the version spi with the buildnumber-maven-plugin
>
> Modified:
>    tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml
>
> Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml
> URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml?rev=960329&r1=960328&r2=960329&view=diff
> ==============================================================================
> --- tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml (original)
> +++ tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml Sun Jul  4 12:02:25 2010
> @@ -70,7 +70,6 @@
>
>   <build>
>     <plugins>
> -<!--
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>buildnumber-maven-plugin</artifactId>
> @@ -113,7 +112,6 @@
>              </execution>
>           </executions>
>        </plugin>
> --->
>     </plugins>
>   </build>
>
>
>
>

This gives rise to the following error for me....


[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Tuscany SCA Core SPI
[INFO]    task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting D:\sca-java-2.x\modules\core-spi\target
[INFO] [enforcer:enforce {execution: enforce-plugin-versions}]
[INFO] [buildnumber:create {execution: default}]
[INFO] Checking for local modifications: skipped.
[INFO] Executing: cmd.exe /X /C "svn --non-interactive update D:\sca-java-2.x\mo
dules\core-spi"
[INFO] Working directory: D:\sca-java-2.x\modules\core-spi
Provider message:
The svn command failed.
Command output:
'svn' is not recognized as an internal or external command,
operable program or batch file.

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Couldn't update project.

Embedded error: Error!

Simon


-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Re: svn commit: r960329 - /tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml

Posted by ant elder <an...@apache.org>.
On Mon, Jul 5, 2010 at 4:00 PM, Simon Laws <si...@googlemail.com> wrote:
> On Mon, Jul 5, 2010 at 3:43 PM, ant elder <an...@gmail.com> wrote:
>> On Mon, Jul 5, 2010 at 12:49 PM, Simon Laws <si...@googlemail.com> wrote:
>>> On Sun, Jul 4, 2010 at 1:02 PM,  <an...@apache.org> wrote:
>>>> Author: antelder
>>>> Date: Sun Jul  4 12:02:25 2010
>>>> New Revision: 960329
>>>>
>>>> URL: http://svn.apache.org/viewvc?rev=960329&view=rev
>>>> Log:
>>>> Reenable the version spi with the buildnumber-maven-plugin
>>>>
>>>> Modified:
>>>>    tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml
>>>>
>>>> Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml
>>>> URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml?rev=960329&r1=960328&r2=960329&view=diff
>>>> ==============================================================================
>>>> --- tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml (original)
>>>> +++ tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml Sun Jul  4 12:02:25 2010
>>>> @@ -70,7 +70,6 @@
>>>>
>>>>   <build>
>>>>     <plugins>
>>>> -<!--
>>>>       <plugin>
>>>>         <groupId>org.codehaus.mojo</groupId>
>>>>         <artifactId>buildnumber-maven-plugin</artifactId>
>>>> @@ -113,7 +112,6 @@
>>>>              </execution>
>>>>           </executions>
>>>>        </plugin>
>>>> --->
>>>>     </plugins>
>>>>   </build>
>>>>
>>>>
>>>>
>>>>
>>>
>>> This gives rise to the following error for me....
>>>
>>>
>>> [INFO] ------------------------------------------------------------------------
>>> [INFO] Building Apache Tuscany SCA Core SPI
>>> [INFO]    task-segment: [clean, install]
>>> [INFO] ------------------------------------------------------------------------
>>> [INFO] [clean:clean {execution: default-clean}]
>>> [INFO] Deleting D:\sca-java-2.x\modules\core-spi\target
>>> [INFO] [enforcer:enforce {execution: enforce-plugin-versions}]
>>> [INFO] [buildnumber:create {execution: default}]
>>> [INFO] Checking for local modifications: skipped.
>>> [INFO] Executing: cmd.exe /X /C "svn --non-interactive update D:\sca-java-2.x\mo
>>> dules\core-spi"
>>> [INFO] Working directory: D:\sca-java-2.x\modules\core-spi
>>> Provider message:
>>> The svn command failed.
>>> Command output:
>>> 'svn' is not recognized as an internal or external command,
>>> operable program or batch file.
>>>
>>> [INFO] ------------------------------------------------------------------------
>>> [ERROR] BUILD ERROR
>>> [INFO] ------------------------------------------------------------------------
>>> [INFO] Couldn't update project.
>>>
>>> Embedded error: Error!
>>>
>>
>> Do you know why? Presumably you do have svn in your build environment?
>
> That's the problem. I don't have the command line svn in my build environment.
>
>> Did it ever work for you when this was working and part of the build a
>> few months ago?
>
> I believe it did. I was on a different machine then.
>
>> I'm almost ready to give up on the svn revision number
>> and build datetime getters in the SPI and have just the getter for the
>> version, does any one have strong feelings for them?
>
> I haven't really got my mind around how this is set up to work so I'll
> comment when I've looked at the code.
>

The infrastructure folks have fixed this so it works again when
running on Hudson now.

Keeping this does mean though that svn is a prereq to the build, so we
can either accept that as a prereq, or remove the use of the plugin
and the SPI methods that use it, or try to fix the plugin so at least
it doesn't fail the build when svn isn't available,

   ...ant

Re: svn commit: r960329 - /tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml

Posted by Simon Laws <si...@googlemail.com>.
On Tue, Jul 6, 2010 at 1:49 PM, ant elder <an...@apache.org> wrote:
> On Mon, Jul 5, 2010 at 4:00 PM, Simon Laws <si...@googlemail.com> wrote:
>
>
>> I haven't really got my mind around how this is set up to work so I'll
>> comment when I've looked at the code.
>>
>
> To explain that bit:
>
> In the core-spi module there is a class org.apache.tuscany.sca.runtime
> which has three methods:
>
> String getVersion()
> String getRevsion()
> String getBuildTime()
>
> The version is just got from the version in the pom.xml but the other
> two require the buildnumber-maven-plugin to populate the values. The
> buildnumber-maven-plugin uses svn to get the revision so svn must be
> available in the build environment, if svn isn't available the plugin
> fails and kills the build and there doesn't seem to be any way to tell
> it to ignore the error and let the build carry on.
>
>   ...ant
>

Thanks Ant

So

version will be something like 2.0-M6-SNAPSHOT or whatever
build time with be the date/time the build was run (why is
buildnumber-maven-plugin require for that?)
review is the latest revision from svn from the codebase that this
build built code for?

I'm happy to install command line svn in my environment to make this
work. A couple of thoughts...

When we do a build where this is important, i.e. a distro candidate or
proper distribution we will have committed all the files to a tag so
would it be possible to use an svn keyword substitution to get the
revision instead of relying on plugins running svn? The person doing
the build must have checked the tag out in the first place. I guess
you could use this argument to say that they must have svn so why not
install it on the command line.

I note that the plugin docs says...

"Optionally, you can configure this mojo to produce a revision based
on a timestamp, or on a sequence, without requiring any interaction
with an SCM system. Note that currently, the only supported SCM is
subversion."

This is not as useful as the actual svn code revision we are building.
Depends what this revision number is being used for.

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Re: svn commit: r960329 - /tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml

Posted by ant elder <an...@apache.org>.
On Mon, Jul 5, 2010 at 4:00 PM, Simon Laws <si...@googlemail.com> wrote:


> I haven't really got my mind around how this is set up to work so I'll
> comment when I've looked at the code.
>

To explain that bit:

In the core-spi module there is a class org.apache.tuscany.sca.runtime
which has three methods:

String getVersion()
String getRevsion()
String getBuildTime()

The version is just got from the version in the pom.xml but the other
two require the buildnumber-maven-plugin to populate the values. The
buildnumber-maven-plugin uses svn to get the revision so svn must be
available in the build environment, if svn isn't available the plugin
fails and kills the build and there doesn't seem to be any way to tell
it to ignore the error and let the build carry on.

   ...ant

Re: svn commit: r960329 - /tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml

Posted by Simon Laws <si...@googlemail.com>.
On Mon, Jul 5, 2010 at 3:43 PM, ant elder <an...@gmail.com> wrote:
> On Mon, Jul 5, 2010 at 12:49 PM, Simon Laws <si...@googlemail.com> wrote:
>> On Sun, Jul 4, 2010 at 1:02 PM,  <an...@apache.org> wrote:
>>> Author: antelder
>>> Date: Sun Jul  4 12:02:25 2010
>>> New Revision: 960329
>>>
>>> URL: http://svn.apache.org/viewvc?rev=960329&view=rev
>>> Log:
>>> Reenable the version spi with the buildnumber-maven-plugin
>>>
>>> Modified:
>>>    tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml
>>>
>>> Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml
>>> URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml?rev=960329&r1=960328&r2=960329&view=diff
>>> ==============================================================================
>>> --- tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml (original)
>>> +++ tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml Sun Jul  4 12:02:25 2010
>>> @@ -70,7 +70,6 @@
>>>
>>>   <build>
>>>     <plugins>
>>> -<!--
>>>       <plugin>
>>>         <groupId>org.codehaus.mojo</groupId>
>>>         <artifactId>buildnumber-maven-plugin</artifactId>
>>> @@ -113,7 +112,6 @@
>>>              </execution>
>>>           </executions>
>>>        </plugin>
>>> --->
>>>     </plugins>
>>>   </build>
>>>
>>>
>>>
>>>
>>
>> This gives rise to the following error for me....
>>
>>
>> [INFO] ------------------------------------------------------------------------
>> [INFO] Building Apache Tuscany SCA Core SPI
>> [INFO]    task-segment: [clean, install]
>> [INFO] ------------------------------------------------------------------------
>> [INFO] [clean:clean {execution: default-clean}]
>> [INFO] Deleting D:\sca-java-2.x\modules\core-spi\target
>> [INFO] [enforcer:enforce {execution: enforce-plugin-versions}]
>> [INFO] [buildnumber:create {execution: default}]
>> [INFO] Checking for local modifications: skipped.
>> [INFO] Executing: cmd.exe /X /C "svn --non-interactive update D:\sca-java-2.x\mo
>> dules\core-spi"
>> [INFO] Working directory: D:\sca-java-2.x\modules\core-spi
>> Provider message:
>> The svn command failed.
>> Command output:
>> 'svn' is not recognized as an internal or external command,
>> operable program or batch file.
>>
>> [INFO] ------------------------------------------------------------------------
>> [ERROR] BUILD ERROR
>> [INFO] ------------------------------------------------------------------------
>> [INFO] Couldn't update project.
>>
>> Embedded error: Error!
>>
>
> Do you know why? Presumably you do have svn in your build environment?

That's the problem. I don't have the command line svn in my build environment.

> Did it ever work for you when this was working and part of the build a
> few months ago?

I believe it did. I was on a different machine then.

> I'm almost ready to give up on the svn revision number
> and build datetime getters in the SPI and have just the getter for the
> version, does any one have strong feelings for them?

I haven't really got my mind around how this is set up to work so I'll
comment when I've looked at the code.

>
>   ...ant
>

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Re: svn commit: r960329 - /tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml

Posted by ant elder <an...@gmail.com>.
On Mon, Jul 5, 2010 at 12:49 PM, Simon Laws <si...@googlemail.com> wrote:
> On Sun, Jul 4, 2010 at 1:02 PM,  <an...@apache.org> wrote:
>> Author: antelder
>> Date: Sun Jul  4 12:02:25 2010
>> New Revision: 960329
>>
>> URL: http://svn.apache.org/viewvc?rev=960329&view=rev
>> Log:
>> Reenable the version spi with the buildnumber-maven-plugin
>>
>> Modified:
>>    tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml
>>
>> Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml
>> URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml?rev=960329&r1=960328&r2=960329&view=diff
>> ==============================================================================
>> --- tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml (original)
>> +++ tuscany/sca-java-2.x/trunk/modules/core-spi/pom.xml Sun Jul  4 12:02:25 2010
>> @@ -70,7 +70,6 @@
>>
>>   <build>
>>     <plugins>
>> -<!--
>>       <plugin>
>>         <groupId>org.codehaus.mojo</groupId>
>>         <artifactId>buildnumber-maven-plugin</artifactId>
>> @@ -113,7 +112,6 @@
>>              </execution>
>>           </executions>
>>        </plugin>
>> --->
>>     </plugins>
>>   </build>
>>
>>
>>
>>
>
> This gives rise to the following error for me....
>
>
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Apache Tuscany SCA Core SPI
> [INFO]    task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean {execution: default-clean}]
> [INFO] Deleting D:\sca-java-2.x\modules\core-spi\target
> [INFO] [enforcer:enforce {execution: enforce-plugin-versions}]
> [INFO] [buildnumber:create {execution: default}]
> [INFO] Checking for local modifications: skipped.
> [INFO] Executing: cmd.exe /X /C "svn --non-interactive update D:\sca-java-2.x\mo
> dules\core-spi"
> [INFO] Working directory: D:\sca-java-2.x\modules\core-spi
> Provider message:
> The svn command failed.
> Command output:
> 'svn' is not recognized as an internal or external command,
> operable program or batch file.
>
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Couldn't update project.
>
> Embedded error: Error!
>

Do you know why? Presumably you do have svn in your build environment?
Did it ever work for you when this was working and part of the build a
few months ago? I'm almost ready to give up on the svn revision number
and build datetime getters in the SPI and have just the getter for the
version, does any one have strong feelings for them?

   ...ant