Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation of required maven structure #49

Open
brennhill opened this issue Sep 19, 2016 · 4 comments
Open

Documentation of required maven structure #49

brennhill opened this issue Sep 19, 2016 · 4 comments

Comments

@brennhill
Copy link

brennhill commented Sep 19, 2016

There seems to be some dependency on how your maven project is setup. E.g. if you have a backend module and FE module, in which module should you declare the plugin and dependencies?

I'll happily update the docs but I haven't been able to figure this out.

@brennhill brennhill changed the title Documentation Documentation of required maven structure Sep 19, 2016
@pmichelotti
Copy link
Collaborator

Hi @brennhill - thanks for the feedback and sorry for the extremely delayed response. http://code.digitalatolson.com/cq-component-maven-plugin/configuration.html calls out the configuration needed and http://code.digitalatolson.com/cq-component-maven-plugin/usage.html speaks to the phase where it needs to be executed. Given that it is intended to modify the package that is to be deployed it needs to be run somewhere after that package has been created but before it has been deployed. We typically run it in the front end / ui module in a typical multi module setup.

Is there any particular update you would suggest to the documentation that would help clarify this?

@Pushparajan
Copy link

May be this is trivial, I have a AEM project with Archetype 10. I have updated the top level pom with the configurations mentioned.

jcr_root/apps/aempackage/components
content
Client Group
camel-case
true

I get the following exception,

com.citytechinc.cq.component.dialog.exception.OutputFailureException: Archive file does not exist
at com.citytechinc.cq.component.maven.util.ComponentMojoUtil.buildArchiveFileForProjectAndClassList(ComponentMojoUtil.java:207)
at com.citytechinc.cq.component.maven.ComponentMojo.execute(ComponentMojo.java:126)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)

Can you please clarify the right path

Thanks
Pushparajan

@schananas
Copy link

schananas commented May 30, 2017

@Pushparajan hi, I had same problem and lots of problem to figure out whats wrong.

This is how plugin work: after maven-packutil-plugin creates zip crx package, before its deployed, this plugin unpacks it and add dialog xml files, and zip it again.

"Archive file does not exist" occurs when this zip crx package is not found.

  1. Check the target folder in the project where u defined plugin to see if actual zip is generated or not
  2. If file is there but u still get error message its because this plugin has "bug", its searching for this zip taking and parametars from pom.xml and forms the name eg: content-1.1-SNAPSHOT.zip, but in some cases (like mine), there is and its diffrent from , in my case it was nameOfApp-content-1.1-SNAPSHOT.zip, and this plugin is still searching for content-1.1-SNAPSHOT.zip, it can't be found so it throws an error...

Solution is simple, just rename final name in the pom.xml

@Pushparajan
Copy link

Thanks,@stefanvozd I did figure that. I have started changing a bit, not to read or write to archive but to generate to project folders. additionally, I have added code to generate an htl page

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants