On 29 August 2011 09:41, Eric Kolotyluk <[email protected]> wrote:
> OK, here is the POM from my plugin project
>
> <modelVersion>4.0.0</modelVersion>
>
> <groupId>com.kodak.jni4net</groupId>
> <artifactId>jni4net-maven-plugin</artifactId>
> <version>0.0.1-SNAPSHOT</version>
> <packaging>maven-plugin</packaging>
>
> <name>jni4net-maven-plugin Maven Plugin</name>
> <url>http://maven.apache.org</url>
>
> <properties>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> </properties>
>
> <distributionManagement>
> <downloadUrl>http://nexus:8081/nexus/content/groups/public</downloadUrl>
> <repository>
> <uniqueVersion>false</uniqueVersion>
> <id>nexus</id>
> <name>Kodak Release Repository</name>
> <url>http://nexus:8081/nexus/content/repositories/releases</url>
> <layout>default</layout>
> </repository>
> <snapshotRepository>
> <id>nexus</id>
> <name>Kodak Snapshot Repository</name>
> <url>http://nexus:8081/nexus/content/repositories/snapshots</url>
> <layout>default</layout>
> </snapshotRepository>
> </distributionManagement>
>
> <dependencies>
> <dependency>
> <groupId>org.apache.maven</groupId>
> <artifactId>maven-plugin-api</artifactId>
> <version>2.0</version>
> </dependency>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>3.8.1</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>jni4net</groupId>
> <artifactId>jni4net</artifactId>
> <version>0.8.4.0</version>
> </dependency>
> </dependencies>
>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-plugin-plugin</artifactId>
> <version>2.5.1</version>
> <configuration>
> <goalPrefix>jni4net-maven-plugin</goalPrefix>

This should be <goalPrefix>jni4net</goalPrefix>.

> </configuration>
> <executions>
> <execution>
> <id>generated-helpmojo</id>
> <goals>
> <goal>helpmojo</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
>
>
> On 2011-08-29 8:52 AM, Hilco Wijbenga wrote:
>>
>> On 29 August 2011 08:45, Eric Kolotyluk<[email protected]>  wrote:
>>>
>>> On the command line in in the project with the POM I showed I use
>>>
>>> P:\Intersystem\main\platform.Java\intersystem-jni4net>mvn validate
>>> [INFO] Scanning for projects...
>>> [INFO]
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Building intersystem-jni4net 0.0.2-SNAPSHOT
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [WARNING] The POM for
>>> com.kodak.jni4net:jni4net-maven-plugin:jar:0.0.1-SNAPSHOT is missing, no
>>> dependency information available
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] BUILD FAILURE
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Total time: 0.139s
>>> [INFO] Finished at: Mon Aug 29 08:42:31 PDT 2011
>>> [INFO] Final Memory: 4M/368M
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [ERROR] Plugin com.kodak.jni4net:jni4net-maven-plugin:0.0.1-SNAPSHOT or
>>> one
>>> of its dependencies could not be resolved: Failed to read artifact
>>> descriptor for com.kodak.jni4net:jni4net-maven-plugin:jar:0.0.1-SNAPSHOT:
>>> Failure to find com.kodak.jni4net:jni4net-maven-plugin:pom:0.0.1-SNAPSHOT
>>> in
>>> http://nexus:8081/nexus/content/groups/public was cached in the local
>>> repository, resolution will not be reattempted until the update interval
>>> of
>>> nexus has elapsed or updates are forced ->  [Help 1]
>>> [ERROR]
>>> [ERROR] To see the full stack trace of the errors, re-run Maven with the
>>> -e
>>> switch.
>>> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
>>> [ERROR]
>>> [ERROR] For more information about the errors and possible solutions,
>>> please
>>> read the following articles:
>>> [ERROR] [Help 1]
>>>
>>> http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
>>> P:\Intersystem\main\platform.Java\intersystem-jni4net>
>>>
>>> On 2011-08-29 8:27 AM, Hilco Wijbenga wrote:
>>>>
>>>> On 29 August 2011 07:32, Eric Kolotyluk<[email protected]>
>>>>  wrote:
>>>>>
>>>>> OK, I'm trying to get my first mojo working.
>>>>>
>>>>> I created a project with the maven-plugin archetype and used the
>>>>> default
>>>>> mojo that is there, but I cannot seem to get it to run.
>>>>>
>>>>> The first time I tried to run it maven complained it could not find the
>>>>> plugin. So then I ran a maven install, but it still could not find it
>>>>> because it would only look in Nexus for it - why doesn't it just look
>>>>> in
>>>>> the
>>>>> local repository? Then I ran a maven deploy, so the plugin project
>>>>> artifacts
>>>>> are definitely in Nexus now, but maven is still complaining it cannot
>>>>> find
>>>>> the POM for the plugin.
>>>>>
>>>>> I suspect the problem is my plugin is version 0.0.1-SNAPSHOT but the
>>>>> files
>>>>> in Nexus are like
>>>>>
>>>>>
>>>>>
>>>>> nexus/content/repositories/snapshots/com/kodak/jni4net/jni4net-maven-plugin/0.0.1-SNAPSHOT/jni4net-maven-plugin-0.0.1-20110829.135006-1.pom
>>>>>
>>>>> and the POM I am trying to run the plugin from looks like
>>>>>
>>>>> <plugin>
>>>>> <groupId>com.kodak.jni4net</groupId>
>>>>> <artifactId>jni4net-maven-plugin</artifactId>
>>>>> <version>0.0.1-SNAPSHOT</version>
>>>>> <executions>
>>>>> <execution>
>>>>> <phase>validate</phase>
>>>>> <goals>
>>>>> <goal>proxygen</goal>
>>>>> </goals>
>>>>> </execution>
>>>>> </executions>
>>>>> </plugin>
>>>>>
>>>>> Does anyone have any advice?
>>>>
>>>> How are you calling your plugin? In a POM? Or on the command line? You
>>>> need to make sure Maven knows the group id for the plugin so just
>>>> invoking (e.g.) mvn jni4net:proxygen is not going to work. Well, not
>>>> without extra work anyway.
>>
>> Ah, I misunderstood. You were showing the calling POM. What about the
>> plugin's POM? The one where you defined the plugin. As Jason said,
>> there must be a typo somewhere.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to