Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[epp-dev] Archive and script

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I could not get the code for the archive ant task to export in any other format other than plugins.  This code is written as
plugins so it needs to run under an OSGI/eclipse platform.

I changed the org.eclipse.epp.sfx.archive.ant plugin to be an eclipse ant task. I got it to run part of the way through.
I want to know if I'm doing this correct or am I going about this the wrong way.  If I am doing what is supposed to be done
should I check this code into CVS?


When I run the new Ant task I'm getting an error in getTemplates().  Here is the code block: (it fails on url.openStream())
		ClassLoader loader = this.getClass().getClassLoader();
		URL url = loader.getResource("templates/win32.x86/extractor.exe");
		InputStream is = url.openStream();
here is the stack trace.
/home/markr/workspaces/runtime-IDE-sfx/make archive/build.xml:39: java.lang.NullPointerException
    at org.apache.tools.ant.dispatch.DispatchUtils.execute (DispatchUtils.java:115)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:357)
    at org.apache.tools.ant.Target.performTasks(Target.java:385)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java :41)
    at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run (InternalAntRunner.java:623)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:456)
    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:585)
    at org.eclipse.ant.core.AntRunner.run (AntRunner.java:377)
    at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:230)
    at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
    at org.eclipse.epp.sfx.archive.ant.ArchiveTask.getTemplates(ArchiveTask.java:59)
    at org.eclipse.epp.sfx.archive.ant.ArchiveTask.execute(ArchiveTask.java:89)
    at org.apache.tools.ant.UnknownElement.execute (UnknownElement.java:288)
    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:585)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
    ... 17 more

The line numbers will not match exactly with the code in the repository because I added some debugging log statements.

Here is the ant script:
<project name="createEuropaRCPPackageSFX" default="create_archive">
    <description>
            this ant script will create an SXF archive of the Europa RCP Package
    </description>
    <!-- =================================
          target: create_archive
         ================================= -->
    <target name="create_archive" depends="init" description="--> this ant script will create an SXF archive of the Europa RCP
Package">
        <tstamp>
            <format property="done.build" pattern="dd-MM-yyyy hh:mm:ss" />
           </tstamp>
        <echo message="Build of archive ${europa.java.package }" />
        <echo message="   started ${start.build}" />
        <echo message="   ended ${done.build}" />
        <epp.archive
            packagetype="sfx"
            command="installer/install.exe -vmargs -Dinstaller.jar.path=$#launcher#"
            archivefile="${basedir}/../test-install"
            pack200="true">

            <fileset dir="/home/markr/eclipses/eclipse_330">
                <include name="**/*.*"/>
            </fileset>

<!--
            <unpack>
                <fileset dir="${basedir}/installer">
                    <include name="**/*.*"/>
                </fileset>
            </unpack>
- -->
        </epp.archive>

    </target>

    <!-- - - - - - - - - - - - - - - - - -
          target: init
         - - - - - - - - - - - - - - - - - -->
    <target name="init">
        <tstamp />
        <tstamp>
            <format property="start.build" pattern="dd-MM-yyyy hh:mm:ss" />
           </tstamp>
        <mkdir dir="sfx" />
        <property name="europa.java.package.sfx" location="sfx/europaJavaPackage" />
    </target>

</project>

Please let me know where I'm making my mistake.
- --
Mark Russell
Instantiations, Inc.
724-368-3331 (land line)
http://www.instantiations.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGt4BAyHA2ZZVyicQRAl5/AJ9nql3YEl0lVjiup9mOUOQ6uFttGwCfRxgt
8rJxMkjvzYIsJtoJvqAMlaA=
=xRzH
-----END PGP SIGNATURE-----


Back to the top