Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Export Product with ANT
Export Product with ANT [message #457490] Wed, 01 November 2006 17:43 Go to next message
Eclipse UserFriend
Originally posted by: florianwendland.freenet.de

Hello all,

is it possible to export a rcp-app with ANT and not with the build-in export
product wizard?

Greetings
Florian

------------------------------------------------------------ ----------------
----
Ich verwende die kostenlose Version von SPAMfighter,
die bei mir bis jetzt 2306 Spammails entfernt hat.
F
Re: Export Product with ANT [message #457492 is a reply to message #457490] Wed, 01 November 2006 18:33 Go to previous messageGo to next message
Patrick Paulin is currently offline Patrick PaulinFriend
Messages: 44
Registered: July 2009
Location: Madison, Wisconsin
Member
Hi Florian,

Yes, it's actually pretty easy to set up. Check out the following help doc
for details.

http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. pde.doc.user/reference/api/org/eclipse/pde/core/build/packag e-summary.html

--- Patrick
www.rcpquickstart.com


Florian Wendland wrote:

> Hello all,

> is it possible to export a rcp-app with ANT and not with the build-in export
> product wizard?

> Greetings
> Florian

> ------------------------------------------------------------ ----------------
> ----
> Ich verwende die kostenlose Version von SPAMfighter,
> die bei mir bis jetzt 2306 Spammails entfernt hat.
> Für private Anwender ist SPAMfighter völlig kostenlos!
> Jetzt gratis testen: hier klicken.


Patrick Paulin
Eclipse RCP/OSGi Trainer and Consultant
Modular Mind, Ltd.

patrick@modumind.com
www.modumind.com
twitter.com/pjpaulin
linkedin.com/in/pjpaulin
Re: Export Product with ANT [message #457544 is a reply to message #457492] Thu, 02 November 2006 10:20 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: florianwendland.freenet.de

Hello Patrick,
thanks fo rapid answering. I followed the link you mentioned, hut didn't get
behind the scenes of the automatic build.
Is there a an example, what explains how an automatic build could be done
within ant?

Thx
Florian

"Patrick Paulin" <patrick@rcpquickstart.com> schrieb im Newsbeitrag
news:44049e5ada8008c30a67eb98d9e2a8b7$1@www.eclipse.org...
> Hi Florian,
>
> Yes, it's actually pretty easy to set up. Check out the following help doc
> for details.
>
>
http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse. pde.doc.user/ref
erence/api/org/eclipse/pde/core/build/package-summary.html
>
> --- Patrick
> www.rcpquickstart.com
>
>
> Florian Wendland wrote:
>
> > Hello all,
>
> > is it possible to export a rcp-app with ANT and not with the build-in
export
> > product wizard?
>
> > Greetings
> > Florian
>
>
> ------------------------------------------------------------ --------------
--
> > ----
> > Ich verwende die kostenlose Version von SPAMfighter,
> > die bei mir bis jetzt 2306 Spammails entfernt hat.
> > F
Re: Export Product with ANT [message #457563 is a reply to message #457544] Thu, 02 November 2006 15:21 Go to previous messageGo to next message
Patrick Paulin is currently offline Patrick PaulinFriend
Messages: 44
Registered: July 2009
Location: Madison, Wisconsin
Member
Hi Florian,

Sorry about that. The correct link is:

http://help.eclipse.org/help32/topic/org.eclipse.pde.doc.use r/guide/tasks/pde_product_build.htm

The help doc is meant to get you to the point where you can launch an RCP
build from a command line. To launch the build from Ant, you would need to
create a target that uses the command line build. It would look something
like:

<target name="rcpAutomatedBuild">
<java classname="org.eclipse.core.launcher.Main" fork="true"
failonerror="true">
<arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" />
<arg value="-buildfile" />
<arg value="path-to-build-file" />
<arg value="-Dbuilder=path-to-config-folder" />
<classpath>
<pathelement location="path-to-eclipse/startup.jar" />
</classpath>
</java>
</target>

If I were you, I'd start by trying to build the "Hello RCP" application
(you can create this using the New Plug-in Project Wizard). The
instructions in the help page contain all the information you need. First
get it working from the command line and then add the Ant target.

If you have any specific questions about how to get it running, feel free
to ask.

--- Patrick
www.rcpquickstart.com


Florian Wendland wrote:

> Hello Patrick,
> thanks fo rapid answering. I followed the link you mentioned, hut didn't get
> behind the scenes of the automatic build.
> Is there a an example, what explains how an automatic build could be done
> within ant?

> Thx
> Florian


Patrick Paulin
Eclipse RCP/OSGi Trainer and Consultant
Modular Mind, Ltd.

patrick@modumind.com
www.modumind.com
twitter.com/pjpaulin
linkedin.com/in/pjpaulin
Re: Export Product with ANT [message #457570 is a reply to message #457544] Thu, 02 November 2006 15:58 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
I used that to create the tutorial for EclipseCon 06. You can find the links and materials at http://www.rcpapps.org/EclipseCon2006/ and the presentation is still in EclipseZilla (submission #18 if I remember correctly).

You need to let Eclipse run ant (hence the 'eant' script) and you must work the way it wants you to, not necessarily any other way you might want it to. Also, it's pretty tied in to downloading stuff from CVS (though you can skip that too).

There's an example at SourceForge that you can download and build on your own from this too.

Alex.
Re: Export Product with ANT [message #457867 is a reply to message #457544] Wed, 08 November 2006 14:04 Go to previous messageGo to next message
Jean-Michael Legait is currently offline Jean-Michael LegaitFriend
Messages: 11
Registered: July 2009
Junior Member
Hi
Florian have you succeed?
I have the same problem, and I read Doc, but I don't understand how to to that.
Can you say to me how did you do that?
Have you an code example?

Thanks very much!

Jean-Michael
Re: Export Product with ANT [message #462167 is a reply to message #457563] Wed, 24 January 2007 07:23 Go to previous messageGo to next message
Jian Lee is currently offline Jian LeeFriend
Messages: 21
Registered: July 2009
Junior Member
Hi Patrick,

I followed the link but cannot how to prepare the "Basic setup"..

And I also wrote a build file under the project directory:

<project name="build" default="rcpAutomatedBuild">
<property name="eclipse_home" value="../../">
</property>
<path id="run.classpath">
<pathelement location="${eclipse_home}/startup.jar" />
</path>
<target name="rcpAutomatedBuild">
<java classname="org.eclipse.core.launcher.Main"
classpathref="run.classpath" fork="true" failonerror="true">
<arg value="-application" />
<arg value="org.eclipse.ant.core.antRunner" />
<arg value="-buildfile" />
<arg
value=" ${eclipse_home}/plugins/org.eclipse.pde.build_3.2.0.v2006060 3/scripts/productBuild/productBuild.xml "
/>
<arg value="-Dbuilder= ${eclipse_home}/workspace/WelcomepageTest" />
</java>
</target>
</project>

but I got an error message:

[java] main:
[java] BUILD FAILED
[java]
G:\eclipse\plugins\org.eclipse.pde.build_3.2.0.v20060603\scr ipts\productBuild\productBuild.xml:16:
The following error occurred while executing this line:
[java] java.io.FileNotFoundException:
G:\eclipse\plugins\org.eclipse.pde.build_3.2.0.v20060603\plu gins\org.eclipse.pde.build_3.2.0.v20060603\scripts\productBu ild\productBuild.xml
(The system cannot find the path specified)
[java] Total time: 0 seconds

do you know what's the problem?

Patrick Paulin wrote:
> Hi Florian,
>
> Sorry about that. The correct link is:
>
> http://help.eclipse.org/help32/topic/org.eclipse.pde.doc.use r/guide/tasks/pde_product_build.htm
>
>
> The help doc is meant to get you to the point where you can launch an
> RCP build from a command line. To launch the build from Ant, you would
> need to create a target that uses the command line build. It would look
> something like:
>
> <target name="rcpAutomatedBuild"> <java
> classname="org.eclipse.core.launcher.Main" fork="true"
> failonerror="true"> <arg value="-application" /> <arg
> value="org.eclipse.ant.core.antRunner" /> <arg value="-buildfile"
> /> <arg value="path-to-build-file" /> <arg
> value="-Dbuilder=path-to-config-folder" /> <classpath>
> <pathelement location="path-to-eclipse/startup.jar" /> </classpath>
> </java> </target>
>
> If I were you, I'd start by trying to build the "Hello RCP" application
> (you can create this using the New Plug-in Project Wizard). The
> instructions in the help page contain all the information you need.
> First get it working from the command line and then add the Ant target.
> If you have any specific questions about how to get it running, feel
> free to ask.

>
>
Re: Export Product with ANT [message #462176 is a reply to message #462167] Wed, 24 January 2007 10:02 Go to previous messageGo to next message
Jean-Michael Legait is currently offline Jean-Michael LegaitFriend
Messages: 11
Registered: July 2009
Junior Member
Hi Chandler,

I already have had this problem.
Your eclipse_home is not correct.
You must use a absolute path.
property name="eclipse_home" value="G:\eclipse"

Regards,

Jean-Michael
Re: Export Product with ANT [message #462241 is a reply to message #462176] Thu, 25 January 2007 03:20 Go to previous messageGo to next message
Jian Lee is currently offline Jian LeeFriend
Messages: 21
Registered: July 2009
Junior Member
Hi Jean:

Thanks a lot for your reply, I changed the build file following your
direction and found the previous error disappeared:)

But now I got another error message:

[java] Buildfile:
G:\eclipse/plugins/org.eclipse.pde.build_3.2.0.v20060603/scr ipts/productBuild/productBuild.xml
[java] main:
[java] preBuild:
[java] [mkdir] Created dir:
G:\eclipse\plugins\org.eclipse.pde.build_3.2.0.v20060603\scr ipts\productBuild\${buildDirectory}
[java] preSetup:
[java] checkLocalMaps:
[java] getMapFiles:
[java] [cvs] Using cvs passfile: C:\Documents and
Settings\User\.cvspass
[java] [cvs] Caught exception: CreateProcess: cvs -d${mapsRepo}
checkout -rHEAD ${mapsRoot} error=2
[java] [concat] No existing files and no nested text, doing nothing
[java] postSetup:
[java] checkLocalBase:
[java] getBaseComponents:
[java] BUILD FAILED
[java]
G:\eclipse\plugins\org.eclipse.pde.build_3.2.0.v20060603\scr ipts\productBuild\productBuild.xml:16:
The following error occurred while executing this line:
[java]
G:\eclipse\plugins\org.eclipse.pde.build_3.2.0.v20060603\scr ipts\build.xml:42:
The following error occurred while executing this line:
[java]
G:\eclipse\plugins\org.eclipse.pde.build_3.2.0.v20060603\tem plates\headless-build\customTargets.xml:71:
The following error occurred while executing this line:
[java]
G:\eclipse\plugins\org.eclipse.pde.build_3.2.0.v20060603\tem plates\headless-build\customTargets.xml:16:
java.net.MalformedURLException: no protocol: ${eclipseBaseURL}
[java] Total time: 1 second


Do I need to change some config file under
G:\eclipse\plugins\org.eclipse.pde.build_3.2.0.v20060603\ directory?

Thanks a lot.

Chandler
Jean-Michael Legait wrote:
> Hi Chandler,
>
> I already have had this problem.
> Your eclipse_home is not correct.
> You must use a absolute path.
> property name="eclipse_home" value="G:\eclipse"
>
> Regards,
>
> Jean-Michael
Re: Export Product with ANT [message #462244 is a reply to message #462241] Thu, 25 January 2007 04:18 Go to previous message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
The fact that it seems to be creating directories like ${buildDirectory} suggests the properties aren't being set up somehow. The most likely reason for this is that you've not got the buildDirector property set, amongst other things.

In addition, you need to specify the cvsHost vars to get going.

I put the documentation of how to run the automated build together in the EclipseCon presentation; it might be worth consulting that again:

http://eclipsezilla.eclipsecon.org/show_bug.cgi?id=18

If you prefer examples, rather than code, you can look at:

http://rcpapps.cvs.sourceforge.net/rcpapps/org.rcpapps.base. feature/releng/

There's a build.xml and build.properties file there showing you what properties you must set.

NB the cvsHost is out-dated. It says:

cvsHost=cvs.sourceforge.net

but it should be

cvsHost=rcpapps.cvs.sourceforge.net

You can override this with -D on the Java command line.

PPS you might also like to download the 'eant' scripts I made available from the http://www.rcpapps.org/EclipseCon2006/ site, which boots up Eclipse and then the internal ant runner.

Alex.
Previous Topic:Plug-in Dependencies on 3.1 -> 3.2 RCP application
Next Topic:Implementing Editor in RCP
Goto Forum:
  


Current Time: Wed Sep 11 22:28:03 GMT 2024

Powered by FUDForum. Page generated in 0.04829 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top