I apologize in advance for any stupid questions or mistakes and the really
long post.  I wanted to make sure I included all the relevant info.  I am
sure I am missing something though.  I am just learning about maven, pom
files and Artifactory.  I am not a developer but I inherited an environment
that was poorly put together and I am trying to get it in the right
direction.  The company was using a consultant company and they developed
the build environment.   

I noticed that all the developers were using a local maven repository on
each box and they are not consistent.  It looks like files were being copied
around.  So to remedy this, I have installed Artifact 3.1.0.  The maven
version in use is 2.1.0.  I know the maven version is old but I am trying to
make small changes and get things working before introducing more changes.  

I have configured the ldap settings in artifactory and that is working.  I
am trying to use the secure password feature so that the actual ldap
password is not stored in the users settings.xml file.  I tried to do a
maven deploy from the command line and there are a few artifacts that
couldn't be resolved.  The error message suggested adding them to the
repository.  Some of them are old and deprecated and others I just couldn't
find.  I would like to upload these into the Artifactory repository and then
have a developer update the code to use the current artifact later.  

I get an authorization failure and it complains about a
settings-security.xml.  I don't think I need that file and I did not see it
as a requirement anywhere in the setup.  

Below is the what I executed.  
C:\utilities\apache-maven-2.1.0\bin\mvn deploy:
deploy-file -DgroupId=it.sauronsoftware.ftp4j -DartifactId=ftp4j
-Dversion=1.5.1
 -Dpackaging=jar -Dfile="C:\Documents and Settings\user\.m2\repository\it\s
auronsoftware\ftp4j\ftp4j\1.5.1\ftp4j-1.5.1.jar"
-Durl=http://artifactoryserver:8081/aritfactory/repo1 -DrepositoryID=repo1

Here is the result
[WARNING] Not decrypting password for server 'company' due to exception in
security handler.
Ensure that you have configured your master password file (and relocation if
appropriate)
See the installation instructions for details.
Cause: C:\Documents and Settings\user\.m2\settings-security.xml (The system
cannot find the file specified)
[WARNING] Not decrypting password for server 'repo' due to exception in
security handler.
Ensure that you have configured your master password file (and relocation if
appropriate)
See the installation instructions for details.Cause: C:\Documents and
Settings\user\.m2\settings-security.xml (The system
 cannot find the file specified)[WARNING] Not decrypting password for server
'repo1' due to exception in securit
y handler.Ensure that you have configured your master password file (and
relocation if appropriate)See the installation instructions for details.
Cause: C:\Documents and Settings\user\.m2\settings-security.xml (The system
cannot find the file specified)
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'deploy'.
[INFO]
------------------------------------------------------------------------
[INFO] Building company_spider_lib
[INFO]    task-segment: [deploy:deploy-file] (aggregator-style)
[INFO]
------------------------------------------------------------------------
[INFO] [deploy:deploy-file]
Uploading:
http://artifactoryserver:8081/aritfactory/repo1/it/sauronsoftware/ftp4j/ftp4j/1.5.1/ftp4j-1.5.1.jar
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error deploying artifact: Authorization failed: Access denied to:
http://artifactoryserver:8081/aritfactory/repo1/it/sauronsoftware/ftp4j/ftp4j/1.5.1/ftp4j-1.5.1.jar


Settings.xml  I merged what was generated by Artifactory with what was on
one of the previous developers machine.
<?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>user</username>
      <id>central</id>
    </server>
    <server>
      <username>user</username>
      <id>snapshots</id>
    </server>
        <server>
                <id>company</id>
          <username>user</username>
          <password>\{DESede\}encrypted password from Artifactory UI</password>
        </server>
        <server>
                <id>repo</id>
          <username>user</username>
          <password>\{DESede\}encrypted password from Artifactory UI</password>
        </server>
        <server>
                <id>repo1</id>
          <username>user</username>
          <password>\{DESede\}encrypted password from Artifactory UI</password>
        </server>
  </servers>
  <mirrors>
    <mirror>
      <mirrorOf>*</mirrorOf>
      <name>repo</name>
      <url>http://artifactoryserver:8081/artifactory/repo</url>
      <id>repo</id>
    </mirror>
  </mirrors>
  <profiles>
    <profile>
      <repositories>
        <repository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>libs-release</name>
          <url>http://artifactoryserver:8081/artifactory/libs-release</url>
        </repository>
        <repository>
          <snapshots />
          <id>snapshots</id>
          <name>libs-snapshot</name>
          <url>http://artifactoryserver:8081/artifactory/libs-snapshot</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
          <id>central</id>
          <name>plugins-release</name>
         
