Hello Henning,
(und Hallo auch auf Deutsch :-)

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"),

The goals 'compile' and 'testCompile' in plugin 'npanday.plugin:maven-compile-plugin' need to determine what to compile (module, library or exe). This is the reason we expect the artifact type to be registered. We could possibly just assume library/dll, though. I can't say right now how much work that would be and what the impacts would be. I guess tests would not run, though.

1) But as an alternative, I recommend adding a separate maven project (pom) just for packaging your wsp. You can use the custom-lifecycle-plugin which will register all ArtifactHandlers and allow you to resolve dependent npanday-types (http://www.npanday.org/docs/1.2/guide/maven/project-types.html) or just resolve them using the extension as type on the deps (won't work for GAC though).

You can then use dependencies:copy-dependencies (http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html) to unfold you dependency into the target, and then package them up using your wspbuilder.

2) or, you can just add the wsp-package as an secondary artifact using build-helper:attach-artifact

hope this helps.

- Lars
https://www.xing.com/profile/Lars_Corneliussen

Zitat von Henning Groß <[email protected]>:


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
[email protected]
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





Reply via email to