Re: Fwd: Re: ImageJ maven again

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: Re: ImageJ maven again

Johannes Schindelin
Hi,

let's stay open about this project so that nobody can claim to be cut out
from the development, at least not without posing a major fire hazard to
their leg wear.

On Thu, 3 Jul 2014, Curtis Rueden wrote:

> Tobias needs more permissions on our Nexus but I didn't have time to figure
> it out yesterday.
>
> On Jul 3, 2014 10:52 AM, "Tobias Pietzsch" <[hidden email]> wrote:
>
> > I now tried to deploy a (3rd party) jar to imagej.releases using this:
> >
> > pietzsch@tomancak-mac-17:~$ mvn deploy:deploy-file -Durl=
> > http://maven.imagej.net/content/repositories/releases/
> > -Dfile=/Users/pietzsch/Desktop/jhdf5-13.06.2.jar -DgroupId=cisd
> > -DartifactId=jhdf5 -Dpackaging=jar -Dversion=13.06.2
> > -DrepositoryId=imagej.releases
> > [INFO] Scanning for projects...
> > ...
> > [ERROR] Failed to execute goal
> > org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli)
> > on project standalone-pom: Failed to deploy artifacts: Could not transfer
> > artifact cisd:jhdf5:jar:13.06.2 from/to imagej.releases (
> > http://maven.imagej.net/content/repositories/releases/): Access denied
> > to:
> > http://maven.imagej.net/content/repositories/releases/cisd/jhdf5/13.06.2/jhdf5-13.06.2.jar

From the logs, it appears that someone from the public IP of the MPI-CBG
tried to put a new jhdf5-13.06.2 at 03/Jul/2014:10:26:04 -0500 which
translates to roughly half past five in the afternoon Dresden time.

The logs also reveal that this PUT request elicited a response code 401
(Access denied). From other, more successful PUT requests it looks as if
that is expected, but needs to be followed up by another request that
succeeds with a 201 (Created) [*1*].

It looks to me as if Maven does not find the proper credentials and
therefore does not even try to upload with authentication.

Please also note that jhdf5 should be in the imagej.thirdparty repository,
not the imagej.releases one (we do not maintain this project, unlike
pretty much everything put into the imagej.releases repository).

> > I have set up my ~/.m2/settings-security.xml and ~/.m2/settings.xml
> > correctly I think.

Could it be that your $HOME/.m2/settings.xml looks like this:

-- snip --
<settings>
        <servers>
                <server>
                        <id>imagej.snapshots</id>
                        <username>pietzsch</username>
                        <password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
                </server>
        </servers>
</settings>
-- snap --

but should look like this:

-- snip --
<settings>
        <servers>
                <server>
                        <id>imagej.releases</id>
                        <username>pietzsch</username>
                        <password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
                </server>
                <server>
                        <id>imagej.snapshots</id>
                        <username>pietzsch</username>
                        <password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
                </server>
                <server>
                        <id>imagej.thirdparty</id>
                        <username>pietzsch</username>
                        <password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
                </server>
        </servers>
</settings>
-- snap --

On the other hand, the problem might be a different one altogether: after
staring at the quoted command-line, I cannot fail to note that this
command is launched from your home directory, letting me suspect that
there is no pom.xml file at all.

Please note that Maven needs quite a bit of information for deploying: it
is not enough to say "imagej.releases", it needs a URL and very
specifically a transport helper for uploading (comparable to the uploader
plugins for the ImageJ updater, or the ssh protocol for Git pushing). For
the ImageJ Maven repositories, we use WebDAV to upload, in the form of the
wagon-webdav-jackrabbit extension. In your particular case, I expect none
of this information to be available to Maven.

I would suggest to try almost the same command-line you tried, but from
a directory containing *any* SciJava project. As long as it depends on
pom-scijava >= 1.135, it will have a profile that adds the deploy
information for the ImageJ Maven repositories specifically. So if you run
the following command-line from, say, the imglib2 checkout:

        mvn -Pdeploy-to-imagej deploy:deploy-file \
                -Dfile=/Users/pietzsch/Desktop/jhdf5-13.06.2.jar \
                -DgroupId=cisd -DartifactId=jhdf5 -Dpackaging=jar \
                -Dversion=13.06.2 \
                -DrepositoryId=imagej.thirdparty

it might do what you want it to do.

Ciao,
Dscho

Footnote *1*:
http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#2xx_Success

_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ maven again

Tobias Pietzsch
Hi Dscho,

thanks for looking into this!


Actually, my ~/.m2/settings.xml did contain a section for
> <server>
> <id>imagej.releases</id>
> <username>pietzsch</username>
> <password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
> </server>
with the password (passed through mvn -ep) I set at the Nexus webinterface (and which works for logging in there).

I did try to push to imagej.releases before, because that is where the previous version of jhdf5 was
http://maven.imagej.net/content/repositories/releases/cisd/jhdf5/


Now, following your suggestions, what I tried is the following:

1.) I added a section for
> <server>
> <id>imagej.thirdparty</id>
> <username>pietzsch</username>
> <password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
> </server>
to my settings.xml

