Maven Alfresco Updates

447 views
Skip to first unread message

Gabriele Columbro

unread,
May 2, 2012, 7:54:47 AM5/2/12
to maven-a...@googlegroups.com
Hey guys,

as you might have noticed there is a lot of momentum around Alfresco and Maven lately so I figured I could post a little status update on my blog:

http://mindthegab.com/2012/05/02/whats-going-on-with-maven-and-alfresco-wip/

More specifically for what concerns this list, I wanted to give you a couple of heads up:

1. Feedback is welcome on the work we are doing (again HUGE KUDOS to Mao for the implementation) on the experimental branch http://maven-alfresco-archetypes.googlecode.com/svn/branches/experimental/alfresco-lifecycle-aggregator/. There are a lot of goodies in there and if you check the README.txt, DOCS.txt and TODO.txt in there you'll discover we are pretty much ready to bring that back to trunk. Feedback is obviously MORE THAN WELCOME on this. If anyone has any feature from the current 3.9.1 version that we should port there, please shout now.

2. With ALF-11027 we are automating deployments of Community / Enterprise artifacts. Since we are doing test deployments and I want to start from clean repository situation some changes might be undergoing on the repos in the next days. While all functionalities should be retained (thanks to Nexus groups, so make sure you're pointing to those) we are planning to do the following renames:

maven.alfresco.com/nexus/content/repositories/releases/ --> maven.alfresco.com/nexus/content/repositories/releases.deprecated/
maven.alfresco.com/nexus/content/repositories/snapshots/ --> maven.alfresco.com/nexus/content/repositories/snaphots.deprecated/

and create 2 clean releases and snapshots repositories. As I said, nothing should change as both the new ones and the .deprecated one will still be aggregated in the http://maven.alfresco.com/nexus/content/groups/public/ and http://maven.alfresco.com/nexus/content/groups/public-snapshots/ groups respectively, but just wanted to let you know.


3. The automated deployment procedure removes the classifier based distinction between community and enterprise. I'm using different groupId to express that. While the experimental branch already uses this pattern, you need to tweak your 3.9.1 archetype generated projects to work with that procedure.


I really hope this is exciting news for you and you thrilled like we are, since it's been a long awaited moment :)

Ciao!

Gab

--
Gabriele Columbro
ECM Architect and Open Source Enthusiast
colu...@gmail.com
twitter: @mindthegabz

I am raising money for Save the Children by walking up Mount Toubkal in Morocco. To support me and find out more visit my JustGiving site (http://www.justgiving.com/mindthegab-toubkal-alfresco-2011/)




Gethin

unread,
May 2, 2012, 8:32:46 AM5/2/12
to Maven Alfresco Lifecycle Discussion Group
Great work.

There's also easy access to the source code and javadoc because they
are being deployed to the maven repo too.

On May 2, 12:54 pm, Gabriele Columbro <gabriele.colum...@alfresco.com>
wrote:
> Hey guys,
>
> as you might have noticed there is a lot of momentum around Alfresco and Maven lately so I figured I could post a little status update on my blog:
>
> http://mindthegab.com/2012/05/02/whats-going-on-with-maven-and-alfres...
>
> More specifically for what concerns this list, I wanted to give you a couple of heads up:
>
> 1. Feedback is welcome on the work we are doing (again HUGE KUDOS to Mao for the implementation) on the experimental branchhttp://maven-alfresco-archetypes.googlecode.com/svn/branches/experime.... There are a lot of goodies in there and if you check the README.txt,  DOCS.txt and TODO.txt in there you'll discover we are pretty much ready to bring that back to trunk. Feedback is obviously MORE THAN WELCOME on this. If anyone has any feature from the current 3.9.1 version that we should port there, please shout now.
>
> 2. With ALF-11027 we are automating deployments of Community / Enterprise artifacts. Since we are doing test deployments and I want to start from clean repository situation some changes might be undergoing on the repos in the next days. While all functionalities should be retained (thanks to Nexus groups, so make sure you're pointing to those) we are planning to do the following renames:
>
>      maven.alfresco.com/nexus/content/repositories/releases/  --> maven.alfresco.com/nexus/content/repositories/releases.deprecated/
>      maven.alfresco.com/nexus/content/repositories/snapshots/ --> maven.alfresco.com/nexus/content/repositories/snaphots.deprecated/
>
> and create 2 clean releases and snapshots repositories. As I said, nothing should change as both the new ones and the .deprecated one will still be aggregated in thehttp://maven.alfresco.com/nexus/content/groups/public/andhttp://maven.alfresco.com/nexus/content/groups/public-snapshots/groups respectively, but just wanted to let you know.
>
> 3. The automated deployment procedure removes the classifier based distinction between community and enterprise. I'm using different groupId to express that. While the experimental branch already uses this pattern, you need to tweak your 3.9.1 archetype generated projects to work with that procedure.
>
> I really hope this is exciting news for you and you thrilled like we are, since it's been a long awaited moment :)
>
> Ciao!
>
> Gab
>
> --
> Gabriele Columbro
> ECM Architect and Open Source Enthusiast
> colum...@gmail.com

Chris Hubick

unread,
May 3, 2012, 3:03:48 PM5/3/12
to maven-a...@googlegroups.com
On Wednesday, May 2, 2012 5:54:47 AM UTC-6, Gabriele Columbro wrote:
1. Feedback is welcome on the work we are doing (again HUGE KUDOS to Mao for the implementation) on the experimental branch http://maven-alfresco-archetypes.googlecode.com/svn/branches/experimental/alfresco-lifecycle-aggregator/. There are a lot of goodies in there and if you check the README.txt,  DOCS.txt and TODO.txt in there you'll discover we are pretty much ready to bring that back to trunk. Feedback is obviously MORE THAN WELCOME on this.

- README.txt "Build and Run" says "cd alfresco-lifecycle-aggregator/mmt-maven-plugin" instead of "cd alfresco-lifecycle-aggregator/plugins/mmt-maven-plugin".

- alfresco-platform-parent pom.xml makes reference to a bunch of undefined properties like ${alfresco.version}.  I tried to hack around this by copying the definitions from alfresco-integration-parent.

- alfresco-patform-parent pom.xml has <groupId>org.alfresco.enterprise</groupId> and <version>4.0.1</version>, yet alfresco-integration-parent defines <alfresco.version>4.0.b</alfresco.version> and <alfresco.edition>community</alfresco.edition>.  Will this mismatch not cause problems?  I was expecting to find a pom.xml somewhere, similar to alfresco-patform-parent, but with <groupId>org.alfresco.community</groupId>.  It is unclear to me from viewing the code exactly how this switching will be implemented.

- alfresco-integration-parent pom.xml defines a project <version>4.0.b</version> and then a duplicate value in the <alfresco.version>4.0.b</alfresco.version> property - why not just default to <alfresco.version>${project.version}</alfresco.version>?

- alfresco-developer-parent pom.xml defines a profile for mmt-maven-plugin with <goal>add-resources</goal>, but mvn says "[ERROR] Could not find goal 'add-resources' in plugin org.alfresco.maven.plugin:mmt-maven-plugin:1.0-SNAPSHOT among available goals install, amp".  I tried hacking around this by commenting out that profile.

Then:

[quickstart-amp-archetype]$ mvn install
...
[ERROR] Failed to execute goal on project quickstart-amp-archetype: Could not resolve dependencies for project com.mycompany:quickstart-amp-archetype:amp:1.0-SNAPSHOT: Failed to collect dependencies for [org.alfresco.enterprise:alfresco-repository:jar:1.0-SNAPSHOT (provided), org.springframework:spring-core:jar:3.0.5.RELEASE (provided), org.springframework:spring-beans:jar:3.0.5.RELEASE (provided)]: Failed to read artifact descriptor for org.alfresco.enterprise:alfresco-repository:jar:1.0-SNAPSHOT: Could not transfer artifact org.alfresco.enterprise:alfresco-repository:pom:1.0-SNAPSHOT from/to alfresco-enterprise-releases (http://maven.alfresco.com/nexus/content/repositories/enterprise-releases): Not authorized, ReasonPhrase:Unauthorized. -> [Help 1]

Which I'm guessing means the actual Alfresco Maven artifacts aren't published in the repo yet.

... at which point I gave up for now ;)


If anyone has any feature from the current 3.9.1 version that we should port there, please shout now.

I haven't had time to try upgrading from maven-amp-plugin 3.0.3.  Is there now a working facility for having code from one AMP build against shared base-class beans/code from within another AMP?  You had mentioned a method of using "attachments" and "classifiers" within another thread, but that was reported to not work?


2. With ALF-11027 we are automating deployments of Community / Enterprise artifacts.

I don't see a http://maven.alfresco.com/nexus/content/repositories/releases/org/alfresco/alfresco-core/4.0.b-mvn-r35250/alfresco-core-4.0.b-mvn-r35250-sources.jar - are source and javadoc jars being published with the artifacts, or should I update my script to extract those from the associated SDK and upload them to an internal repo? :(  One of the primary reasons I like Maven is the ability to setup source attachments for use in a debugger.


Much Thanks!

Maurizio Pillitu

unread,
May 3, 2012, 4:54:23 PM5/3/12
to maven-a...@googlegroups.com
Hi Chris,
thanks a lot for this very detailed email, and sorry for the inconveniences during your tests; as you pointed out, there are still some dependencies missing and some ongoing deployment procedures that are populating our internal repos; my answers interleaved:

On Thu, May 3, 2012 at 9:03 PM, Chris Hubick <ch...@hubick.com> wrote:
On Wednesday, May 2, 2012 5:54:47 AM UTC-6, Gabriele Columbro wrote:
1. Feedback is welcome on the work we are doing (again HUGE KUDOS to Mao for the implementation) on the experimental branch http://maven-alfresco-archetypes.googlecode.com/svn/branches/experimental/alfresco-lifecycle-aggregator/. There are a lot of goodies in there and if you check the README.txt,  DOCS.txt and TODO.txt in there you'll discover we are pretty much ready to bring that back to trunk. Feedback is obviously MORE THAN WELCOME on this.

- README.txt "Build and Run" says "cd alfresco-lifecycle-aggregator/mmt-maven-plugin" instead of "cd alfresco-lifecycle-aggregator/plugins/mmt-maven-plugin".

Fixed, thanks. the idea is that mmt-maven-plugin will be maintained by Alfresco, therefore it will be only used by the community as soon as first version will be deployed on maven.alfresco.com
 
- alfresco-platform-parent pom.xml makes reference to a bunch of undefined properties like ${alfresco.version}.  I tried to hack around this by copying the definitions from alfresco-integration-parent.

Wow, missed a commit, (very) silly me. Was still working on my local environment, since I'm installing deps locally. Fixed, thanks for pointing out!
 
- alfresco-patform-parent pom.xml has <groupId>org.alfresco.enterprise</groupId> and <version>4.0.1</version>, yet alfresco-integration-parent defines <alfresco.version>4.0.b</alfresco.version> and <alfresco.edition>community</alfresco.edition>.  Will this mismatch not cause problems?  I was expecting to find a pom.xml somewhere, similar to alfresco-patform-parent, but with <groupId>org.alfresco.community</groupId>.  It is unclear to me from viewing the code exactly how this switching will be implemented.

There will be one alfresco-platform-parent for each Alfresco release (and snapshot release, both community and enterprise), automatically generated and deployed into maven.alfresco.com; this means that the alfresco-platform-parent we use in the branch is just an example of an Alfresco version/edition that is already deployed into the Maven repo. Sorry for the confusion, I should report this info into the README

If you just want to try it, look in maven.alfresco.com for available versions/editions and define the pom properties accordingly.
 

- alfresco-integration-parent pom.xml defines a project <version>4.0.b</version> and then a duplicate value in the <alfresco.version>4.0.b</alfresco.version> property - why not just default to <alfresco.version>${project.version}</alfresco.version>?

If you define <alfresco.version> as ${project.version} in alfresco-plaform-parent (instead of explicitly setting its value, ie <alfresco.version>4.0.1</...>), when you develop your own module against it (say my.company:my-amp:1.0-SNAPSHOT), alfresco.version will be resolved as 1.0-SNAPSHOT; this is why the property needs to be set explicitly.
 

- alfresco-developer-parent pom.xml defines a profile for mmt-maven-plugin with <goal>add-resources</goal>, but mvn says "[ERROR] Could not find goal 'add-resources' in plugin org.alfresco.maven.plugin:mmt-maven-plugin:1.0-SNAPSHOT among available goals install, amp".  I tried hacking around this by commenting out that profile.

This is strange; are you using Maven 3.0.3 ? the mmt-maven-plugin builds successfully? Please try to rm -Rf ~/.m2/org/alfresco/maven/plugin and then rebuild again, the goal should be working.
 
Then:

[quickstart-amp-archetype]$ mvn install
...
[ERROR] Failed to execute goal on project quickstart-amp-archetype: Could not resolve dependencies for project com.mycompany:quickstart-amp-archetype:amp:1.0-SNAPSHOT: Failed to collect dependencies for [org.alfresco.enterprise:alfresco-repository:jar:1.0-SNAPSHOT (provided), org.springframework:spring-core:jar:3.0.5.RELEASE (provided), org.springframework:spring-beans:jar:3.0.5.RELEASE (provided)]: Failed to read artifact descriptor for org.alfresco.enterprise:alfresco-repository:jar:1.0-SNAPSHOT: Could not transfer artifact org.alfresco.enterprise:alfresco-repository:pom:1.0-SNAPSHOT from/to alfresco-enterprise-releases (http://maven.alfresco.com/nexus/content/repositories/enterprise-releases): Not authorized, ReasonPhrase:Unauthorized. -> [Help 1]

Which I'm guessing means the actual Alfresco Maven artifacts aren't published in the repo yet.

Correct, we're testing against internal-only Alfresco Enterprise versions, since the release process still needs some tweaking and optimisations before we open it to the public.


... at which point I gave up for now ;)

Again, thanks a lot for the effort!
 
I haven't had time to try upgrading from maven-amp-plugin 3.0.3.  Is there now a working facility for having code from one AMP build against shared base-class beans/code from within another AMP?  You had mentioned a method of using "attachments" and "classifiers" within another thread, but that was reported to not work?

Is there an issue about this feature? I can try to build it on top of the new POM structures, but I need to understand the use case first. Thanks!
AFAICS there is yet no such a feature on the amp-plugin, but I might be wrong... @Gab?
 

I don't see a http://maven.alfresco.com/nexus/content/repositories/releases/org/alfresco/alfresco-core/4.0.b-mvn-r35250/alfresco-core-4.0.b-mvn-r35250-sources.jar - are source and javadoc jars being published with the artifacts, or should I update my script to extract those from the associated SDK and upload them to an internal repo? :(  One of the primary reasons I like Maven is the ability to setup source attachments for use in a debugger.

Javadocs and sources are on their way; at the moment the only sources and javadoc available are internal-only and based on 4.0.1 enterprise, but - as anticipated before - we need to ask you a little bit more of patience before releasing all features across all versions/editions.

Feel free to join us on Skype chat room (just ping m.pillitu) if you'd like to discuss more extensively about these topics; I'm also working on documentation and I'd love to hear your opinion about it; any advise is more than welcome (on syntax, structure and more); layout is still TXT until we'll contribute it to the Alfresco Wiki/Docs site.

Thanks!
  mau

Gabriele Columbro

unread,
May 4, 2012, 4:49:14 AM5/4/12
to maven-a...@googlegroups.com, maven-a...@googlegroups.com
Hey guys,

My comments interleaved:

On 3 mei 2012, at 22:54, Maurizio Pillitu <maur...@session.it> wrote:

Hi Chris,
thanks a lot for this very detailed email, and sorry for the inconveniences during your tests; as you pointed out, there are still some dependencies missing and some ongoing deployment procedures that are populating our internal repos; my answers interleaved:

On Thu, May 3, 2012 at 9:03 PM, Chris Hubick <ch...@hubick.com> wrote:
On Wednesday, May 2, 2012 5:54:47 AM UTC-6, Gabriele Columbro wrote:
1. Feedback is welcome on the work we are doing (again HUGE KUDOS to Mao for the implementation) on the experimental branch http://maven-alfresco-archetypes.googlecode.com/svn/branches/experimental/alfresco-lifecycle-aggregator/. There are a lot of goodies in there and if you check the README.txt,  DOCS.txt and TODO.txt in there you'll discover we are pretty much ready to bring that back to trunk. Feedback is obviously MORE THAN WELCOME on this.

- README.txt "Build and Run" says "cd alfresco-lifecycle-aggregator/mmt-maven-plugin" instead of "cd alfresco-lifecycle-aggregator/plugins/mmt-maven-plugin".

Fixed, thanks. the idea is that mmt-maven-plugin will be maintained by Alfresco, therefore it will be only used by the community as soon as first version will be deployed on maven.alfresco.com
 
- alfresco-platform-parent pom.xml makes reference to a bunch of undefined properties like ${alfresco.version}.  I tried to hack around this by copying the definitions from alfresco-integration-parent.

Wow, missed a commit, (very) silly me. Was still working on my local environment, since I'm installing deps locally. Fixed, thanks for pointing out!
 
- alfresco-patform-parent pom.xml has <groupId>org.alfresco.enterprise</groupId> and <version>4.0.1</version>, yet alfresco-integration-parent defines <alfresco.version>4.0.b</alfresco.version> and <alfresco.edition>community</alfresco.edition>.  Will this mismatch not cause problems?  I was expecting to find a pom.xml somewhere, similar to alfresco-patform-parent, but with <groupId>org.alfresco.community</groupId>.  It is unclear to me from viewing the code exactly how this switching will be implemented.

There will be one alfresco-platform-parent for each Alfresco release (and snapshot release, both community and enterprise), automatically generated and deployed into maven.alfresco.com; this means that the alfresco-platform-parent we use in the branch is just an example of an Alfresco version/edition that is already deployed into the Maven repo. Sorry for the confusion, I should report this info into the README

This is still under discussion so please handle with care :)


If you just want to try it, look in maven.alfresco.com for available versions/editions and define the pom properties 
- alfresco-integration-parent pom.xml defines a project <version>4.0.b</version> and then a duplicate value in the <alfresco.version>4.0.b</alfresco.version> property - why not just default to <alfresco.version>${project.version}</alfresco.version>?

If you define <alfresco.version> as ${project.version} in alfresco-plaform-parent (instead of explicitly setting its value, ie <alfresco.version>4.0.1</...>), when you develop your own module against it (say my.company:my-amp:1.0-SNAPSHOT), alfresco.version will be resolved as 1.0-SNAPSHOT; this is why the property needs to be set explicitly.
 

- alfresco-developer-parent pom.xml defines a profile for mmt-maven-plugin with <goal>add-resources</goal>, but mvn says "[ERROR] Could not find goal 'add-resources' in plugin org.alfresco.maven.plugin:mmt-maven-plugin:1.0-SNAPSHOT among available goals install, amp".  I tried hacking around this by commenting out that profile.

This is strange; are you using Maven 3.0.3 ? the mmt-maven-plugin builds successfully? Please try to rm -Rf ~/.m2/org/alfresco/maven/plugin and then rebuild again, the goal should be working.
 
Then:

[quickstart-amp-archetype]$ mvn install
...
[ERROR] Failed to execute goal on project quickstart-amp-archetype: Could not resolve dependencies for project com.mycompany:quickstart-amp-archetype:amp:1.0-SNAPSHOT: Failed to collect dependencies for [org.alfresco.enterprise:alfresco-repository:jar:1.0-SNAPSHOT (provided), org.springframework:spring-core:jar:3.0.5.RELEASE (provided), org.springframework:spring-beans:jar:3.0.5.RELEASE (provided)]: Failed to read artifact descriptor for org.alfresco.enterprise:alfresco-repository:jar:1.0-SNAPSHOT: Could not transfer artifact org.alfresco.enterprise:alfresco-repository:pom:1.0-SNAPSHOT from/to alfresco-enterprise-releases (http://maven.alfresco.com/nexus/content/repositories/enterprise-releases): Not authorized, ReasonPhrase:Unauthorized. -> [Help 1]

Which I'm guessing means the actual Alfresco Maven artifacts aren't published in the repo yet.

Correct, we're testing against internal-only Alfresco Enterprise versions, since the release process still needs some tweaking and optimisations before we open it to the public.


... at which point I gave up for now ;)

Again, thanks a lot for the effort!
 
I haven't had time to try upgrading from maven-amp-plugin 3.0.3.  Is there now a working facility for having code from one AMP build against shared base-class beans/code from within another AMP?  You had mentioned a method of using "attachments" and "classifiers" within another thread, but that was reported to not work?

Is there an issue about this feature? I can try to build it on top of the new POM structures, but I need to understand the use case first. Thanks!
AFAICS there is yet no such a feature on the amp-plugin, but I might be wrong... @Gab

I always used this approach successfully:

1. The depended AMP gets installed together with the -classes.jar artifact if you configure the maven-amp-plugin to attachClasses (http://maven.apache.org/plugins/maven-war-plugin/faq.html#attached)

2. The dependent AMP uses the classifier "classes" to reference the attached aforementioned JAR

Please open an issue if this does not work,

 

I don't see a http://maven.alfresco.com/nexus/content/repositories/releases/org/alfresco/alfresco-core/4.0.b-mvn-r35250/alfresco-core-4.0.b-mvn-r35250-sources.jar - are source and javadoc jars being published with the artifacts, or should I update my script to extract those from the associated SDK and upload them to an internal repo? :(  One of the primary reasons I like Maven is the ability to setup source attachments for use in a debugger.

Javadocs and sources are on their way; at the moment the only sources and javadoc available are internal-only and based on 4.0.1 enterprise, but - as anticipated before - we need to ask you a little bit more of patience before releasing all features across all versions/

Sources and Javadocs will be out for every version we release, can't wait to have automatic docs and sources attached :)


Feel free to join us on Skype chat room (just ping m.pillitu) if you'd like to discuss more extensively about these topics; I'm also working on documentation and I'd love to hear your opinion about it; any advise is more than welcome (on syntax, structure and more); layout is still TXT until we'll contribute it to the Alfresco Wiki/Docs site.

I'd suggest to avoid private 1-1 conversations on Skype while we have a Public chat called "Public Maven Alfresco Lifecycle Chat": ping us and we'll add you there...

Ciao!

Gab


Thanks!
  mau

--
You received this message because you are subscribed to the Google Groups "Maven Alfresco Lifecycle Discussion Group" group.
To post to this group, send email to maven-a...@googlegroups.com.
To unsubscribe from this group, send email to maven-alfresc...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maven-alfresco?hl=en.

Chris Hubick

unread,
May 8, 2012, 6:40:30 PM5/8/12
to maven-a...@googlegroups.com
The pom.xml for mmt-maven-plugin says:

        <!-- Not in Maven Central! You need to
        mvn install:install-file \
        -Dfile=truezip.jar \
        -DgroupId=de.schlichtherle.truezip \
        -DartifactId=truezip \
        -Dversion=5.1.2 \
        -Dpackaging=jar
        -->

But since I already have that artifact in my local repository, cached via our internal corporate intranet repository, Maven 3.0.4 refuses to resolve it while building the plugin, as it's not available from the "alfresco-public" repository named by the mmt-maven-plugin pom.xml.  This is due to the change in behaviour in Maven 3:

https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html#Maven3.xCompatibilityNotes-ResolutionfromLocalRepository
http://jira.codehaus.org/browse/MNG-5181

It would be handy if someone could get that truezip artifact uploaded under http://maven.alfresco.com/nexus/content/groups/public/de/schlichtherle/truezip/truezip/5.1.2/ ?

Thanks.

Carlo Sciolla

unread,
May 8, 2012, 7:20:21 PM5/8/12
to maven-a...@googlegroups.com
2012/5/9 Chris Hubick <ch...@hubick.com>

It would be handy if someone could get that truezip artifact uploaded under http://maven.alfresco.com/nexus/content/groups/public/de/schlichtherle/truezip/truezip/5.1.2/ ?
I didn't know that the version of truezip was 5.1.2, the way I solved this issue was to create a maven repo structure in src/main/lib and specify file://${project.baseDir}/src/main/lib as a repository in the POM.

AFAICS truezip is released under the eclipse license, so that no major distribution issues should arise. Would this strategy be an option for the mmt-maven-plugin?

My 2c,
c.


--
Carlo Sciolla

--==(A)==--
Linux User #372086
My personal blog: http://www.skuro.tk
Follow me on twitter: http://twitter.com/skuro
Fork me on Github: http://github.com/skuro
My LinkedIn profile: http://nl.linkedin.com/in/carlosciolla
--==(A)==--

Product Lead at Backbase - Next Generation Portal Software for Financials & Large Enterprises (http://www.backbase.com)

Gabriele Columbro

unread,
May 9, 2012, 3:01:53 AM5/9/12
to maven-a...@googlegroups.com, maven-a...@googlegroups.com
I'm happy to deploy Truezip on maven.alfresco.com. I will just proceed with that if it's OK for you guys..

Ciao!

Gab

Gabriele Columbro
Principal Architect, Consulting Services
Alfresco Software ( http://www.alfresco.com )


stijnr

unread,
May 9, 2012, 6:55:32 AM5/9/12
to maven-a...@googlegroups.com
Hi Gabriele,

I was the one reporting that the attachClasses configuration didn't work, and it still doesn't for me.
I haven't had time to try upgrading from maven-amp-plugin 3.0.3.  Is there now a working facility for having code from one AMP build against shared base-class beans/code from within another AMP?  You had mentioned a method of using "attachments" and "classifiers" within another thread, but that was reported to not work?

Is there an issue about this feature? I can try to build it on top of the new POM structures, but I need to understand the use case first. Thanks!
AFAICS there is yet no such a feature on the amp-plugin, but I might be wrong... @Gab

I always used this approach successfully:

1. The depended AMP gets installed together with the -classes.jar artifact if you configure the maven-amp-plugin to attachClasses (http://maven.apache.org/plugins/maven-war-plugin/faq.html#attached)

2. The dependent AMP uses the classifier "classes" to reference the attached aforementioned JAR

Please open an issue if this does not work

I search the complete source code of the 3.0.4 version of the maven-amp-plugin, but I can't find any reference for the attachClasses parameter. I can only find archiveClasses, but that does something different.
This is a snippet of my configuration:
<plugin>
<groupId>org.alfresco.maven.plugin</groupId>
<artifactId>maven-amp-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<archive>
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
<archiveClasses>true</archiveClasses>
<attachClasses>true</attachClasses>


How would I configure the maven-amp-plugin to package the Java code in a classes artifact?

Regards, 

Stijn 
 
Reply all
Reply to author
Forward
0 new messages