You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by "Prestel, John D." <Jo...@ngc.com> on 2008/04/30 20:54:28 UTC

Building embedded server

My goal is to build Ftpserver and get it running embedded in my Spring
application. My group is especially excited for the Ftplet API's
potential uses. 

Unfortunately, I must admit that I'm new to both Ftpserver and
(especially) Maven.

What I've done so far:
----------------------

Last night, I downloaded SVN and Maven and decided to jump right in. I
checked out the code and tried building, immediately running into the
build problem that was previously reported. I was able to apply Niklas's
recommended changes to /pom.xml
(http://www.mail-archive.com/ftpserver-users@mina.apache.org/msg00111.ht
ml) and run the mvn install command (with -Dmaven.test.skip=true) but
didn't know what to do after that. 

At that time, I figured I'd try running the package command in
/distribution and see where that got me. It failed, complaining that it
couldn't find admin-gui. I referred to the mailing list archive again
and saw that admin-gui was moved to the sandbox. So I checked it out,
but failed to get it built before it was time to leave for the night.

Today, I read Niklas's post about checking in a corrected pom.xml and a
patched distribution
(http://www.mail-archive.com/ftpserver-users@mina.apache.org/msg00112.ht
ml). In haste I trashed the Ftpserver directory(and my saved maven
output with it >.<) and went to do a fresh checkout. Sadly, the SVN
seems to be having a fit this afternoon, so I'm stuck in limbo.

What I'm hoping for:
--------------------

While waiting for the SVN to come up so I can fiddle some more, I
figured it wouldn't hurt to write you all in hopes of getting some more
detailed instructions / exact steps to get Ftpserver embedded, starting
from the build. 

Only other question at this time: Yesterday I noticed that the
/distribution came pre-populated with binaries and such. Are they
usable?

|John

Re: Building embedded server

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Thu, May 1, 2008 at 2:36 PM, Prestel, John D. <Jo...@ngc.com> wrote:
>  Now it's on to figuring out how to embed the server. Is configuration
>  through Spring setup yet (beans + dependency injection hooray!)?

Well, yes you should be able to use it from your regular Spring
configuration. However, I'm currently working on a namespace handler
for Spring which will make this a lot smoother.

/niklas

RE: Building embedded server

Posted by "Prestel, John D." <Jo...@ngc.com>.
That did the trick. Everything built successfully including the
distribution package.

Now it's on to figuring out how to embed the server. Is configuration
through Spring setup yet (beans + dependency injection hooray!)?

|John


-----Original Message-----
From: Niklas Gustavsson [mailto:niklas@protocol7.com] 
Sent: Thursday, May 01, 2008 8:09 AM
To: ftpserver-users@mina.apache.org
Subject: Re: Building embedded server

On Thu, May 1, 2008 at 2:02 PM, Prestel, John D. <Jo...@ngc.com>
wrote:
>  Build failed on core. Looks like there 7 unit tests produced errors.
>  I've gone ahead and tried to attach the Maven output in a .txt, but
>  here's a snippet just in case:

I just a minute ago applied a patch from Magnus Grimsell that might
fix this issue (I'm not seeing it on my machine). Could you please do
an svn update and see if it helps for you? If not, please provide the
logs from target/surefire-reports for the tests that fail.

/niklas

Re: Building embedded server

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Thu, May 1, 2008 at 2:02 PM, Prestel, John D. <Jo...@ngc.com> wrote:
>  Build failed on core. Looks like there 7 unit tests produced errors.
>  I've gone ahead and tried to attach the Maven output in a .txt, but
>  here's a snippet just in case:

I just a minute ago applied a patch from Magnus Grimsell that might
fix this issue (I'm not seeing it on my machine). Could you please do
an svn update and see if it helps for you? If not, please provide the
logs from target/surefire-reports for the tests that fail.

/niklas

RE: Building embedded server

Posted by "Prestel, John D." <Jo...@ngc.com>.
>>  While waiting for the SVN to come up so I can fiddle some more, I
>>  figured it wouldn't hurt to write you all in hopes of getting some
more
>>  detailed instructions / exact steps to get Ftpserver embedded,
starting
>>  from the build.
>
> Yes, please, if you got the time, wait for SVN to get back working for
> you. Now you should find the issues hopefully fixed for you.

Build failed on core. Looks like there 7 unit tests produced errors.
I've gone ahead and tried to attach the Maven output in a .txt, but
here's a snippet just in case:

--------------------------------

Results :

Tests in error: 
 
testExceptionDuringDownloadEnd(org.apache.ftpserver.ftplet.FtpLetThrowRu
ntimeExceptionTest)
 
testExceptionDuringAppendEnd(org.apache.ftpserver.ftplet.FtpLetReturnDis
connectTest)
 
testExceptionDuringUploadEnd(org.apache.ftpserver.ftplet.FtpLetReturnDis
connectTest)
 
testAppendNoFileName(org.apache.ftpserver.clienttests.StorePassiveTest)
 
testAppendWithoutWriteAccess(org.apache.ftpserver.clienttests.StorePassi
veTest)
 
testAppendToNoExistingFile(org.apache.ftpserver.clienttests.StorePassive
Test)
 
testExceptionDuringDownloadEnd(org.apache.ftpserver.ftplet.FtpLetThrowIO
ExceptionTest)

Tests run: 517, Failures: 0, Errors: 7, Skipped: 0

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] There are test failures.

Re: Building embedded server

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Thu, May 1, 2008 at 1:23 PM, Prestel, John D. <Jo...@ngc.com> wrote:
>  ftpserver/distribution/bin/ftpd.exe
>  ftpserver/distribution/bin/ftpdw.exe
>  ftpserver/distribution/bin/service.bat

These are used for setting up FtpServer as a service on Windows.

>  Being new, I'm not sure what I should expect to be in /distribution. Are
>  there conventions in this regard (either in general or when using
>  Maven)?

distribution will after building contain a runnable standalone
FtpServer. In your case, as you're embedding, you only need ftplet-api
and core.

/niklas

RE: Building embedded server

Posted by "Prestel, John D." <Jo...@ngc.com>.
> Yes, please, if you got the time, wait for SVN to get back working for
> you. Now you should find the issues hopefully fixed for you.
>
> I've updated our documentation for building the source:
> http://cwiki.apache.org/confluence/display/FTPSERVER/Building
>
> Tomorrow I'll see if I can create a temporary binary snapshot of
> commons-net until we get an official. That way we could drop the
> inline commons-net module and get our build working as it should.

It seems I was successful in checking out the trunk this morning, so
I'll get back to fiddling. I appreciate the updated documentation!

>>  Only other question at this time: Yesterday I noticed that the
>>  /distribution came pre-populated with binaries and such. Are they
>>  usable?

>Really? Where did you find these binaries?

e.g. 
ftpserver/distribution/bin/ftpd.exe
ftpserver/distribution/bin/ftpdw.exe
ftpserver/distribution/bin/service.bat

Being new, I'm not sure what I should expect to be in /distribution. Are
there conventions in this regard (either in general or when using
Maven)?

|John 

Re: Building embedded server

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Wed, Apr 30, 2008 at 8:54 PM, Prestel, John D. <Jo...@ngc.com> wrote:
> My goal is to build Ftpserver and get it running embedded in my Spring
>  application. My group is especially excited for the Ftplet API's
>  potential uses.

Glad to hear :-)

>  Unfortunately, I must admit that I'm new to both Ftpserver and
>  (especially) Maven.

Well, that's why we're here :-)

>  While waiting for the SVN to come up so I can fiddle some more, I
>  figured it wouldn't hurt to write you all in hopes of getting some more
>  detailed instructions / exact steps to get Ftpserver embedded, starting
>  from the build.

Yes, please, if you got the time, wait for SVN to get back working for
you. Now you should find the issues hopefully fixed for you.

I've updated our documentation for building the source:
http://cwiki.apache.org/confluence/display/FTPSERVER/Building

Tomorrow I'll see if I can create a temporary binary snapshot of
commons-net until we get an official. That way we could drop the
inline commons-net module and get our build working as it should.

>  Only other question at this time: Yesterday I noticed that the
>  /distribution came pre-populated with binaries and such. Are they
>  usable?

Really? Where did you find these binaries?

/niklas