You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Mel Martinez (JIRA)" <ji...@apache.org> on 2009/12/29 23:27:29 UTC

[jira] Created: (PDFBOX-587) build script should support building without an internet connection

build script should support building without an internet connection
-------------------------------------------------------------------

                 Key: PDFBOX-587
                 URL: https://issues.apache.org/jira/browse/PDFBOX-587
             Project: PDFBox
          Issue Type: Bug
    Affects Versions: 0.8.0-incubator
         Environment: development
            Reporter: Mel Martinez


The build scripts for PDFBox currently depend on having an internet connection in order to build.  This should be fixed so that the distribution can be built in cases where no internet connectivity is available.

The purpose of the connectivity is to download various dependencies.  For the most part that is fine.  The scripts check for the existence of needed files and if not found retrieve them.

So for most cases, simply manually pre-populating the /externals, /download and /tools folders with the needed files works just fine.

The one place where the script still breaks is the dependency on the glyphlist.txt file which it looks for in the /target/classes/Resources folder.   Since the initial 'clean' target at the start of the 'dist' build wipes out the 'target' folder, then that dependency never 'exists' and the build script will ALWAYS try to download that file and fail if there is no internet connection.

The solution is fairly simple:  That file should be downloaded first to the /downloads directory and then copied to the /target/classes/Resources directory.   That allows you to manually seed the file into the /downloads directory and build without a connection.

Fixing this in the build.xml script is very straightforward:

line 115 should change 
from:      <property name="adobefiles.glyph.txt" value="${dest.dir}/Resources/glyphlist.txt"/>
to:            <property name="adobefiles.glyph.txt" value="${download.dir}/glyphlist.txt"/>

line 193 should have the following line inserted
    	  <copy todir="${dest.dir}/Resources/" file="${adobefiles.glyph.txt}" overwrite="true"/>

That's it!

To really do this nicely, it would be nice if all the downloads were first placed into /downloads and then copied to /externals, /tools, etc. , and that all such downloaded files were concisely documented or at least listed out in one place in the script so that one could know what to go retrieve manually.

But just the above fix would be a major improvement.

I know we are moving PDFBox to a Maven build, but unfortunately I still need to be able to build within a fairly restrictive environment.

Thanks.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-587) build script should support building without an internet connection

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12797317#action_12797317 ] 

Andreas Lehmkühler commented on PDFBOX-587:
-------------------------------------------

PDFBox "officially" uses Java5 features, so that JDK5 is a minimum requirement. 

With version 896671 I've updated the jempbox (-> 1.0.0) and the bouncycastle (-> jdk15-1.44) jars in the build.xml and the pom.xml. Additionally I've bumped the pdfbox version to 1.0.


> build script should support building without an internet connection
> -------------------------------------------------------------------
>
>                 Key: PDFBOX-587
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-587
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 0.8.0-incubator
>         Environment: development
>            Reporter: Mel Martinez
>
> The build scripts for PDFBox currently depend on having an internet connection in order to build.  This should be fixed so that the distribution can be built in cases where no internet connectivity is available.
> The purpose of the connectivity is to download various dependencies.  For the most part that is fine.  The scripts check for the existence of needed files and if not found retrieve them.
> So for most cases, simply manually pre-populating the /externals, /download and /tools folders with the needed files works just fine.
> The one place where the script still breaks is the dependency on the glyphlist.txt file which it looks for in the /target/classes/Resources folder.   Since the initial 'clean' target at the start of the 'dist' build wipes out the 'target' folder, then that dependency never 'exists' and the build script will ALWAYS try to download that file and fail if there is no internet connection.
> The solution is fairly simple:  That file should be downloaded first to the /downloads directory and then copied to the /target/classes/Resources directory.   That allows you to manually seed the file into the /downloads directory and build without a connection.
> Fixing this in the build.xml script is very straightforward:
> line 115 should change 
> from:      <property name="adobefiles.glyph.txt" value="${dest.dir}/Resources/glyphlist.txt"/>
> to:            <property name="adobefiles.glyph.txt" value="${download.dir}/glyphlist.txt"/>
> line 193 should have the following line inserted
>     	  <copy todir="${dest.dir}/Resources/" file="${adobefiles.glyph.txt}" overwrite="true"/>
> That's it!
> To really do this nicely, it would be nice if all the downloads were first placed into /downloads and then copied to /externals, /tools, etc. , and that all such downloaded files were concisely documented or at least listed out in one place in the script so that one could know what to go retrieve manually.
> But just the above fix would be a major improvement.
> I know we are moving PDFBox to a Maven build, but unfortunately I still need to be able to build within a fairly restrictive environment.
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-587) build script should support building without an internet connection

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796012#action_12796012 ] 

Andreas Lehmkühler commented on PDFBOX-587:
-------------------------------------------

I've added the proposed changes with version 895462. Thanks to Mel for his contribution.

I think we still will have an ant build file, even if we are switching the build to maven. 

