<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use custom WAR with Maven SDK 2.0 in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-use-custom-war-with-maven-sdk-2-0/m-p/303724#M256854</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First of all thanks for you answer. I'll try to make it clearer because that is not what I'm trying to achieve.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We maintain our own Alfresco code repository so that we can apply patches to the official code. We use git for our repo an a "Vendor Branch" strategy for this in case you are curious about it: &lt;/SPAN&gt;&lt;A href="http://happygiraffe.net/blog/2008/02/07/vendor-branches-in-git/" rel="nofollow noopener noreferrer"&gt;http://happygiraffe.net/blog/2008/02/07/vendor-branches-in-git/&lt;/A&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We do this when we discover a bug and we patch it or backport the solution from a newer community version to an older one. Of course if we are the ones that find the error and the possible patch we also report it in issues.alfresco.com but we backport it in our code repository.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So we have our own alfresco.war and share.war and I want to use them, not the vanilla alfresco WARs. I suspect that might be something trivial but I'm still a newbie with Maven and the new SDK and I don't manage to figure it out how to do it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've installed my own Nexus repository and even tried mangling the routes to overlay Alfresco's official artifacts with my own but it really seems a very unclean and awful idea to do so.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Mar 2015 09:03:02 GMT</pubDate>
    <dc:creator>iblanco</dc:creator>
    <dc:date>2015-03-27T09:03:02Z</dc:date>
    <item>
      <title>How to use custom WAR with Maven SDK 2.0</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-use-custom-war-with-maven-sdk-2-0/m-p/303722#M256852</link>
      <description>Hello everyone,I'm investing some time in reading and making some tests with the newish development approach introduced with Maven SDK 2.0.I have created a new customization project using the all-in-one archetype and it works ok but I can't figure out how to use my own Alfresco 5.0.c WAR file instea</description>
      <pubDate>Mon, 23 Mar 2015 13:09:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-use-custom-war-with-maven-sdk-2-0/m-p/303722#M256852</guid>
      <dc:creator>iblanco</dc:creator>
      <dc:date>2015-03-23T13:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom WAR with Maven SDK 2.0</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-use-custom-war-with-maven-sdk-2-0/m-p/303723#M256853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure I understand the question completely, but anyway, when you run the build as follows for example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;$ mvn install -Prun&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This will build a custom alfresco.war including any AMPs that your repo/pom.xml brings in, from the logs:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt; Assembling webapp [repo] in [/home/martin/src/alfresco-sdk-temp/all-in-one-test/repo/target/repo]&lt;BR /&gt;[INFO] Processing war project&lt;BR /&gt;[INFO] Processing overlay [ id org.alfresco:alfresco]&lt;BR /&gt;[INFO] Processing overlay [ id org.alfresco:repo-amp]&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And this custom alfresco.war will be deployed by the embedded Tomcat instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Let me know if this helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 15:49:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-use-custom-war-with-maven-sdk-2-0/m-p/303723#M256853</guid>
      <dc:creator>gravitonian</dc:creator>
      <dc:date>2015-03-24T15:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom WAR with Maven SDK 2.0</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-use-custom-war-with-maven-sdk-2-0/m-p/303724#M256854</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Martin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;First of all thanks for you answer. I'll try to make it clearer because that is not what I'm trying to achieve.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We maintain our own Alfresco code repository so that we can apply patches to the official code. We use git for our repo an a "Vendor Branch" strategy for this in case you are curious about it: &lt;/SPAN&gt;&lt;A href="http://happygiraffe.net/blog/2008/02/07/vendor-branches-in-git/" rel="nofollow noopener noreferrer"&gt;http://happygiraffe.net/blog/2008/02/07/vendor-branches-in-git/&lt;/A&gt;&lt;SPAN&gt;. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We do this when we discover a bug and we patch it or backport the solution from a newer community version to an older one. Of course if we are the ones that find the error and the possible patch we also report it in issues.alfresco.com but we backport it in our code repository.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So we have our own alfresco.war and share.war and I want to use them, not the vanilla alfresco WARs. I suspect that might be something trivial but I'm still a newbie with Maven and the new SDK and I don't manage to figure it out how to do it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've installed my own Nexus repository and even tried mangling the routes to overlay Alfresco's official artifacts with my own but it really seems a very unclean and awful idea to do so.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Mar 2015 09:03:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-use-custom-war-with-maven-sdk-2-0/m-p/303724#M256854</guid>
      <dc:creator>iblanco</dc:creator>
      <dc:date>2015-03-27T09:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom WAR with Maven SDK 2.0</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-use-custom-war-with-maven-sdk-2-0/m-p/303725#M256855</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I see what you mean now. What you need is probably to setup your internal (on premise) Nexus server as a mirror for external repositories. You can configure Maven to use a mirror for Maven central repository, Alfresco Nexus etc. And this will redirect all requests that would normally go to these repos to your internal repository.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In your settings.xml you would add something like the following to set your internal repository as as mirror for external repositories:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;mirrors&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;mirror&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;id&amp;gt;mycompany-nexus&amp;lt;/id&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;name&amp;gt;My companies mirror of external repos&amp;lt;/name&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;url&amp;gt;&lt;A href="http://path/to/my/repository" rel="nofollow noopener noreferrer"&gt;http://path/to/my/repository&lt;/A&gt;&amp;lt;/url&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mirrorOf&amp;gt;*&amp;lt;/mirrorOf&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/mirror&amp;gt;&lt;BR /&gt;&amp;lt;/mirrors&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can then setup your internal Nexus repository as a proxy repository for Maven central, Alfresco Nexus etc. So any requests for artifacts not yet in your internal repo would first go to these repos, and subsequent requests are fetched from the internal repository. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Another way is if you are using Maven's release plugin you have the opportunity to use any tagging naming convention you like. So everytime you do mvn prepare and release you could tag the release in such a way so it would not clash with Alfresco's version numbers. Such as for example (in top pom):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;plugin&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;artifactId&amp;gt;maven-release-plugin&amp;lt;/artifactId&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;version&amp;gt;2.5.1&amp;lt;/version&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;configuration&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;tagNameFormat&amp;gt;@{project.version}-mycompany&amp;lt;/tagNameFormat&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/configuration&amp;gt;&lt;BR /&gt;&amp;lt;/plugin&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then specify Alfresco version to bring in as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;alfresco.version&amp;gt;5.0.d-mycompany&amp;lt;/alfresco.version&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You would then not have to use the mirroring stuff above.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Mar 2015 08:23:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-use-custom-war-with-maven-sdk-2-0/m-p/303725#M256855</guid>
      <dc:creator>gravitonian</dc:creator>
      <dc:date>2015-03-30T08:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom WAR with Maven SDK 2.0</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-use-custom-war-with-maven-sdk-2-0/m-p/303726#M256856</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Martin, I already have my own Nexus repo up and running but the idea of "shadowing" official packages make me feel uncomfortable so I'll try to work on your second idea and try to publish my own alfresco artifacts with a differente version name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Mar 2015 13:59:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-use-custom-war-with-maven-sdk-2-0/m-p/303726#M256856</guid>
      <dc:creator>iblanco</dc:creator>
      <dc:date>2015-03-31T13:59:41Z</dc:date>
    </item>
  </channel>
</rss>

