Future of the NAR and ASP types

Developer
Apr 28, 2010 at 11:02 AM

There is a type declared called 'nar' and one called 'asp'. Both seem to be for build and packaging of web applications. (http://www.npanday.org/docs/1.2-SNAPSHOT/guide/maven/project-types.html)

These are the current lifecycles:

forType( ArtifactType.NAR ) {
	LifecycleMappingBuilder b->
	b.validate (default_validate)
	b.generate_sources (default_generate_sources)
	b.process_sources (default_process_sources)
	b.process_resources (default_process_resources)
	b.compile (np_compile)
	b.test_compile (np_test_compile)
	b.test (np_test)
	b.package ('npanday.plugin:maven-webapp-plugin:package')
	b.deploy ('npanday.plugin:maven-webapp-plugin:deploy')
}

forType( ArtifactType.ASP ) {
	LifecycleMappingBuilder b->
	b.validate (default_validate)
	b.generate_sources (default_generate_sources)
	b.process_sources (np_compile_process_sources, np_compile_process_test_sources, 'npanday.plugin:maven-aspx-plugin:copy-dependency')
	b.process_resources (default_process_resources)
	b.compile (np_compile, 'npanday.plugin:maven-aspx-plugin:compile')
	b.test_compile (np_test_compile)
	b.test (np_test)
	b.package ('npanday.plugin:maven-aspx-plugin:package')
	b.install ('npanday.plugin:maven-install-plugin:install')
	b.deploy (np_convert, 'npanday.plugin:maven-deploy-plugin:deploy')
}

What is the future for these? What do they do? Who is using them?

Developer
Apr 28, 2010 at 11:55 AM

I found some more details:

  • The 'asp' runs the maven-aspx-plugin which creates a *.zip, but the artifacthandler for 'asp' is configured with the extension dll. How can this possibly work?
  • 'nar' uses the webapp-plugin. I think it was trieng to immitate war-behaviour. It zips the built artifact, plus all dependencies, plus the files from '/src/main/webapp' into a zip called artifactid.nar - All this can easily be done with builtin maven plugins.

I think for 2.0 we should remove both of them. We have then introduced a dotnet-archive (but that should never contain any dependencies, but only package direct build artifacts)

When packaging stuff for convenience, the maven-assembly-plugin does a great job.

Developer
Apr 28, 2010 at 1:36 PM

I don't know exactly how it works, but a web application type project produces a zip file that gets deployed to the repository.  (Maybe it also produces a dll, and the zip is a secondary attached artfact?)

It's sort of like the war plugin which can make a jar out of src/main/java in addition to the .war.  People I work with have found this feature useful and will probably complain if it disappears.

If this gets removed, we need to provide an another way to package up a web application.

Coordinator
Apr 28, 2010 at 2:31 PM

ASP is precompiling pages before including in the ZIP, and it appears also assembling required dependencies. That seems reasonable to retain since it is specialised functionality over something like assembly.

I'm not sure the webapp one is still as relevant however. Is the package goal doing anything special?