Closed GoogleCodeExporter closed 9 years ago
I don't think I'm getting your point: what do you mean with the "JAR generated
for my
AMP file"?
Anyway, as per Maven default, src/main/resources is for classpath elements, so
that
META-INF dir should be put somewhere else.
Original comment by carlo.sciolla
on 27 Feb 2010 at 8:03
I have a similar issue, how can I include faces configuration file in my AMP? I
have
tried putting it in main/webapp/WEB-INF but it didn't work. So instead I am
using
custom file mapping properties file but since there is no support for it in the
plugin I have to add that mapping file each time I build AMP file...not very
convenient.
Will the patch adding support for the file mappings be accepted anytime soon?
http://groups.google.com/group/maven-alfresco/browse_thread/thread/b98df2c649a3d
ed7?pli=1
Thanks!
Original comment by karo...@gmail.com
on 10 Mar 2010 at 4:58
I think I'm seeing what bulat.yaminov is referring to. If you end up with a
META-INF/
in target/classes, the contents of this directory get put in the
target/<amp_name>/lib/<amp_name>.jar file and in target/<amp_name>/config
which gets included in the amp.
Since the jar file, config, and web all get processed out of target/classes, I
could not
get my META-INF/** to _only_ go in the jar file and not get duplicated
elsewhere (in
my case it's getting web-client-config-custom.xml in META-INF in the jar for a
data
model extension).
Original comment by fletcher...@gmail.com
on 10 Mar 2010 at 8:57
Yes, that's it. I could not get my src/main/resources/* to _only_ go in the jar
file
and not in target/<amp_name>/config
Original comment by dupont.n...@gmail.com
on 1 Apr 2010 at 12:02
I don't think META-INF should be put somewhere else, look at
http://maven.apache.org/guides/getting-started/index.html#How_do_I_add_resources
_to_my_JAR
I suggest the following patch to fix this : JAR will only include classes and
META-INF (or alternatively, it should include everything but alfresco/**, **
because of module, extension...) and src/main/resources/META-INF will not go in
target/<amp_name>/config
Line numbers may not match, as I've already applied a patch on my working copy.
Original comment by dupont.n...@gmail.com
on 5 Aug 2010 at 3:51
Attachments:
[deleted comment]
[deleted comment]
Actually, I think that src/main/resources should only be used for JAR
generation because other resources can already be put in mAmpResources (see
issue 23).
This could be done by removing mAmpConfigDirectory from AbstractAmpMojo and so
on and then we would not need to patch the mAmpJarIncludes initialization.
Warning, this would impact users that expect resources to be put in AMP/config,
they would have to use mAmpResources instead :
<mAmpResources>
<resource>
<directory>src/main/ampResources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/config</directory> <!-- I'd suggest src/main/module instead -->
<targetPath>config/alfresco/module/${alfresco.module.id}</targetPath>
<filtering>true</filtering>
</resource>
</mAmpResources>
Original comment by dupont.n...@gmail.com
on 16 Sep 2010 at 9:16
Scheduling for 4x, can we make a decision here?
Original comment by colum...@gmail.com
on 15 Nov 2011 at 5:19
Ok guys, I'm having a look at this one.
Now there are a few issues with the current config, not just the META-INF:
1. CORRECT: src/main/config gets mapped to
AMP/config/alfresco/module/<artifactId>
2. WRONG: src/main/resources gets mapped BOTH to AMP/config and in the root of
the JAR in /lib
3. WRONG: src/main/resources/META-INF does not get mapped anywhere
What I suggest we need 3 different places, as dupont.nicolas suggests:
- Keeping #1 as it is
- META-INF that goes in the JAR in AMP/lib/
- define a resource folder that ONLY gets added to /config (so to add
alfresco/extension, alfresco/web-extension
Working to fix it this for the 3.9.1 release (maintenance before doing the HARD
fixes).
As a side note, the maven-amp-plugin is definitely overkill for what it needs
to do...I think we'll need to really clean it up, since it's a bare copy of (an
old version of) the maven-war-plugin and it's mostly unreadable / unusable
Original comment by colum...@gmail.com
on 6 Apr 2012 at 5:03
Applied
http://code.google.com/p/maven-alfresco-archetypes/issues/detail?id=19#c3 patch
at r390.
Will be released with version 3.9.1 of the archetypes and version 3.0.4 of
maven-amp-plugin.
Original comment by colum...@gmail.com
on 6 Apr 2012 at 5:55
Original comment by mauri...@session.it
on 6 Apr 2012 at 6:26
Original issue reported on code.google.com by
bulat.ya...@gmail.com
on 12 Feb 2009 at 11:31