netbeans - Maven - Can't deploy to remote repository -
i'm trying deploy library own remote maven repository. i'm using netbeans 8
here's pom.xml:
<?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>com.my.company.library.name</groupid> <artifactid>libraryid</artifactid> <version>3.0</version> <packaging>jar</packaging> <properties> <project.build.sourceencoding>utf-8</project.build.sourceencoding> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> </properties> <dependencies> (... dependencies...) </dependencies> <distributionmanagement> <repository> <id>myserver</id> <name>myserver repository</name> <url>http://maven.mycompany.com</url> </repository> </distributionmanagement> </project>
and here settings.xml
<?xml version="1.0" encoding="utf-8"?> <settings xsi:schemalocation="http://maven.apache.org/settings/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/settings/1.1.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <servers> <server> <username>dwnz</username> <id>central</id> </server> <server> <id>myserver</id> <username>dwnz</username> <password>mysupersecretpassword</password> </server> </servers> <profiles> <profile> <repositories> <repository> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>libs-release</name> <url>http://maven.mycompany.com/libs-release</url> </repository> <repository> <snapshots /> <id>snapshots</id> <name>libs-snapshot</name> <url>http://maven.mycompany.com/libs-snapshot</url> </repository> </repositories> <pluginrepositories> <pluginrepository> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>plugins-release</name> <url>http://maven.mycompany.com/plugins-release</url> </pluginrepository> <pluginrepository> <snapshots /> <id>snapshots</id> <name>plugins-snapshot</name> <url>http://maven.mycompany.com/plugins-snapshot</url> </pluginrepository> </pluginrepositories> <id>artifactory</id> </profile> </profiles> <activeprofiles> <activeprofile>artifactory</activeprofile> </activeprofiles> </settings>
when clean , build
following ouput on netbeans:
cd /users/dwnz/development/server/code/project/mylibrary; java_home=/library/java/javavirtualmachines/jdk1.8.0_40.jdk/contents/home "/applications/netbeans/netbeans 8.0.2.app/contents/resources/netbeans/java/maven/bin/mvn" clean install scanning projects... ------------------------------------------------------------------------ building library 3.0 ------------------------------------------------------------------------ --- maven-clean-plugin:2.4.1:clean (default-clean) @ library --- deleting /users/dwnz/development/server/code/project/mylibrary/target --- maven-resources-plugin:2.5:resources (default-resources) @ mylibrary --- [debug] execute contextualize using 'utf-8' encoding copy filtered resources. copying 0 resource --- maven-compiler-plugin:2.3.2:compile (default-compile) @ mylibrary --- compiling 183 source files /users/dwnz/development/server/code/project/mylibrary/target/classes --- maven-resources-plugin:2.5:testresources (default-testresources) @ mylibrary --- [debug] execute contextualize using 'utf-8' encoding copy filtered resources. skip non existing resourcedirectory /users/dwnz/development/server/code/project/mylibrary/src/test/resources --- maven-compiler-plugin:2.3.2:testcompile (default-testcompile) @ mylibrary --- no sources compile --- maven-surefire-plugin:2.10:test (default-test) @ mylibrary --- no tests run. surefire report directory: /users/dwnz/development/server/code/project/mylibrary/target/surefire-reports ------------------------------------------------------- t e s t s ------------------------------------------------------- results : tests run: 0, failures: 0, errors: 0, skipped: 0 --- maven-jar-plugin:2.3.2:jar (default-jar) @ mylibrary --- building jar: /users/dwnz/development/server/code/project/mylibrary/target/library-3.0.jar --- maven-install-plugin:2.3.1:install (default-install) @ mylibrary --- installing /users/dwnz/development/server/code/project/mylibrary/target/library-3.0.jar /users/dwnz/.m2/repository/com/mycompany/project/server/mylibrary/library/3.0/library-3.0.jar installing /users/dwnz/development/server/code/project/mylibrary/pom.xml /users/dwnz/.m2/repository/com/mycompany/project/server/mylibrary/library/3.0/library-3.0.pom ------------------------------------------------------------------------ build success ------------------------------------------------------------------------ total time: 3.426s finished at: mon may 11 17:16:22 west 2015 final memory: 18m/220m ------------------------------------------------------------------------
on server i'm using artifactory.
on remote maven repository library not deployed. 1 knows or can spot doing wrong here , why not deploying on remote maven repository?
------ edit-------
i tried using mvn deploy
on command line still no success. here ouput command line:
[info] scanning projects... [info] [info] ------------------------------------------------------------------------ [info] building mylibrary 3.0 [info] ------------------------------------------------------------------------ downloading: http://maven.myserver.com/plugins-release/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom downloading: http://maven.myserver.com/plugins-snapshot/org/apache/maven/plugins/maven-resources-plugin/2.6/maven-resources-plugin-2.6.pom [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 1.119 s [info] finished at: 2015-05-11t18:22:35+01:00 [info] final memory: 8m/123m [info] ------------------------------------------------------------------------ [error] plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or 1 of dependencies not resolved: failed read artifact descriptor org.apache.maven.plugins:maven-resources-plugin:jar:2.6: not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central (http://maven.myserver.com/plugins-release): not authorized , reasonphrase:unauthorized. -> [help 1] [error] [error] see full stack trace of errors, re-run maven -e switch. [error] re-run maven using -x switch enable full debug logging. [error] [error] more information errors , possible solutions, please read following articles: [error] [help 1] http://cwiki.apache.org/confluence/display/maven/pluginresolutionexception
apparently trying download plugins remote server. i'm not admin of server can't access it, have account there.
as pointed out khmarbaise server misconfiguration.
Comments
Post a Comment