Tom Huybrechts wrote:
I'm assuming you have the source, and want to build and deploy it (opposed
to having a binary and wanting do to a deploy-file).

Correct, I am trying to deploy my atlassian-plugin (essentially just a plain old JAR) into a maven2 repository along with the other libraries. I just don't know how to tell maven2 what to do.

There should be a maven plugin that defines the atlassian-plugin packaging.
This plugin would define a mapping from atlassian-plugin to a lifecycle
(which defines which plugins are run) and an artifact type (which says that
the extension is .jar). In order for these mappings to be picked up, you
need to specify <extensions>true</extensions> on that maven plugin.

Correct, the plugin is "atlassian-pdk", described below.

If that doesn't work, try sending us some more info than 'it doesn't work'.
Some output (with -X), a pom, ...

By all means, it's difficult to preempt what you want (from my perspective), however a "mvn -X deploy" gives a 4975 line output please confirm that you want this before I just paste it in here, I searched for the word "deploy" and this is what I found around the only instance:

{noformat}
this realm = plexus.core
urls[0] = file:/java/m2/lib/maven-core-2.0.7-uber.jar
urls[1] = file:/java/m2/lib/svnkit-1.1.4-hudson-4.jar
urls[2] = file:/java/m2/lib/wagon-svn-1.6.jar
urls[3] = file:/Users/dhardiker/.m2/repository/org/jvnet/wagon-svn/wagon-svn/1.6/wagon-svn-1.6.jar
Number of imports: 0
-----------------------------------------------------
[DEBUG] atlassian-pdk: resolved to version 2.1.1 from repository atlassian-m2-plugins [INFO] ----------------------------------------------------------------------------
[INFO] Building Adaptavist Theme Builder
[INFO]    task-segment: [deploy]
[INFO] ---------------------------------------------------------------------------- [DEBUG] Error looking up lifecycle mapping to retrieve optional mojos. Lifecycle ID: default. Error: Component descriptor cannot be found in the component repository: org.apache.maven.lifecycle.mapping.LifecycleMappingatlassian-plugin. org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.lifecycle.mapping.LifecycleMappingatlassian-plugin. at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:323) at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440) at org.apache.maven.execution.MavenSession.lookup(MavenSession.java:123) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.findOptionalMojosForLifecycle(DefaultLifecycleExecutor.java:1111)
{noformat}

... the pom is a standard pom, but with <packaging>atlassian-plugin</packaging> and the following plugin added in the <build> section:

        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>atlassian-pdk</artifactId>
                <extensions>true</extensions>
            </plugin>
        </plugins>

(if you want the whole pom.xml, then by all means I can paste it in here on request)

The plugin basically does some work during the process-classes phase, which modifies the target/classes before compilation and packaging. The resulting jar should be treated the same as if the packaging was "jar".

I wrote some of the innards of that plugin, and I'm guessing it's missing something. The plugin is documented here: http://confluence.atlassian.com/display/CONFEXT/Plugin+Developer+Kit+for+Maven2 and the source is here: http://svn.atlassian.com/svn/public/contrib/maven-plugins/com.atlassian.maven.plugins/atlassian-pdk/trunk/ with FishEye monitoring here: http://svn.atlassian.com/fisheye/browse/public/contrib/maven-plugins/com.atlassian.maven.plugins/atlassian-pdk/trunk/

If you have any specific questions I'd be more than happy to answer them, however answering a "send us more info" is as useful to me as "it doesn't work" is to you ;) Please, more questions!

I'm struggling to find concise documentation as everything is loosely linked and the "penny" hasn't dropped yet as to what I'm missing.

Thanks,


--
Dan Hardiker
Adaptavist.com Ltd

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to