<url>http://artifactoryserver:8081/artifactory/plugins-release</url>
        </pluginRepository>
        <pluginRepository>
          <snapshots />
          <id>snapshots</id>
          <name>plugins-snapshot</name>
         
<url>http://artifactoryserver:8081/artifactory/plugins-snapshot</url>
        </pluginRepository>
      </pluginRepositories>
      <id>artifactory</id>
    </profile>
                        
                <profile>
                        <id>env-common</id>
                        <activation>
                                <activeByDefault>true</activeByDefault>
                        </activation>
                        <properties>
                        </properties>
                </profile>
                
                <profile>
                        <id>env-developer</id>
                        <activation>
                                <activeByDefault>false</activeByDefault>
                                <property>
                                        <name>env.Company_USERTYPE</name>
                                        <value>developer</value>
                                </property>
                        </activation>
                        <properties>
                                
                                <buildVersion>0.0.1-SNAPSHOT</buildVersion>
                                <versionName>0.0.1-SNAPSHOT</versionName>
                                
                                
<environment.deploy.phase>install</environment.deploy.phase>
                                <artifactsDir>target</artifactsDir>
                                
<maven.scp.executable>pscp</maven.scp.executable>
                                
<maven.ssh.executable>plink</maven.ssh.executable>
                        </properties>
                </profile>
                
                </profile>
  </profiles>
  <activeProfiles>
    <activeProfile>artifactory</activeProfile>
        <activeProfile>env-common</activeProfile>
  </activeProfiles>
</settings>

POM.xml for the project
<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/maven-v4_0_0.xsd";>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.altrec</groupId>
  <artifactId>company_spider_lib</artifactId>
  <packaging>jar</packaging>
  <version>${versionName}</version>
  <name>altrec_web_lib</name>
  <url>http://maven.apache.org</url>
  <repositories>
    <repository>
      <id>company</id>
      <url>http://code.company.com/repo</url>
    </repository>
    <repository>
      <id>couchbase</id>
      <name>Couchbase Maven Repository</name>
      <layout>default</layout>
      <url>http://files.couchbase.com/maven2/</url>
      <snapshots>
            <enabled>false</enabled>
          </snapshots>
    </repository>
    <repository>
      <id>spy</id>
      <name>Spy Repository</name>
      <layout>default</layout>
      <url>http://files.couchbase.com/maven2/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
       
  </repositories>
  <parent>
                <artifactId>master-master</artifactId>
                <groupId>com.company</groupId>
                <version>0</version>
        </parent>
  <dependencies>
        <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <version>1.4.12</version>
      <scope>test</scope>
   </dependency>
   <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-easymock</artifactId>
      <version>1.4.12</version>
      <scope>test</scope>
   </dependency>  
    <dependency>
                        <groupId>org.quartz-scheduler</groupId>
                        <artifactId>quartz</artifactId>
                        <version>1.7.3</version>
                </dependency>      
  
        <dependency>
        <groupId>bouncycastle</groupId>
        <artifactId>bcprov-jdk14</artifactId>
        <version>138</version>
        </dependency>               
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.5</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>ecs</groupId>
      <artifactId>ecs</artifactId>
      <version>1.4.2</version>
      <scope>compile</scope>
    </dependency>  
    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-core</artifactId>
      <version>2.3.1</version>
      <scope>compile</scope>
    </dependency>  
    <dependency>
      <groupId>commons-net</groupId>
      <artifactId>commons-net</artifactId>
      <version>1.4.1</version>
      <scope>compile</scope>
    </dependency> 
   
   <dependency>
    <groupId>commons-codec</groupId>
    <artifactId>commons-codec</artifactId>
    <version>1.4</version>
        </dependency>
   
    <dependency>
      <groupId>com.company</groupId>
      <artifactId>company_spider_HTML_Template</artifactId>
      <version>${versionName}</version>
      
    </dependency> 
    <dependency>
      <groupId>ewin</groupId>
      <artifactId>ewin</artifactId>
      <version>0.0</version>
      <scope>compile</scope>
    </dependency> 
    <dependency>
      <groupId>whatcounts</groupId>
      <artifactId>whatcounts</artifactId>
      <version>0.0</version>
      <scope>compile</scope>
    </dependency> 
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.15</version>
      <scope>compile</scope>
    </dependency>    
    <dependency>
      <groupId>tomcat</groupId>
      <artifactId>catalina</artifactId>
      <version>5.5.23</version>
      <scope>compile</scope>
    </dependency>   
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-core</artifactId>
      <version>5.1.0</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
                <groupId>axis</groupId>
                <artifactId>axis</artifactId>
                <version>1.4</version>
        </dependency>
        <dependency>
                <groupId>xerces</groupId>
                <artifactId>xercesImpl</artifactId>
                <version>2.9.1</version>
        </dependency>
        <dependency>
                <groupId>com.xuggle</groupId>
                <artifactId>xuggle</artifactId>
                <version>3.0</version>
        </dependency>
        <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>1.5.11</version>
        </dependency>
        
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <version>2.4</version>
      <scope>test</scope>
    </dependency>
    <dependency>
          <groupId>org.json</groupId>
          <artifactId>json</artifactId>
          <version>20080701</version>
          <scope>compile</scope>
        </dependency>   
                <dependency>
                  <groupId>net.sf.json-lib</groupId>
                  <artifactId>json-lib</artifactId>
                  <version>2.2.3</version>
                  <classifier>jdk15</classifier>
                </dependency>
        <dependency>
        <groupId>org.owasp.esapi.codecs</groupId>
        <artifactId>owasp-esapi-full-java</artifactId>
        <version>1.4</version>
        <scope>compile</scope>
    </dependency>  
    <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.4</version>
        <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.1.3</version>
            <scope>compile</scope>
    </dependency>
    <dependency>
                <groupId>commons-httpclient</groupId>
                <artifactId>commons-httpclient</artifactId>
                <version>3.1</version>
        </dependency>
        <dependency>
        <groupId>net.sourceforge.jtds</groupId>
        <artifactId>jtds</artifactId>
        <version>1.2</version>
        </dependency>
         <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>3.6</version>
          </dependency>
        <dependency>
      <groupId>com.company</groupId>
      <artifactId>company_logger</artifactId>
      <version>${versionName}</version>
      <scope>compile</scope>
    </dependency> 
        <dependency>
                        <groupId>commons-dbcp</groupId>
                        <artifactId>commons-dbcp</artifactId>
                        <version>1.2.1</version>
                </dependency>
    
                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring</artifactId>
                        <version>2.5.2</version>
                </dependency>

                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-core</artifactId>
                        <version>2.5.2</version>
                </dependency>

                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-web</artifactId>
                        <version>2.5.2</version>
                </dependency>

                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-beans</artifactId>
                        <version>2.5.2</version>
                </dependency>

                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-tx</artifactId>
                        <version>2.5.2</version>
                </dependency>

                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-jms</artifactId>
                        <version>2.5.2</version>
                </dependency>

                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-context</artifactId>
                        <version>2.5.2</version>
                </dependency>

                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-aop</artifactId>
                        <version>2.5.2</version>
                </dependency>

                <dependency>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring-context-support</artifactId>
                        <version>2.5.2</version>
                </dependency>
                
                <dependency>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-test</artifactId>
                    <version>2.5</version>
          </dependency>
                
                
                <dependency>
                    <groupId>javax.media.jai</groupId>
                    <artifactId>jai_core</artifactId>
                    <version>1.0.0</version>
          </dependency>
                <dependency>
                    <groupId>javax.media.jai</groupId>
                    <artifactId>jai_codec</artifactId>
                    <version>1.0.0</version>
          </dependency>
          <dependency>
                <groupId>rhino</groupId>
                <artifactId>js</artifactId>
                <version>1.7R2</version>
        </dependency>
        <dependency>
                <groupId>it.sauronsoftware.ftp4j</groupId>
                <artifactId>ftp4j</artifactId>
                <version>1.5.1</version>
        </dependency>
        <dependency>
                        <groupId>couchbase</groupId>
                    <artifactId>couchbase-client</artifactId>
                    <version>1.1.8</version>
        </dependency>
        <dependency>
        <groupId>spy</groupId>
        <artifactId>spymemcached</artifactId>
        <version>2.8.1</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>spy</groupId>
        <artifactId>spymemcached</artifactId>
        <version>2.8.12</version>
        <scope>provided</scope>
    </dependency>
         <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
      <version>2.2.3</version>
    </dependency>
        
                <dependency>
                    <groupId>net.sf.ehcache</groupId>
                    <artifactId>ehcache</artifactId>
                    <version>1.6.1</version>
                </dependency>
                <dependency>
                <groupId>org.springmodules</groupId>
                <artifactId>spring-modules-cache</artifactId>
                <version>0.8a</version>
                 <exclusions>
                    <exclusion>
                        <groupId>org.springframework</groupId>
                        <artifactId>spring</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>gigaspaces</groupId>
                        <artifactId>gigaspaces-ce</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jini</groupId>
                        <artifactId>jsk-lib</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jini</groupId>
                        <artifactId>jsk-platform</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jini</groupId>
                        <artifactId>mahalo</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jini</groupId>
                        <artifactId>reggie</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jini</groupId>
                        <artifactId>start</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jini</groupId>
                        <artifactId>boot</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jini</groupId>
                        <artifactId>webster</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>commons-attributes</groupId>
                        <artifactId>commons-attributes-api</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>commons-attributes</groupId>
                        <artifactId>commons-attributes-compiler</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>cglib</groupId>
                        <artifactId>cglib-nodep</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jboss</groupId>
                        <artifactId>javassist</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jboss</groupId>
                        <artifactId>jboss-cache</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jboss</groupId>
                        <artifactId>jboss-common</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jboss</groupId>
                        <artifactId>jboss-jmx</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jboss</groupId>
                        <artifactId>jboss-minimal</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jboss</groupId>
                        <artifactId>jboss-system</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jcs</groupId>
                        <artifactId>jcs</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>jgroups</groupId>
                        <artifactId>jgroups-all</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>geronimo-spec</groupId>
                        <artifactId>geronimo-spec-jta</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>xpp3</groupId>
                        <artifactId>xpp3_min</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>xjavadoc</groupId>
                        <artifactId>xjavadoc</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>opensymphony</groupId>
                        <artifactId>oscache</artifactId>
                    </exclusion>                    
                    <exclusion>
                        <groupId>ehcache</groupId>
                        <artifactId>ehcache</artifactId>
                    </exclusion>                     
                </exclusions>
        </dependency>
        <dependency>
                        <groupId>com.unboundid</groupId>
                        <artifactId>unboundid-ldapsdk</artifactId>
                        <version>2.3.1</version>
                </dependency>
  </dependencies>
  
  <reporting>
                <plugins>
                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>cobertura-maven-plugin</artifactId>
                                 <version>2.5.1</version>
                                <configuration>
                                        <formats>
                                                <format>html</format>
                                        </formats>
                                                
<outputName>TestResults</outputName>
                                </configuration>
                        </plugin>
                </plugins>
        </reporting>
  <build>   
    <directory>${artifactsDir}</directory>
    <plugins>
      <plugin>        
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration> 
          <source>1.6</source>
          <target>1.6</target>
          <verbose>true</verbose>
          <executable>${java.home}/../bin/javac</executable>
        <compilerArgument>-proc:none</compilerArgument>   
        </configuration>
        <inherited>true</inherited>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
                <argLine>-Xms128m -Xmx256m</argLine>
                <forkMode>never</forkMode>
                <skip>true</skip>       
        </configuration>
        
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.5.1</version>
      </plugin>
    </plugins>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <resource>
        <directory>src/main/java</directory>
        <filtering>true</filtering>
        <includes>
          <include>**</include>
        </includes>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
  </build>
</project>





--
View this message in context: 
http://forums.jfrog.org/Artifactory-secure-password-feature-and-maven-tp7579527.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to