How to deploy Visualforce Pages using force.com IDE without messed up .page-meta.xml referencing unnecessary managed packages?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
1
down vote

favorite
1












I wand to deploy a VF page, let's call it myVF.page, from Org A to Org B using force.com IDE (eclipse).



Now on Org A there are lots of managed packages installed. None of them are in relation or used in any way by myVF.page - but the myVFpage-meta.xml is polluted by tons of -tags like this



<packageVersions>
<majorNumber>1</majorNumber>
<minorNumber>1003</minorNumber>
<namespace>DF3</namespace>
</packageVersions>
<!-- ... here a HUGE LIST goes on and on ...-->
<packageVersions>
<majorNumber>2</majorNumber>
<minorNumber>1123</minorNumber>
<namespace>ec2</namespace>
</packageVersions>


I need these managed packages on the Org A. I don't need any of them in myVF.page



Now when I deploy, eclipse seems to use the .page-mate.xml implicitly even if I have not selected it. Then the deployment fails with errors listing unmet dependencies of the packages above in the destination Org B.



In Org B I don't want and I don't need these packages. But I need myVF.page to be deployed.



In my real scenario, there are lots of VF pages I need to deploy, not only one. If it was only one, I would locally edit the .page-meta.xml to get rid of the error. For a huge number of pages this would be ridiculous and I'm looking for a better way.



How can I easily get rid of these unwanted dependencies without modifying each .page-meta.xml file of all the affected pages?










share|improve this question





















  • Not sure if you saw this question, but the suggested solution there is to write a script to do this. Not ideal, obviously: salesforce.stackexchange.com/questions/7217/…
    – Guy
    1 hour ago
















up vote
1
down vote

favorite
1












I wand to deploy a VF page, let's call it myVF.page, from Org A to Org B using force.com IDE (eclipse).



Now on Org A there are lots of managed packages installed. None of them are in relation or used in any way by myVF.page - but the myVFpage-meta.xml is polluted by tons of -tags like this



<packageVersions>
<majorNumber>1</majorNumber>
<minorNumber>1003</minorNumber>
<namespace>DF3</namespace>
</packageVersions>
<!-- ... here a HUGE LIST goes on and on ...-->
<packageVersions>
<majorNumber>2</majorNumber>
<minorNumber>1123</minorNumber>
<namespace>ec2</namespace>
</packageVersions>


I need these managed packages on the Org A. I don't need any of them in myVF.page



Now when I deploy, eclipse seems to use the .page-mate.xml implicitly even if I have not selected it. Then the deployment fails with errors listing unmet dependencies of the packages above in the destination Org B.



In Org B I don't want and I don't need these packages. But I need myVF.page to be deployed.



In my real scenario, there are lots of VF pages I need to deploy, not only one. If it was only one, I would locally edit the .page-meta.xml to get rid of the error. For a huge number of pages this would be ridiculous and I'm looking for a better way.



How can I easily get rid of these unwanted dependencies without modifying each .page-meta.xml file of all the affected pages?










share|improve this question





















  • Not sure if you saw this question, but the suggested solution there is to write a script to do this. Not ideal, obviously: salesforce.stackexchange.com/questions/7217/…
    – Guy
    1 hour ago












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





I wand to deploy a VF page, let's call it myVF.page, from Org A to Org B using force.com IDE (eclipse).



Now on Org A there are lots of managed packages installed. None of them are in relation or used in any way by myVF.page - but the myVFpage-meta.xml is polluted by tons of -tags like this



<packageVersions>
<majorNumber>1</majorNumber>
<minorNumber>1003</minorNumber>
<namespace>DF3</namespace>
</packageVersions>
<!-- ... here a HUGE LIST goes on and on ...-->
<packageVersions>
<majorNumber>2</majorNumber>
<minorNumber>1123</minorNumber>
<namespace>ec2</namespace>
</packageVersions>


I need these managed packages on the Org A. I don't need any of them in myVF.page



Now when I deploy, eclipse seems to use the .page-mate.xml implicitly even if I have not selected it. Then the deployment fails with errors listing unmet dependencies of the packages above in the destination Org B.



In Org B I don't want and I don't need these packages. But I need myVF.page to be deployed.



In my real scenario, there are lots of VF pages I need to deploy, not only one. If it was only one, I would locally edit the .page-meta.xml to get rid of the error. For a huge number of pages this would be ridiculous and I'm looking for a better way.



How can I easily get rid of these unwanted dependencies without modifying each .page-meta.xml file of all the affected pages?










share|improve this question













I wand to deploy a VF page, let's call it myVF.page, from Org A to Org B using force.com IDE (eclipse).



