Hi Brett, hi @rest!
Unfortunately I cannot provide you with a sample project as our alpha-stuff is 
in an internal repository. I will provide you with as much info as I think is 
needed. This mail will get long :)

Situation: a VS-ClassLibrary-Project needs to be build, after compile, during 
package a maven plugin will take the output .dll file and some other stuff 
and pack it into an archive with the extension .wsp. This file, along with 
its sources is put into out repo.
The only way to make maven put the file in the repo under its correct 
extension (.wsp) is to register a lifecycle and an artifact handler in maven 
as an extension. The file configuration.xml youll find as an attachment does 
exactly that.

Now after adding the extension to extensions in build in the pom.xml maven 
accepts the <package>wsp</package> and deploys the stuff to the repos 
correctly.

This would be the behaviour I would expect. But its not like that. Despite my 
plugin conf looks like this: 

      <plugin>
        <groupId>npanday.plugin</groupId>
        <artifactId>maven-compile-plugin</artifactId>
        <version>1.2.1</version>
        <extensions>true</extensions>
        <configuration>
          <packaging>library</packaging>
          <frameworkVersion>3.5</frameworkVersion>
          <includeSources>
            <includeSource>...</includeSource>
          </includeSources>
        </configuration>
      </plugin>

It will give me an error about an unknown artifact type. I had to modify 
components/dotnet-core/scr/main/java/npanday/ArtifactType.java 
adding 
        /**
         * Added to suit wsp-builder projects
         */
        WSP("wsp", "library", "dll"),

and recompile the dotnet-core.

Regards,
Henning

Am Montag, 10. Januar 2011 13:35:40 schrieb Brett Porter:
> It should be possible, as long as you are adding the
> <extensions>true</extensions> flag to your plugin's use. This is all
> internal to Maven - if there is somewhere that NPanday can't pick that up
> then it might possibly need to be adjusted.
>
> What is the exact trace of the problem? Do you have a minimal test project
> you could attach to JIRA?
>
> Cheers,
> Brett
>
> On 07/01/2011, at 7:52 PM, Henning Gross wrote:
> > Hi!
> >
> > I need to build a special type of project. Namely wsp files. I have
> > created a lifecycle and an ArtifactHandler for wsp files. Npanday will
> > exit giving an error "unrecognized artifact type". I tracked it down in
> > the sources and as far as I see it, artifact types have to be in
> > dotnet-core in class ArtifactType.java This means I have to make my own
> > build of dotnet-core whenever there is a new Npanday-release to get my
> > Artifact Type recognized.
> >
> > Artifact Types should get externalized. It should be possible to add
> > artifact types via an extension or plugin configuration.
> >
> > Or am I missing something?
>
> --
> Brett Porter
> br...@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter


-- 
tarent Gesellschaft für Softwareentwicklung und IT-Beratung mbH
Geschäftsführer: Boris Esser, Elmar Geese
HRB AG Bonn 5168 - USt-ID (VAT): DE122264941

Heilsbachstraße 24,  53123 Bonn,   Telefon: +49 228 52675-0
Thiemannstraße 36 a, 12059 Berlin, Telefon: +49 30 5682943-30
Internet: http://www.tarent.de/  • Telefax: +49 228 52675-25
<?xml version="1.0"?>
<component-set>
  <components>
  	 <component>
      <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
      <role-hint>wsp</role-hint>
      <implementation>
        org.apache.maven.artifact.handler.DefaultArtifactHandler
      </implementation>
      <configuration>
        <type>wsp</type>
        <extension>wsp</extension>
        <addedToClasspath>true</addedToClasspath>
      </configuration>
    </component>
	<component>
      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
      <role-hint>wsp</role-hint>
      <implementation>
        org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
      </implementation>
      <configuration>
        <phases>
          <validate>
            npanday.plugin:maven-compile-plugin:initialize,
            npanday.plugin:maven-resolver-plugin:resolve ,
            npanday.plugin:NPanday.Plugin.Settings.JavaBinding:generate-settings
          </validate>
          <generate-sources>
            npanday.plugin:maven-compile-plugin:generate-assembly-info
          </generate-sources>
          <process-sources>
            npanday.plugin:maven-compile-plugin:process-sources,
            npanday.plugin:maven-compile-plugin:process-test-sources
          </process-sources>
          <process-resources>
            npanday.plugin:maven-resgen-plugin:copy-resources,
            npanday.plugin:maven-resgen-plugin:generate,
			npanday.plugin:maven-resgen-plugin:generate-existing-resx-to-resource
          </process-resources>
          <compile>
            npanday.plugin:maven-compile-plugin:compile,
          </compile>
          <test-compile>
            npanday.plugin:maven-compile-plugin:testCompile
          </test-compile>
          <test>npanday.plugin:maven-test-plugin:test</test>
		  <package>
			de.tarent.maven.plugins:maven-wspbuilder-plugin:wsp
		  </package>
          <install>                    
            org.apache.maven.plugins:maven-install-plugin:install
          </install>
          <deploy>
            org.apache.maven.plugins:maven-deploy-plugin:deploy
          </deploy>
        </phases>
      </configuration>
    </component>
  </components>
</component-set>

Reply via email to