> build script should support building without an internet connection
> -------------------------------------------------------------------
>
>                 Key: PDFBOX-587
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-587
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 0.8.0-incubator
>         Environment: development
>            Reporter: Mel Martinez
>
> The build scripts for PDFBox currently depend on having an internet connection in order to build.  This should be fixed so that the distribution can be built in cases where no internet connectivity is available.
> The purpose of the connectivity is to download various dependencies.  For the most part that is fine.  The scripts check for the existence of needed files and if not found retrieve them.
> So for most cases, simply manually pre-populating the /externals, /download and /tools folders with the needed files works just fine.
> The one place where the script still breaks is the dependency on the glyphlist.txt file which it looks for in the /target/classes/Resources folder.   Since the initial 'clean' target at the start of the 'dist' build wipes out the 'target' folder, then that dependency never 'exists' and the build script will ALWAYS try to download that file and fail if there is no internet connection.
> The solution is fairly simple:  That file should be downloaded first to the /downloads directory and then copied to the /target/classes/Resources directory.   That allows you to manually seed the file into the /downloads directory and build without a connection.
> Fixing this in the build.xml script is very straightforward:
> line 115 should change 
> from:      <property name="adobefiles.glyph.txt" value="${dest.dir}/Resources/glyphlist.txt"/>
> to:            <property name="adobefiles.glyph.txt" value="${download.dir}/glyphlist.txt"/>
> line 193 should have the following line inserted
>     	  <copy todir="${dest.dir}/Resources/" file="${adobefiles.glyph.txt}" overwrite="true"/>
> That's it!
> To really do this nicely, it would be nice if all the downloads were first placed into /downloads and then copied to /externals, /tools, etc. , and that all such downloaded files were concisely documented or at least listed out in one place in the script so that one could know what to go retrieve manually.
> But just the above fix would be a major improvement.
> I know we are moving PDFBox to a Maven build, but unfortunately I still need to be able to build within a fairly restrictive environment.
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-587) build script should support building without an internet connection

Posted by "Andreas Lehmkühler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796565#action_12796565 ] 

Andreas Lehmkühler commented on PDFBOX-587:
-------------------------------------------

I fixed my copy&paste fault with version 895921. 

@Mel: Thanks for the hint.

> build script should support building without an internet connection
> -------------------------------------------------------------------
>
>                 Key: PDFBOX-587
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-587
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 0.8.0-incubator
>         Environment: development
>            Reporter: Mel Martinez
>
> The build scripts for PDFBox currently depend on having an internet connection in order to build.  This should be fixed so that the distribution can be built in cases where no internet connectivity is available.
> The purpose of the connectivity is to download various dependencies.  For the most part that is fine.  The scripts check for the existence of needed files and if not found retrieve them.
> So for most cases, simply manually pre-populating the /externals, /download and /tools folders with the needed files works just fine.
> The one place where the script still breaks is the dependency on the glyphlist.txt file which it looks for in the /target/classes/Resources folder.   Since the initial 'clean' target at the start of the 'dist' build wipes out the 'target' folder, then that dependency never 'exists' and the build script will ALWAYS try to download that file and fail if there is no internet connection.
> The solution is fairly simple:  That file should be downloaded first to the /downloads directory and then copied to the /target/classes/Resources directory.   That allows you to manually seed the file into the /downloads directory and build without a connection.
> Fixing this in the build.xml script is very straightforward:
> line 115 should change 
> from:      <property name="adobefiles.glyph.txt" value="${dest.dir}/Resources/glyphlist.txt"/>
> to:            <property name="adobefiles.glyph.txt" value="${download.dir}/glyphlist.txt"/>
> line 193 should have the following line inserted
>     	  <copy todir="${dest.dir}/Resources/" file="${adobefiles.glyph.txt}" overwrite="true"/>
> That's it!
> To really do this nicely, it would be nice if all the downloads were first placed into /downloads and then copied to /externals, /tools, etc. , and that all such downloaded files were concisely documented or at least listed out in one place in the script so that one could know what to go retrieve manually.
> But just the above fix would be a major improvement.
> I know we are moving PDFBox to a Maven build, but unfortunately I still need to be able to build within a fairly restrictive environment.
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-587) build script should support building without an internet connection

Posted by "Mel Martinez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796293#action_12796293 ] 

Mel Martinez commented on PDFBOX-587:
-------------------------------------

Andreas,

You didn't quite get the first line (115) correct.  You changed ${dest.dir} --> ${download.dir} but you left 'Resources' in the path.

I.E. you left it as 

<property name="adobefiles.glyph.text" value = "${download.dir}/Resources/glyphlist.txt"/>

That can work, but conceptually it is a bit inelegant.  There are other things placed into '${dest.dir}/Resources/' that are not downloaded.   It would be slightly more elegant to NOT create a 'Resources' directory in the download staging directory.   Files should be dropped or downloaded to the 'download' directory and THEN moved to their proper places in the project tree.  We should not reproduce part of the tree within the download directory.