Now on Org A there are lots of managed packages installed. None of them are in relation or used in any way by myVF.page - but the myVFpage-meta.xml is polluted by tons of -tags like this



<packageVersions>
<majorNumber>1</majorNumber>
<minorNumber>1003</minorNumber>
<namespace>DF3</namespace>
</packageVersions>
<!-- ... here a HUGE LIST goes on and on ...-->
<packageVersions>
<majorNumber>2</majorNumber>
<minorNumber>1123</minorNumber>
<namespace>ec2</namespace>
</packageVersions>


I need these managed packages on the Org A. I don't need any of them in myVF.page



Now when I deploy, eclipse seems to use the .page-mate.xml implicitly even if I have not selected it. Then the deployment fails with errors listing unmet dependencies of the packages above in the destination Org B.



In Org B I don't want and I don't need these packages. But I need myVF.page to be deployed.



In my real scenario, there are lots of VF pages I need to deploy, not only one. If it was only one, I would locally edit the .page-meta.xml to get rid of the error. For a huge number of pages this would be ridiculous and I'm looking for a better way.



How can I easily get rid of these unwanted dependencies without modifying each .page-meta.xml file of all the affected pages?







visualforce managed-package deployment eclipse






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 1 hour ago









Uwe Heim

21.1k552169




21.1k552169











  • Not sure if you saw this question, but the suggested solution there is to write a script to do this. Not ideal, obviously: salesforce.stackexchange.com/questions/7217/…
    – Guy
    1 hour ago
















  • Not sure if you saw this question, but the suggested solution there is to write a script to do this. Not ideal, obviously: salesforce.stackexchange.com/questions/7217/…
    – Guy
    1 hour ago















Not sure if you saw this question, but the suggested solution there is to write a script to do this. Not ideal, obviously: salesforce.stackexchange.com/questions/7217/…
– Guy
1 hour ago




Not sure if you saw this question, but the suggested solution there is to write a script to do this. Not ideal, obviously: salesforce.stackexchange.com/questions/7217/…
– Guy
1 hour ago










1 Answer
1






active

oldest

votes

















up vote
3
down vote













In an ant build script, I usually include the following:



 <target name="strip">
<replaceregexp flags="gs">
<regexp pattern="s*&lt;(listViews|searchLayouts)&gt;.+&lt;/1&gt;" />
<substitution expression="" />
<fileset dir=".\src\objects">
<include name="*.object" />
</fileset>
</replaceregexp>
<replaceregexp flags="gs">
<regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
<substitution expression="" />
<fileset dir=".\src\classes">
<include name="*.xml" />
</fileset>
</replaceregexp>
<replaceregexp flags="gs">
<regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
<substitution expression="" />
<fileset dir=".\src\pages">
<include name="*.xml" />
</fileset>
</replaceregexp>
<replaceregexp flags="gs">
<regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
<substitution expression="" />
<fileset dir=".\src\components">
<include name="*.xml" />
</fileset>
</replaceregexp>
<replaceregexp flags="gs">
<regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
<substitution expression="" />
<fileset dir=".\src\triggers">
<include name="*.xml" />
</fileset>
</replaceregexp>
</target>


This code is run as ant strip. It removes a lot of superficial elements that cause deployment issues, include package version errors and search layouts. Feel free to modify this as you like.