2.) I cloned a fresh scijava-common from github. This currently has the parent pom-scijava 2.22.

3.) From that directory I ran the command you suggested. Here is the full output:
pietzsch@tomancak-mac-17:~/workspace/scijava-common (master)$ mvn -Pdeploy-to-imagej deploy:deploy-file -Dfile=/Users/pietzsch/Desktop/jhdf5-13.06.2.jar -DgroupId=cisd -DartifactId=jhdf5 -Dpackaging=jar -Dversion=13.06.2 -DrepositoryId=imagej.thirdparty
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SciJava Common 2.25.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-deploy-plugin:2.8.1:deploy-file (default-cli) @ scijava-common ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.042s
[INFO] Finished at: Thu Jul 03 22:12:30 CEST 2014
[INFO] Final Memory: 9M/310M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file (default-cli) on project scijava-common: Execution default-cli of goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file failed. NullPointerException -> [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/PluginExecutionException


I did look into the pom-scijava 2.22 and I couldn't find any mention of the "imagej.thirdparty" repository.
Maybe that is the problem?
I didn't try again with the "imagej.releases" repository because I don't want to mess anything up and I wouldn't know how to undo a successful deployment there.


What would you suggest? One thing I think I could try is to mimic the pom-scijava and put this into the pom.xml of my scijava-common clone:
                <!-- This profile enables deployment to the ImageJ Maven repository. -->
                <profile>
                        <id>deploy-to-imagej</id>
                        <distributionManagement>
                                <repository>
                                        <id>imagej.releases</id>
                                        <name>ImageJ Releases Repository</name>
                                        <url>dav:http://maven.imagej.net/content/repositories/releases</url>
                                </repository>
                                <repository>
                                        <id>imagej.thirdparty</id>
                                        <name>ImageJ Thirdparty Repository</name>
                                        <url>dav:http://maven.imagej.net/content/repositories/thirdparty</url>
                                </repository>
                                <snapshotRepository>
                                        <id>imagej.snapshots</id>
                                        <name>ImageJ Snapshots Repository</name>
                                        <url>dav:http://maven.imagej.net/content/repositories/snapshots</url>
                                </snapshotRepository>
                        </distributionManagement>
                </profile>
Do you think that might work? Should I try it?


Thanks,
Tobias


On Jul 3, 2014, at 8:20 PM, Johannes Schindelin <[hidden email]> wrote:

> Hi,
>
> let's stay open about this project so that nobody can claim to be cut out
> from the development, at least not without posing a major fire hazard to
> their leg wear.
>
> On Thu, 3 Jul 2014, Curtis Rueden wrote:
>
>> Tobias needs more permissions on our Nexus but I didn't have time to figure
>> it out yesterday.
>>
>> On Jul 3, 2014 10:52 AM, "Tobias Pietzsch" <[hidden email]> wrote:
>>
>>> I now tried to deploy a (3rd party) jar to imagej.releases using this:
>>>
>>> pietzsch@tomancak-mac-17:~$ mvn deploy:deploy-file -Durl=
>>> http://maven.imagej.net/content/repositories/releases/
>>> -Dfile=/Users/pietzsch/Desktop/jhdf5-13.06.2.jar -DgroupId=cisd
>>> -DartifactId=jhdf5 -Dpackaging=jar -Dversion=13.06.2
>>> -DrepositoryId=imagej.releases
>>> [INFO] Scanning for projects...
>>> ...
>>> [ERROR] Failed to execute goal
>>> org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy-file (default-cli)
>>> on project standalone-pom: Failed to deploy artifacts: Could not transfer
>>> artifact cisd:jhdf5:jar:13.06.2 from/to imagej.releases (
>>> http://maven.imagej.net/content/repositories/releases/): Access denied
>>> to:
>>> http://maven.imagej.net/content/repositories/releases/cisd/jhdf5/13.06.2/jhdf5-13.06.2.jar
>
> From the logs, it appears that someone from the public IP of the MPI-CBG
> tried to put a new jhdf5-13.06.2 at 03/Jul/2014:10:26:04 -0500 which
> translates to roughly half past five in the afternoon Dresden time.
>
> The logs also reveal that this PUT request elicited a response code 401
> (Access denied). From other, more successful PUT requests it looks as if
> that is expected, but needs to be followed up by another request that
> succeeds with a 201 (Created) [*1*].
>
> It looks to me as if Maven does not find the proper credentials and
> therefore does not even try to upload with authentication.
>
> Please also note that jhdf5 should be in the imagej.thirdparty repository,
> not the imagej.releases one (we do not maintain this project, unlike
> pretty much everything put into the imagej.releases repository).
>
>>> I have set up my ~/.m2/settings-security.xml and ~/.m2/settings.xml
>>> correctly I think.
>
> Could it be that your $HOME/.m2/settings.xml looks like this:
>
> -- snip --
> <settings>
> <servers>
> <server>
> <id>imagej.snapshots</id>
> <username>pietzsch</username>
> <password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
> </server>
> </servers>
> </settings>
> -- snap --
>
> but should look like this:
>
> -- snip --
> <settings>
> <servers>
> <server>
> <id>imagej.releases</id>
> <username>pietzsch</username>
> <password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
> </server>
> <server>
> <id>imagej.snapshots</id>
> <username>pietzsch</username>
> <password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
> </server>
> <server>
> <id>imagej.thirdparty</id>
> <username>pietzsch</username>
> <password>{0123456789abcdefghijklmnopqrstuvwxyzABCDEFG=}</password>
> </server>
> </servers>
> </settings>
> -- snap --
>
> On the other hand, the problem might be a different one altogether: after
> staring at the quoted command-line, I cannot fail to note that this
> command is launched from your home directory, letting me suspect that
> there is no pom.xml file at all.
>
> Please note that Maven needs quite a bit of information for deploying: it
> is not enough to say "imagej.releases", it needs a URL and very
> specifically a transport helper for uploading (comparable to the uploader
> plugins for the ImageJ updater, or the ssh protocol for Git pushing). For
> the ImageJ Maven repositories, we use WebDAV to upload, in the form of the
> wagon-webdav-jackrabbit extension. In your particular case, I expect none
> of this information to be available to Maven.
>
> I would suggest to try almost the same command-line you tried, but from
> a directory containing *any* SciJava project. As long as it depends on
> pom-scijava >= 1.135, it will have a profile that adds the deploy
> information for the ImageJ Maven repositories specifically. So if you run
> the following command-line from, say, the imglib2 checkout:
>
> mvn -Pdeploy-to-imagej deploy:deploy-file \
> -Dfile=/Users/pietzsch/Desktop/jhdf5-13.06.2.jar \
> -DgroupId=cisd -DartifactId=jhdf5 -Dpackaging=jar \
> -Dversion=13.06.2 \
> -DrepositoryId=imagej.thirdparty
>
> it might do what you want it to do.
>
> Ciao,
> Dscho
>
> Footnote *1*:
> http://en.wikipedia.org/wiki/List_of_HTTP_status_codes#2xx_Success

_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel

signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ maven again

dscho
Administrator
Hi Tobias,

On Thu, 3 Jul 2014, Tobias Pietzsch wrote:

> I did try to push to imagej.releases before, because that is where the
> previous version of jhdf5 was
> http://maven.imagej.net/content/repositories/releases/cisd/jhdf5/

Yes, let's not do that again.

> I did look into the pom-scijava 2.22 and I couldn't find any mention of
> the "imagej.thirdparty" repository.

Right, my mistake. We no longer depend on any third-party stuff in
ImageJ2.

So yes, putting in the sections you described in your mail into your
pom.xml should help.

I also looked into my personal notes how to deploy manually into
thirdparty and noticed that I use a slightly different URL for these:

        -Durl=dav:http://maven.imagej.net/content/repositories/thirdparty

I suppose the "dav:" prefix makes all the difference.

Ciao,
Johannes

_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ maven again

Tobias Pietzsch
Hi Johannes,

it almost worked now. mvn even transferred the file (it took a while and was counting KB up, so it must have done something).
But then I get an "Access denied":
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file (default-cli) on project scijava-common: Failed to deploy artifacts: Could not transfer artifact cisd:jhdf5:jar:13.06.2 from/to imagej.thirdparty (dav:http://maven.imagej.net/content/repositories/thirdparty/): Access denied to: http://maven.imagej.net/content/repositories/thirdparty//cisd/jhdf5/13.06.2/jhdf5-13.06.2.jar -> [Help 1]


Also, in the Nexus web interface, I don't see any repositories when I am logged in.
Maybe I really do not have the necessary permissions?


Here is the full output:

pietzsch@tomancak-mac-17:~/workspace/scijava-common (master)$ mvn deploy:deploy-file -Durl=dav:http://maven.imagej.net/content/repositories/thirdparty/ -Dfile=/Users/pietzsch/Desktop/jhdf5-13.06.2.jar -DgroupId=cisd -DartifactId=jhdf5 -Dpackaging=jar -Dversion=13.06.2 -DrepositoryId=imagej.thirdparty
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building SciJava Common 2.25.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-deploy-plugin:2.8.1:deploy-file (default-cli) @ scijava-common ---
Uploading: dav:http://maven.imagej.net/content/repositories/thirdparty/cisd/jhdf5/13.06.2/jhdf5-13.06.2.jar
Jul 03, 2014 10:49:25 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Jul 03, 2014 10:49:26 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Jul 03, 2014 10:49:26 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Jul 03, 2014 10:49:27 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Jul 03, 2014 10:49:27 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Jul 03, 2014 10:50:54 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Uploading: http://maven.imagej.net/content/repositories/thirdparty/cisd/jhdf5/13.06.2/jhdf5-13.06.2.pom
Jul 03, 2014 10:52:21 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Jul 03, 2014 10:52:22 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Jul 03, 2014 10:52:22 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Jul 03, 2014 10:52:22 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Jul 03, 2014 10:52:23 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Jul 03, 2014 10:52:23 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:59.810s
[INFO] Finished at: Thu Jul 03 22:52:23 CEST 2014
[INFO] Final Memory: 11M/310M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file (default-cli) on project scijava-common: Failed to deploy artifacts: Could not transfer artifact cisd:jhdf5:jar:13.06.2 from/to imagej.thirdparty (dav:http://maven.imagej.net/content/repositories/thirdparty/): Access denied to: http://maven.imagej.net/content/repositories/thirdparty//cisd/jhdf5/13.06.2/jhdf5-13.06.2.jar -> [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/MojoExecutionException
pietzsch@tomancak-mac-17:~/workspace/scijava-common (master)$


thanks,
Tobias

On Jul 3, 2014, at 10:34 PM, Johannes Schindelin <[hidden email]> wrote:

> Hi Tobias,
>
> On Thu, 3 Jul 2014, Tobias Pietzsch wrote:
>
>> I did try to push to imagej.releases before, because that is where the
>> previous version of jhdf5 was
>> http://maven.imagej.net/content/repositories/releases/cisd/jhdf5/
>
> Yes, let's not do that again.
>
>> I did look into the pom-scijava 2.22 and I couldn't find any mention of
>> the "imagej.thirdparty" repository.
>
> Right, my mistake. We no longer depend on any third-party stuff in
> ImageJ2.
>
> So yes, putting in the sections you described in your mail into your
> pom.xml should help.
>
> I also looked into my personal notes how to deploy manually into
> thirdparty and noticed that I use a slightly different URL for these:
>
> -Durl=dav:http://maven.imagej.net/content/repositories/thirdparty
>
> I suppose the "dav:" prefix makes all the difference.
>
> Ciao,
> Johannes

_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel

signature.asc (465 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ maven again

dscho
Administrator
Hi Tobias,

On Thu, 3 Jul 2014, Tobias Pietzsch wrote:

> it almost worked now. mvn even transferred the file (it took a while and
> was counting KB up, so it must have done something).  But then I get an
> "Access denied":
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file (default-cli) on project scijava-common: Failed to deploy artifacts: Could not transfer artifact cisd:jhdf5:jar:13.06.2 from/to imagej.thirdparty (dav:http://maven.imagej.net/content/repositories/thirdparty/): Access denied to: http://maven.imagej.net/content/repositories/thirdparty//cisd/jhdf5/13.06.2/jhdf5-13.06.2.jar -> [Help 1]
>
>
> Also, in the Nexus web interface, I don't see any repositories when I am
> logged in.
> Maybe I really do not have the necessary permissions?

I assigned you a couple more roles, hopefully fixing the problem. Could
you try again?

Unfortunately, I have to leave now, I kind of expected you to ping me on
IRC as Curtis had suggested if the problem persists. Tomorrow is
Independence Day. I seriously hope that you can wait until Monday if it
still does not work.

Ciao,
Johannes

_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel
Reply | Threaded
Open this post in threaded view
|

Re: ImageJ maven again

Tobias Pietzsch
Hi Johannes,

it worked now. Thanks so much and enjoy independence day!

best regards,
Tobias

On Jul 3, 2014, at 11:50 PM, Johannes Schindelin <[hidden email]> wrote:

> Hi Tobias,
>
> On Thu, 3 Jul 2014, Tobias Pietzsch wrote:
>
>> it almost worked now. mvn even transferred the file (it took a while and
>> was counting KB up, so it must have done something).  But then I get an
>> "Access denied":
>> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy-file (default-cli) on project scijava-common: Failed to deploy artifacts: Could not transfer artifact cisd:jhdf5:jar:13.06.2 from/to imagej.thirdparty (dav:http://maven.imagej.net/content/repositories/thirdparty/): Access denied to: http://maven.imagej.net/content/repositories/thirdparty//cisd/jhdf5/13.06.2/jhdf5-13.06.2.jar -> [Help 1]
>>
>>
>> Also, in the Nexus web interface, I don't see any repositories when I am
>> logged in.
>> Maybe I really do not have the necessary permissions?
>
> I assigned you a couple more roles, hopefully fixing the problem. Could
> you try again?
>
> Unfortunately, I have to leave now, I kind of expected you to ping me on
> IRC as Curtis had suggested if the problem persists. Tomorrow is
> Independence Day. I seriously hope that you can wait until Monday if it
> still does not work.
>
> Ciao,
> Johannes

_______________________________________________
ImageJ-devel mailing list
[hidden email]
http://imagej.net/mailman/listinfo/imagej-devel

signature.asc (465 bytes) Download Attachment