You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Matthias Müller <py...@yahoo.de> on 2009/01/16 09:47:10 UTC

[C2.2] Display Upload Progress

Hi there,
is there already something like a working "upload progress bar" for CForms? I red about a Dojo Widget (http://ajaxian.com/archives/dojo-file-upload-progress-bar-widget), but didn't found a concrete implementation.
Alternatively i could use something like Fancy Upload (http://digitarald.de/project/fancyupload/), but i would prefer a solution using native HTML Upload widgets.
regards, matthias



      

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


Re: AW: AW: [C2.2] Display Upload Progress

Posted by David Legg <da...@searchevent.co.uk>.

David Legg wrote:
> If you look for the pom.xml file in the [Cocoon trunk folder]/parent 
> folder you will see the dependency for cocoon-core listed as follows: -
>
>      <dependency>
>        <groupId>org.apache.cocoon</groupId>
>        <artifactId>cocoon-core</artifactId>
>        <version>2.2.1-SNAPSHOT</version>
>      </dependency>
>
> As all the other blocks refer to this parent pom file that's where the 
> version number is set.  The Cocoon developers could have put the 
> version number in each block's local pom.xml file but in a large 
> project like Cocoon it makes more sense to set the version number in 
> one place only.

Having thought this through some more I realize what I said is not 
strictly true.  The version numbers specified by the pom file in the 
'parent' folder sets the version number that all other artifacts that 
depend on this artifact should ask for.  The version number specified in 
the artifact's local pom file effectively sets the version number of 
this artifact when it gets built.

So to make this clearer if we take the 'cocoon-core' artifact; it's 
pom.xml file is defined in [cocoon trunk]\core\cocoon-core\pom.xml.  It 
contains a couple of lines as follows: -

  <artifactId>cocoon-core</artifactId>
  <version>2.2.1-SNAPSHOT</version>

These effectively set the version number of this artifact when it gets 
built.

However as I showed in my earlier email the pom.xml file in [cocoon 
trunk]\parent\pom.xml also specifies a version number (hopefully the 
same one!) and this is the one that other artifacts will look for if 
they express a dependency on it.

I also realized that maybe I should explain a bit more about the 
difference between the development version of Cocoon and the 'released' 
version.  The development version is obviously managed in a subversion 
repository.  As this is usually in a state of flux it is quite common to 
set the version numbers defined by some code to end in -SNAPSHOT.  This 
tells maven to check the repository to see if a slightly more up to date 
version is ready.  However, you should never see a version ending in 
-SNAPSHOT on the public maven repository.  In theory when a release is 
made only non-snapshot versions are copied onto the repository.

HTH
David Legg


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


Re: AW: AW: [C2.2] Display Upload Progress

Posted by David Legg <da...@searchevent.co.uk>.
Hi Matthias,

> first, a big THANKS for helping me and at the same time sorry that i destroyed your sample webapp.

No problem!

> what i didn't understand so far is:
> which instance decides which version of an artifact is the latest? why does maven try to download e.g. cocoon-core:2.2.1 when it's not available/released?
>   

If you look for the pom.xml file in the [Cocoon trunk folder]/parent 
folder you will see the dependency for cocoon-core listed as follows: -

      <dependency>
        <groupId>org.apache.cocoon</groupId>
        <artifactId>cocoon-core</artifactId>
        <version>2.2.1-SNAPSHOT</version>
      </dependency>

As all the other blocks refer to this parent pom file that's where the 
version number is set.  The Cocoon developers could have put the version 
number in each block's local pom.xml file but in a large project like 
Cocoon it makes more sense to set the version number in one place only.

Maven should only try to download an artifact from a remote repository 
if it can't find it in your machine's local repository.  The reason for 
the 'mvn install -P allblocks' command is to ensure that all the Cocoon 
block artifacts get built and then intalled in your local repository.  
If you are running on windows this is usually located in C:\Documents 
and Settings\[user name]\.m2\repository\

If you see maven trying to download a cocoon artifact (as opposed to a 
plugin) from a remote repository it suggests something is wrong.  I 
didn't see that when I built it from scratch though.

Regards,
David Legg


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


AW: AW: [C2.2] Display Upload Progress

Posted by Matthias Müller <py...@yahoo.de>.
Hi David,
first, a big THANKS for helping me and at the same time sorry that i destroyed your sample webapp. i had the same result (warning and error messages) like you and finally some working examples.
what i didn't understand so far is:
which instance decides which version of an artifact is the latest? why does maven try to download e.g. cocoon-core:2.2.1 when it's not available/released?


regards, matthias


----- Ursprüngliche Mail ----
Von: David Legg <da...@searchevent.co.uk>
An: users@cocoon.apache.org
Gesendet: Montag, den 19. Januar 2009, 18:00:02 Uhr
Betreff: Re: AW: [C2.2] Display Upload Progress

Hi Matthias,

> Hi i compiled all the samples as you described. but when i type "mvn -P allblocks jetty:run" in core/cocoon-webapp i still have the problem with the missing artifacts. don't you have problem that maven wants to download artifacts that doesn't exist in the specified remote repositories?
>  

To check what's going on I've rebuilt Cocoon from the latest subversion copy.

I deleted my maven repository (to ensure the build process starts from scratch).
I updated my subversion copy of Cocoon.
I ran 'mvn clean'

Here I ran into a few error messages.  Not sure why it would need a plugin in order to cleanup a few files: -

...
from the specified remote repositories:
   central (http://repo1.maven.org/maven2)

   org.apache.cocoon:cocoon-maven-plugin:maven-plugin:1.0.0-RC1-SNAPSHOT


I ignored this and then executed the main build command: -

mvn install -P allblocks

After a very long time and lots of messages and tests it built successfully: -

[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36 minutes 54 seconds
[INFO] Finished at: Mon Jan 19 16:00:33 GMT 2009
[INFO] Final Memory: 134M/240M
[INFO] ------------------------------------------------------------------------

D:\projects\cocoon\cocoontrunk>

Now for the moment of truth... to run the webapp!

cd core\cocoon-webapp
mvn jetty:run

Uh oh!  It runs jetty but only after spewing out loads of errors about bean configuration.  I've attached the messages to this email.

If I persevere and try accessing the sample webapp it not unexpectedly returns error 503 (Service unavailable).

So... *I guess the answer is the subversion trunk is currently broken*... which is unfortunate for me because now I cannot run the examples either :-(

I was using Maven version 2.0.9 which is the bare minimum you need to build Cocoon.  As for accessing those other repositories I had no problem (even though I think it is probably time to remove the dependency on some things from Grek's personal site!).  Actually, if you look in the 'parent' folder you will see these other repositories listed in the pom.xml: -

<repositories>
   <repository>
     <id>central</id>
     <name>Maven central repository</name>
     <url>http://repo1.maven.org/maven2</url>
     <releases>
       <enabled>true</enabled>
       <!-- only look for jars here when they are not present locally -->
       <updatePolicy>never</updatePolicy>
     </releases>
     <snapshots>
       <enabled>false</enabled>
     </snapshots>
   </repository>
   <!-- This is temporary repository -->
   <repository>
     <id>gkossakowski-maven2</id>
     <name>gkossakowski-maven2</name>
     <url>http://people.apache.org/~gkossakowski/maven2/repository</url>
   </repository>
</repositories>


Regards,
David Legg

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


      

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


Re: AW: [C2.2] Display Upload Progress

Posted by David Legg <da...@searchevent.co.uk>.
Hi Matthias,

> Hi i compiled all the samples as you described. but when i type "mvn -P allblocks jetty:run" in core/cocoon-webapp i still have the problem with the missing artifacts. 
> don't you have problem that maven wants to download artifacts that doesn't exist in the specified remote repositories?
>   

To check what's going on I've rebuilt Cocoon from the latest subversion 
copy.

I deleted my maven repository (to ensure the build process starts from 
scratch).
I updated my subversion copy of Cocoon.
I ran 'mvn clean'

Here I ran into a few error messages.  Not sure why it would need a 
plugin in order to cleanup a few files: -

  ...
  from the specified remote repositories:
    central (http://repo1.maven.org/maven2)

    org.apache.cocoon:cocoon-maven-plugin:maven-plugin:1.0.0-RC1-SNAPSHOT


I ignored this and then executed the main build command: -

  mvn install -P allblocks

After a very long time and lots of messages and tests it built 
successfully: -

  [INFO] BUILD SUCCESSFUL
  [INFO] 
------------------------------------------------------------------------
  [INFO] Total time: 36 minutes 54 seconds
  [INFO] Finished at: Mon Jan 19 16:00:33 GMT 2009
  [INFO] Final Memory: 134M/240M
  [INFO] 
------------------------------------------------------------------------

  D:\projects\cocoon\cocoontrunk>

Now for the moment of truth... to run the webapp!

  cd core\cocoon-webapp
  mvn jetty:run

Uh oh!  It runs jetty but only after spewing out loads of errors about 
bean configuration.  I've attached the messages to this email.

If I persevere and try accessing the sample webapp it not unexpectedly 
returns error 503 (Service unavailable).

So... *I guess the answer is the subversion trunk is currently 
broken*... which is unfortunate for me because now I cannot run the 
examples either :-(

I was using Maven version 2.0.9 which is the bare minimum you need to 
build Cocoon.  As for accessing those other repositories I had no 
problem (even though I think it is probably time to remove the 
dependency on some things from Grek's personal site!).  Actually, if you 
look in the 'parent' folder you will see these other repositories listed 
in the pom.xml: -

  <repositories>
    <repository>
      <id>central</id>
      <name>Maven central repository</name>
      <url>http://repo1.maven.org/maven2</url>
      <releases>
        <enabled>true</enabled>
        <!-- only look for jars here when they are not present locally -->
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <!-- This is temporary repository -->
    <repository>
      <id>gkossakowski-maven2</id>
      <name>gkossakowski-maven2</name>
      <url>http://people.apache.org/~gkossakowski/maven2/repository</url>
    </repository>
  </repositories>


Regards,
David Legg


AW: [C2.2] Display Upload Progress

Posted by Matthias Müller <py...@yahoo.de>.
Hi i compiled all the samples as you described. but when i type "mvn -P allblocks jetty:run" in core/cocoon-webapp i still have the problem with the missing artifacts. 
don't you have problem that maven wants to download artifacts that doesn't exist in the specified remote repositories?

regards matthias



----- Ursprüngliche Mail ----
Von: Benjamin Boksa <ma...@boksa.de>
An: users@cocoon.apache.org
Gesendet: Montag, den 19. Januar 2009, 13:52:49 Uhr
Betreff: Re: [C2.2] Display Upload Progress

Hi David,

>> [1] http://mrhaki.blogspot.com/2008/09/running-cocoon-22-samples.html
> 
> I'm pretty sure that when I tried, it failed to build if you skip the tests as mentioned in that blog.  The reason is one of the artifacts generated for the tests is actually required by the rest of Cocoon.

You are right - I did not skip the tests.

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


      

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


Re: [C2.2] Display Upload Progress

Posted by Benjamin Boksa <ma...@boksa.de>.
Hi David,

>> [1] http://mrhaki.blogspot.com/2008/09/running-cocoon-22-samples.html
>
> I'm pretty sure that when I tried, it failed to build if you skip  
> the tests as mentioned in that blog.  The reason is one of the  
> artifacts generated for the tests is actually required by the rest  
> of Cocoon.

You are right - I did not skip the tests.

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


Re: AW: AW: AW: [C2.2] Display Upload Progress

Posted by David Legg <da...@searchevent.co.uk>.
Hi Benjamin,

> I found this [1] blog post some time ago and the process described 
> there still works fine for me.
>
> [1] http://mrhaki.blogspot.com/2008/09/running-cocoon-22-samples.html

I'm pretty sure that when I tried, it failed to build if you skip the 
tests as mentioned in that blog.  The reason is one of the artifacts 
generated for the tests is actually required by the rest of Cocoon.

If I get chance, I'll try building it from fresh to see what the problem is.

Regards,
David Legg


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


Re: AW: AW: AW: [C2.2] Display Upload Progress

Posted by Benjamin Boksa <ma...@boksa.de>.
Hi Matthias,

I found this [1] blog post some time ago and the process described  
there still works fine for me.

HTH

Benjamin

[1] http://mrhaki.blogspot.com/2008/09/running-cocoon-22-samples.html


Am 19.01.2009 um 12:15 schrieb Matthias Müller:

> hi david, i already built the cocoon trunk as described in [1]. the  
> problem is that the cocoon-webapp tries to download the latest  
> artifacts (e.g. cocoon-core:2.2.1-SNAPSHOT) from the remote  
> repositories specified in the parent project, since there is no  
> version argument for them.
> gkossakowski-maven2 (http://people.apache.org/~gkossakowski/maven2/repository 
> ),
> apache.snapshots (http://people.apache.org/repo/m2-snapshot- 
> repository)
>
> these repositories doesn't have these artifact versions. do i need  
> to specify the dependecies to released versions?
>
> matthias
>
> [1] http://cocoon.apache.org/798_1_1.html
>
>
>
> ----- Ursprüngliche Mail ----
> Von: David Legg <da...@searchevent.co.uk>
> An: users@cocoon.apache.org
> Gesendet: Montag, den 19. Januar 2009, 11:58:38 Uhr
> Betreff: Re: AW: AW: [C2.2] Display Upload Progress
>
> Hi Matthias,
>
>> ok, maybe i was too fast. after downloading the trunk mvn can't  
>> find some artifacts for cocoon-webapp to be build (e.g. "cocoon- 
>> core-2.2.1-SNAPSHOT")
>> i specified the following remote repositories:
>> - central (http://repo1.maven.org/maven2)
>> - gkossakowski-maven2 (http://people.apache.org/~gkossakowski/maven2/repository 
>> )
>> - apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository 
>> )
>>
>> i tried to manually download the artifacts, but didn't find them
>>
>
> My earlier instructions were only an outline ;-)
>
> You should go through the 'Building Cocoon 2.2' page [1] first so  
> that you have all the required blocks installed.  Then you should be  
> able to run the mvn jetty:run command as I wrote it.
>
> HTH
> David Legg
>
>
>
> [1] http://cocoon.apache.org/798_1_1.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>


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


AW: AW: AW: [C2.2] Display Upload Progress

Posted by Matthias Müller <py...@yahoo.de>.
hi david, i already built the cocoon trunk as described in [1]. the problem is that the cocoon-webapp tries to download the latest artifacts (e.g. cocoon-core:2.2.1-SNAPSHOT) from the remote repositories specified in the parent project, since there is no version argument for them.
gkossakowski-maven2 (http://people.apache.org/~gkossakowski/maven2/repository),
apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository)

these repositories doesn't have these artifact versions. do i need to specify the dependecies to released versions?

matthias

[1] http://cocoon.apache.org/798_1_1.html



----- Ursprüngliche Mail ----
Von: David Legg <da...@searchevent.co.uk>
An: users@cocoon.apache.org
Gesendet: Montag, den 19. Januar 2009, 11:58:38 Uhr
Betreff: Re: AW: AW: [C2.2] Display Upload Progress

Hi Matthias,

> ok, maybe i was too fast. after downloading the trunk mvn can't find some artifacts for cocoon-webapp to be build (e.g. "cocoon-core-2.2.1-SNAPSHOT")
> i specified the following remote repositories:
> - central (http://repo1.maven.org/maven2)
> - gkossakowski-maven2 (http://people.apache.org/~gkossakowski/maven2/repository)
> - apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository)
> 
> i tried to manually download the artifacts, but didn't find them
>  

My earlier instructions were only an outline ;-)

You should go through the 'Building Cocoon 2.2' page [1] first so that you have all the required blocks installed.  Then you should be able to run the mvn jetty:run command as I wrote it.

HTH
David Legg



[1] http://cocoon.apache.org/798_1_1.html

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


      

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


Re: AW: AW: [C2.2] Display Upload Progress

Posted by David Legg <da...@searchevent.co.uk>.
Hi Matthias,

> ok, maybe i was too fast. after downloading the trunk mvn can't find some artifacts for cocoon-webapp to be build (e.g. "cocoon-core-2.2.1-SNAPSHOT")
> i specified the following remote repositories:
> - central (http://repo1.maven.org/maven2)
> - gkossakowski-maven2 (http://people.apache.org/~gkossakowski/maven2/repository)
> - apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository)
>
> i tried to manually download the artifacts, but didn't find them
>   

My earlier instructions were only an outline ;-)

You should go through the 'Building Cocoon 2.2' page [1] first so that 
you have all the required blocks installed.  Then you should be able to 
run the mvn jetty:run command as I wrote it.

HTH
David Legg



[1] http://cocoon.apache.org/798_1_1.html

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


AW: AW: [C2.2] Display Upload Progress

Posted by Matthias Müller <py...@yahoo.de>.
ok, maybe i was too fast. after downloading the trunk mvn can't find some artifacts for cocoon-webapp to be build (e.g. "cocoon-core-2.2.1-SNAPSHOT")
i specified the following remote repositories:
- central (http://repo1.maven.org/maven2)
- gkossakowski-maven2 (http://people.apache.org/~gkossakowski/maven2/repository)
- apache.snapshots (http://people.apache.org/repo/m2-snapshot-repository)

i tried to manually download the artifacts, but didn't find them

regards, matthias




----- Ursprüngliche Mail ----
Von: Matthias Müller <py...@yahoo.de>
An: users@cocoon.apache.org
Gesendet: Montag, den 19. Januar 2009, 10:31:11 Uhr
Betreff: AW: [C2.2] Display Upload Progress

Hi David,

thanks for the advice. i always wondered how to get these nice samples ;-)

matthias



----- Ursprüngliche Mail ----
Von: David Legg <da...@searchevent.co.uk>
An: users@cocoon.apache.org
Gesendet: Freitag, den 16. Januar 2009, 17:50:04 Uhr
Betreff: Re: [C2.2] Display Upload Progress

Hi Matthias,

> is there already something like a working "upload progress bar" for CForms?

There is an Ajax based upload progress bar demonstrated in the Cocoon samples.

I assume you know how to run the sample application?  Here's the gist of it: -

1. Download the Cocoon 2.2 trunk using subversion.
2. cd [cocoontrunk location]\core\cocoon-webapp
3. mvn jetty:run
4. open your browser at http://localhost:8888/samples/forms/uploadprogress

HTH
David Legg


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




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


      

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


AW: [C2.2] Display Upload Progress

Posted by Matthias Müller <py...@yahoo.de>.
Hi David,

thanks for the advice. i always wondered how to get these nice samples ;-)

matthias



----- Ursprüngliche Mail ----
Von: David Legg <da...@searchevent.co.uk>
An: users@cocoon.apache.org
Gesendet: Freitag, den 16. Januar 2009, 17:50:04 Uhr
Betreff: Re: [C2.2] Display Upload Progress

Hi Matthias,

> is there already something like a working "upload progress bar" for CForms?

There is an Ajax based upload progress bar demonstrated in the Cocoon samples.

I assume you know how to run the sample application?  Here's the gist of it: -

1. Download the Cocoon 2.2 trunk using subversion.
2. cd [cocoontrunk location]\core\cocoon-webapp
3. mvn jetty:run
4. open your browser at http://localhost:8888/samples/forms/uploadprogress

HTH
David Legg


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


      

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


Re: [C2.2] Display Upload Progress

Posted by David Legg <da...@searchevent.co.uk>.
Hi Matthias,

> is there already something like a working "upload progress bar" for CForms?

There is an Ajax based upload progress bar demonstrated in the Cocoon 
samples.

I assume you know how to run the sample application?  Here's the gist of 
it: -

1. Download the Cocoon 2.2 trunk using subversion.
2. cd [cocoontrunk location]\core\cocoon-webapp
3. mvn jetty:run
4. open your browser at http://localhost:8888/samples/forms/uploadprogress

HTH
David Legg


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