I.E. - I recommend we use 

<property name="adobefiles.glyph.txt" value="${download.dir}/glyphlist.txt"/> 

for line 115.

> build script should support building without an internet connection
> -------------------------------------------------------------------
>
>                 Key: PDFBOX-587
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-587
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 0.8.0-incubator
>         Environment: development
>            Reporter: Mel Martinez
>
> The build scripts for PDFBox currently depend on having an internet connection in order to build.  This should be fixed so that the distribution can be built in cases where no internet connectivity is available.
> The purpose of the connectivity is to download various dependencies.  For the most part that is fine.  The scripts check for the existence of needed files and if not found retrieve them.
> So for most cases, simply manually pre-populating the /externals, /download and /tools folders with the needed files works just fine.
> The one place where the script still breaks is the dependency on the glyphlist.txt file which it looks for in the /target/classes/Resources folder.   Since the initial 'clean' target at the start of the 'dist' build wipes out the 'target' folder, then that dependency never 'exists' and the build script will ALWAYS try to download that file and fail if there is no internet connection.
> The solution is fairly simple:  That file should be downloaded first to the /downloads directory and then copied to the /target/classes/Resources directory.   That allows you to manually seed the file into the /downloads directory and build without a connection.
> Fixing this in the build.xml script is very straightforward:
> line 115 should change 
> from:      <property name="adobefiles.glyph.txt" value="${dest.dir}/Resources/glyphlist.txt"/>
> to:            <property name="adobefiles.glyph.txt" value="${download.dir}/glyphlist.txt"/>
> line 193 should have the following line inserted
>     	  <copy todir="${dest.dir}/Resources/" file="${adobefiles.glyph.txt}" overwrite="true"/>
> That's it!
> To really do this nicely, it would be nice if all the downloads were first placed into /downloads and then copied to /externals, /tools, etc. , and that all such downloaded files were concisely documented or at least listed out in one place in the script so that one could know what to go retrieve manually.
> But just the above fix would be a major improvement.
> I know we are moving PDFBox to a Maven build, but unfortunately I still need to be able to build within a fairly restrictive environment.
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (PDFBOX-587) build script should support building without an internet connection

Posted by "Mel Martinez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/PDFBOX-587?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796202#action_12796202 ] 

Mel Martinez commented on PDFBOX-587:
-------------------------------------

Thanks Andreas.

In order to maintain the Ant build.xml viability, two other changes need to be made:

1) the version stamp should be updated to "1.0.0"

2) the BouncyCastle jars that are used need to be changed to the ones for JDK 1.5 or 1.6.  The build.xml currently has those hard-coded to specify the JDK 1.4 versions.

My project is currently using JDK 1.6 so I have tweaked it to use bcprov-jdk16-144.jar and bcmail-jdk16-144.jar.   Is PDFBox "officially" being built with JDK 5 or JDK 6?

Perhaps a more dynamic bit of logic in the script might be called for there to use the appropriate ones based on the javac version.

> build script should support building without an internet connection
> -------------------------------------------------------------------
>
>                 Key: PDFBOX-587
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-587
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 0.8.0-incubator
>         Environment: development
>            Reporter: Mel Martinez
>
> The build scripts for PDFBox currently depend on having an internet connection in order to build.  This should be fixed so that the distribution can be built in cases where no internet connectivity is available.
> The purpose of the connectivity is to download various dependencies.  For the most part that is fine.  The scripts check for the existence of needed files and if not found retrieve them.
> So for most cases, simply manually pre-populating the /externals, /download and /tools folders with the needed files works just fine.
> The one place where the script still breaks is the dependency on the glyphlist.txt file which it looks for in the /target/classes/Resources folder.   Since the initial 'clean' target at the start of the 'dist' build wipes out the 'target' folder, then that dependency never 'exists' and the build script will ALWAYS try to download that file and fail if there is no internet connection.
> The solution is fairly simple:  That file should be downloaded first to the /downloads directory and then copied to the /target/classes/Resources directory.   That allows you to manually seed the file into the /downloads directory and build without a connection.
> Fixing this in the build.xml script is very straightforward:
> line 115 should change 
> from:      <property name="adobefiles.glyph.txt" value="${dest.dir}/Resources/glyphlist.txt"/>
> to:            <property name="adobefiles.glyph.txt" value="${download.dir}/glyphlist.txt"/>
> line 193 should have the following line inserted
>     	  <copy todir="${dest.dir}/Resources/" file="${adobefiles.glyph.txt}" overwrite="true"/>
> That's it!
> To really do this nicely, it would be nice if all the downloads were first placed into /downloads and then copied to /externals, /tools, etc. , and that all such downloaded files were concisely documented or at least listed out in one place in the script so that one could know what to go retrieve manually.
> But just the above fix would be a major improvement.
> I know we are moving PDFBox to a Maven build, but unfortunately I still need to be able to build within a fairly restrictive environment.
> Thanks.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.