share|improve this answer




















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "459"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f238067%2fhow-to-deploy-visualforce-pages-using-force-com-ide-without-messed-up-page-meta%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    3
    down vote













    In an ant build script, I usually include the following:



     <target name="strip">
    <replaceregexp flags="gs">
    <regexp pattern="s*&lt;(listViews|searchLayouts)&gt;.+&lt;/1&gt;" />
    <substitution expression="" />
    <fileset dir=".\src\objects">
    <include name="*.object" />
    </fileset>
    </replaceregexp>
    <replaceregexp flags="gs">
    <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
    <substitution expression="" />
    <fileset dir=".\src\classes">
    <include name="*.xml" />
    </fileset>
    </replaceregexp>
    <replaceregexp flags="gs">
    <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
    <substitution expression="" />
    <fileset dir=".\src\pages">
    <include name="*.xml" />
    </fileset>
    </replaceregexp>
    <replaceregexp flags="gs">
    <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
    <substitution expression="" />
    <fileset dir=".\src\components">
    <include name="*.xml" />
    </fileset>
    </replaceregexp>
    <replaceregexp flags="gs">
    <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
    <substitution expression="" />
    <fileset dir=".\src\triggers">
    <include name="*.xml" />
    </fileset>
    </replaceregexp>
    </target>


    This code is run as ant strip. It removes a lot of superficial elements that cause deployment issues, include package version errors and search layouts. Feel free to modify this as you like.






    share|improve this answer
























      up vote
      3
      down vote













      In an ant build script, I usually include the following:



       <target name="strip">
      <replaceregexp flags="gs">
      <regexp pattern="s*&lt;(listViews|searchLayouts)&gt;.+&lt;/1&gt;" />
      <substitution expression="" />
      <fileset dir=".\src\objects">
      <include name="*.object" />
      </fileset>
      </replaceregexp>
      <replaceregexp flags="gs">
      <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
      <substitution expression="" />
      <fileset dir=".\src\classes">
      <include name="*.xml" />
      </fileset>
      </replaceregexp>
      <replaceregexp flags="gs">
      <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
      <substitution expression="" />
      <fileset dir=".\src\pages">
      <include name="*.xml" />
      </fileset>
      </replaceregexp>
      <replaceregexp flags="gs">
      <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
      <substitution expression="" />
      <fileset dir=".\src\components">
      <include name="*.xml" />
      </fileset>
      </replaceregexp>
      <replaceregexp flags="gs">
      <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
      <substitution expression="" />
      <fileset dir=".\src\triggers">
      <include name="*.xml" />
      </fileset>
      </replaceregexp>
      </target>


      This code is run as ant strip. It removes a lot of superficial elements that cause deployment issues, include package version errors and search layouts. Feel free to modify this as you like.






      share|improve this answer






















        up vote
        3
        down vote










        up vote
        3
        down vote









        In an ant build script, I usually include the following:



         <target name="strip">
        <replaceregexp flags="gs">
        <regexp pattern="s*&lt;(listViews|searchLayouts)&gt;.+&lt;/1&gt;" />
        <substitution expression="" />
        <fileset dir=".\src\objects">
        <include name="*.object" />
        </fileset>
        </replaceregexp>
        <replaceregexp flags="gs">
        <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
        <substitution expression="" />
        <fileset dir=".\src\classes">
        <include name="*.xml" />
        </fileset>
        </replaceregexp>
        <replaceregexp flags="gs">
        <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
        <substitution expression="" />
        <fileset dir=".\src\pages">
        <include name="*.xml" />
        </fileset>
        </replaceregexp>
        <replaceregexp flags="gs">
        <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
        <substitution expression="" />
        <fileset dir=".\src\components">
        <include name="*.xml" />
        </fileset>
        </replaceregexp>
        <replaceregexp flags="gs">
        <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
        <substitution expression="" />
        <fileset dir=".\src\triggers">
        <include name="*.xml" />
        </fileset>
        </replaceregexp>
        </target>


        This code is run as ant strip. It removes a lot of superficial elements that cause deployment issues, include package version errors and search layouts. Feel free to modify this as you like.






        share|improve this answer












        In an ant build script, I usually include the following:



         <target name="strip">
        <replaceregexp flags="gs">
        <regexp pattern="s*&lt;(listViews|searchLayouts)&gt;.+&lt;/1&gt;" />
        <substitution expression="" />
        <fileset dir=".\src\objects">
        <include name="*.object" />
        </fileset>
        </replaceregexp>
        <replaceregexp flags="gs">
        <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
        <substitution expression="" />
        <fileset dir=".\src\classes">
        <include name="*.xml" />
        </fileset>
        </replaceregexp>
        <replaceregexp flags="gs">
        <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
        <substitution expression="" />
        <fileset dir=".\src\pages">
        <include name="*.xml" />
        </fileset>
        </replaceregexp>
        <replaceregexp flags="gs">
        <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
        <substitution expression="" />
        <fileset dir=".\src\components">
        <include name="*.xml" />
        </fileset>
        </replaceregexp>
        <replaceregexp flags="gs">
        <regexp pattern="s*&lt;(packageVersions)&gt;.+&lt;/1&gt;" />
        <substitution expression="" />
        <fileset dir=".\src\triggers">
        <include name="*.xml" />
        </fileset>
        </replaceregexp>
        </target>


        This code is run as ant strip. It removes a lot of superficial elements that cause deployment issues, include package version errors and search layouts. Feel free to modify this as you like.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 1 hour ago









        sfdcfox

        236k10181397




        236k10181397



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsalesforce.stackexchange.com%2fquestions%2f238067%2fhow-to-deploy-visualforce-pages-using-force-com-ide-without-messed-up-page-meta%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What does second last employer means? [closed]

            Installing NextGIS Connect into QGIS 3?

            One-line joke