How can I start using nar maven plugin?

1,365 views
Skip to first unread message

Henrik Jönsson

unread,
Jun 17, 2013, 3:56:05 AM6/17/13
to mave...@googlegroups.com
Hi,

I'm a new user of the nar plugin. It looks like a very interesting plugin for our c/c++ based components. However, I'm a bit confused where to start.

Which repository can I point out to download the plugin (or do I have to do something manually)?
(I'm a maven newbie as well...)

Best regards
Henrik
 

Johannes Schindelin

unread,
Jun 17, 2013, 1:15:08 PM6/17/13
to Henrik Jönsson, mave...@googlegroups.com
Hi Henrik,
We set up a 3rd-party repsitory and deployed an intermediate version:

<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>nar-maven-plugin</artifactId>
<version>3.0.0-scijava-2</version>
</dependency>

You will also have to add this section to your pom.xml so that our
repository can be found:

<repositories>
<repository>
<id>imagej.releases</id>
<url>http://maven.imagej.net/content/repositories/releases</url>
</repository>
</repositories>

Ciao,
Johannes

Johannes Schindelin

unread,
Jun 17, 2013, 1:26:58 PM6/17/13
to Henrik Jönsson, mave...@googlegroups.com
Hi Henrik,
Sorry, copy-paste error. It should read

<repositories>
<repository>
<id>imagej.thirdparty</id>
<url>http://maven.imagej.net/content/repositories/thirdparty</url>
</repository>
</repositories>

of course.

My bad,
Johannes

Curtis Rueden

unread,
Jun 17, 2013, 1:32:09 PM6/17/13
to Johannes Schindelin, Henrik Jönsson, NAR Maven plugin
Hi Henrik,

As Johannes says, my group released our own unofficial version, for use with our projects, which you (and anyone) are welcome to use. It will probably be awhile before we get an official 3.0.0 version into Central...

If you would like a working example on how to configure nar-maven-plugin, you can find our project which uses it at:


We have this working with a Jenkins farm that compiles for Win, OS X and Linux 32-bit and 64-bit builds, thanks to Johannes's hard work [1].

Regards,
Curtis



On Mon, Jun 17, 2013 at 12:26 PM, Johannes Schindelin <Johannes....@gmx.de> wrote:
Hi Henrik,

On Mon, 17 Jun 2013, Johannes Schindelin wrote:

Johannes

--
You received this message because you are subscribed to the Google Groups "NAR Maven plugin" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maven-nar+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Henrik Jönsson

unread,
Jun 18, 2013, 3:11:16 AM6/18/13
to mave...@googlegroups.com, Johannes Schindelin, Henrik Jönsson, ctru...@wisc.edu
Thanks for your responses. I'll try your examples and get back if I have any problems.

Best regards
Henrik
 

Roland Asmann

unread,
Jun 30, 2013, 7:07:56 AM6/30/13
to mave...@googlegroups.com, Henrik Jönsson
Thanks for putting a version out there, Johannes!

Small correction to your snippet, since we are talking about a plugin here:

    <pluginRepositories>
        <pluginRepository>
            <id>imagej.releases</id>
            <url>http://maven.imagej.net/content/repositories/thirdparty</url>
        </pluginRepository>
    </pluginRepositories>

I was wondering though, is the current snapshot available in a repo somewhere or do I just have to build it myself?

Roland

Johannes Schindelin

unread,
Jul 1, 2013, 11:04:29 AM7/1/13
to Roland Asmann, mave...@googlegroups.com, =3D?UTF-8?Q?Henrik_J=3DC3=3DB6nsson?=3D
Hi Roland,

On Sun, 30 Jun 2013, Roland Asmann wrote:

> Thanks for putting a version out there, Johannes!

Technically, it was Curtis Rueden who put it out.

> Small correction to your snippet, since we are talking about a plugin here:
>
> <pluginRepositories>
> <pluginRepository>
> <id>imagej.releases</id>
> =20
> <url>http://maven.imagej.net/content/repositories/thirdparty</url>
> </pluginRepository>
> </pluginRepositories>

Sorry, what exactly did you change?

> I was wondering though, is the current snapshot available in a repo=20
> somewhere or do I just have to build it myself?

As mentioned, it is available from ImageJ's thirdparty repository:

http://maven.imagej.net/content/repositories/thirdparty/org/apache/maven/plugins/nar-maven-plugin/3.0.0-scijava-2/nar-maven-plugin-3.0.0-scijava-2.jar

Ciao,
Johannes

Roland Asmann

unread,
Jul 1, 2013, 3:28:50 PM7/1/13
to mave...@googlegroups.com, Roland Asmann, =3D?UTF-8?Q?Henrik_J=3DC3=3DB6nsson?=3D
On Monday, July 1, 2013 5:04:29 PM UTC+2, Johannes Schindelin wrote:
Hi Roland,

On Sun, 30 Jun 2013, Roland Asmann wrote:

> Thanks for putting a version out there, Johannes!

Technically, it was Curtis Rueden who put it out.  

Well, then: thank you Curtis!
 
> Small correction to your snippet, since we are talking about a plugin here:
>
>     <pluginRepositories>
>         <pluginRepository>
>             <id>imagej.releases</id>
>            =20
> <url>http://maven.imagej.net/content/repositories/thirdparty</url>
>         </pluginRepository>
>     </pluginRepositories>

Sorry, what exactly did you change?
 
You used 'repositories'- and 'repository'-tags, but a for plugin you should use 'pluginRepositories'- and 'pluginRepository'-tags.

> I was wondering though, is the current snapshot available in a repo=20
> somewhere or do I just have to build it myself?

As mentioned, it is available from ImageJ's thirdparty repository:

        http://maven.imagej.net/content/repositories/thirdparty/org/apache/maven/plugins/nar-maven-plugin/3.0.0-scijava-2/nar-maven-plugin-3.0.0-scijava-2.jar

That's a release version, but I was wondering if there are snapshots available. Eg from nightly builds or something...
 
Ciao,
Johannes

Johannes Schindelin

unread,
Jul 8, 2013, 1:09:51 PM7/8/13
to Roland Asmann, mave...@googlegroups.com, =3D?UTF-8?Q?Henrik_J=3DC3=3DB6nsson?=3D
Hi Roland,

On Mon, 1 Jul 2013, Roland Asmann wrote:

> On Monday, July 1, 2013 5:04:29 PM UTC+2, Johannes Schindelin wrote:
> >
> > On Sun, 30 Jun 2013, Roland Asmann wrote:
> >
> > > Small correction to your snippet, since we are talking about a
> > > plugin here:
> > >
> > > <pluginRepositories>
> > > <pluginRepository>
> > > <id>imagej.releases</id>
> > > <url>http://maven.imagej.net/content/repositories/thirdparty</url>
> > > </pluginRepository>
> > > </pluginRepositories>
> >
> > Sorry, what exactly did you change?
>
> You used 'repositories'- and 'repository'-tags, but a for plugin you should
> use 'pluginRepositories'- and 'pluginRepository'-tags.

Ah, but of course!

> > I was wondering though, is the current snapshot available in a repo=20
> > > somewhere or do I just have to build it myself?
> >
> > As mentioned, it is available from ImageJ's thirdparty repository:
> >
> >
> > http://maven.imagej.net/content/repositories/thirdparty/org/apache/maven/plugins/nar-maven-plugin/3.0.0-scijava-2/nar-maven-plugin-3.0.0-scijava-2.jar
> >
>
> That's a release version, but I was wondering if there are snapshots
> available. Eg from nightly builds or something...

As we struggle to reduce our -SNAPSHOT dependencies in the interest of
reproducible builds: no, we do not have nightly builds.

There is a BuildHive job that builds the nar-maven-plugin whenever
somebody updates master, but it also builds whenever a pull request is
opened, so even if we could maintain a Maven repository from that (which
BuildHive does not support), you should not rely on that:

https://buildhive.cloudbees.com/job/maven-jar/job/maven-nar-plugin/

So to answer your question: I am not aware of any Maven repository
reflecting nightly builds.

Ciao,
Johannes

Curtis Rueden

unread,
Jul 8, 2013, 1:16:14 PM7/8/13
to Johannes Schindelin, Roland Asmann, NAR Maven plugin, =3D?UTF-8?Q?Henrik_J=3DC3=3DB6nsson?=3D
Hi all,


> So to answer your question: I am not aware of any Maven repository
> reflecting nightly builds.

I believe duns used to maintain a Maven repository with SNAPSHOT builds of the NAR plugin. At first I thought it might be valuable to do so again so that people can more easily test changes. But the more I think about it, the less useful I think it actually is. Even if we set up such a thing, it would be SNAPSHOTs based on the master branch. So e.g. you wouldn't be able to test pending PRs that way. And thanks to Java and the Maven build system, cloning the NAR plugin source and running "mvn install" to have your own local SNAPSHOT for testing (from whichever branch you wish, or even multiple merged branches, whatever) is nice and easy on all popular OSes.

So in short, I think given the lack of time of the maintainers, and the fact that it really is not a requirement for testing, let's not worry about publishing SNAPSHOT builds.

Other opinions?

Regards,
Curtis



Ciao,
Johannes

markon...@gmail.com

unread,
Jul 9, 2013, 4:59:00 AM7/9/13
to mave...@googlegroups.com
Hi,

I'm struggling to use the 3.0.0-scijava-2 repository artifact. My Nexus repository only seems to be able to index maven-nar-plugin and not nar-maven-plugin. Could this be because

http://maven.imagej.net/content/repositories/thirdparty/org/apache/maven/plugins/maven-metadata.xml

only contains

<metadata>
<plugins>
<plugin>
<name>Maven NAR Plugin</name>
<prefix>nar</prefix>
<artifactId>maven-nar-plugin</artifactId>
</plugin>
</plugins>
</metadata>

Thanks,
Mark.

Johannes Schindelin

unread,
Jul 9, 2013, 10:55:44 AM7/9/13
to markon...@gmail.com, mave...@googlegroups.com
Hi Mark,
Is your project public? I would like to compare the output of your
project's build with the output of
https://github.com/imagej/imagej-launcher

OTOH you can also compare them yourself if you do not want to share your
code with us.

Ciao,
Johannes

Mark Bowman

unread,
Jul 18, 2013, 10:54:39 AM7/18/13
to Johannes Schindelin, mave...@googlegroups.com
Johannes,
Thanks for the response. The problem appears to be entirely at my end. I think I must have misconfigured my nexus repository. imagej-laucher now builds successfully.
Thanks again,
Mark.
Reply all
Reply to author
Forward
0 new messages