You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@archiva.apache.org by Joakim Erdfelt <jo...@erdfelt.com> on 2007/10/21 18:02:16 UTC

Re: svn commit: r586858 - /maven/archiva/trunk/archiva-web/archiva-webapp/src/appserver-base/conf/archiva.xml

Can you wrap this into a profile?
Like we do for the mysql / postgres options?
This makes testing large repositories rather difficult, as I have to 
reconfigure every time now.
It also appears that this is showing up in the standalone plexus 
application, making user level configuration impossible that way too.

- Joakim

brett@apache.org wrote:
> Author: brett
> Date: Sat Oct 20 22:20:38 2007
> New Revision: 586858
>
> URL: http://svn.apache.org/viewvc?rev=586858&view=rev
> Log:
> add a configuration file for jetty:run so that it doesn't create ~/.m2/archiva.xml - make testing isolated
>
> Added:
>     maven/archiva/trunk/archiva-web/archiva-webapp/src/appserver-base/conf/archiva.xml   (with props)
>
> Added: maven/archiva/trunk/archiva-web/archiva-webapp/src/appserver-base/conf/archiva.xml
> URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/appserver-base/conf/archiva.xml?rev=586858&view=auto
> ==============================================================================
> --- maven/archiva/trunk/archiva-web/archiva-webapp/src/appserver-base/conf/archiva.xml (added)
> +++ maven/archiva/trunk/archiva-web/archiva-webapp/src/appserver-base/conf/archiva.xml Sat Oct 20 22:20:38 2007
> @@ -0,0 +1,169 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<configuration>
> +  <version>2</version>
> +  <managedRepositories>
> +    <managedRepository>
> +      <id>internal</id>
> +      <name>Archiva Managed Internal Repository</name>
> +      <location>${appserver.base}/data/repositories/internal</location>
> +      <layout>default</layout>
> +      <releases>true</releases>
> +      <snapshots>false</snapshots>
> +      <scanned>true</scanned>
> +      <refreshCronExpression>0 0 0 * * ?</refreshCronExpression>
> +      <daysOlder>30</daysOlder>
> +    </managedRepository>
> +    <managedRepository>
> +      <id>snapshots</id>
> +      <name>Archiva Managed Snapshot Repository</name>
> +      <location>${appserver.base}/data/repositories/snapshots</location>
> +      <layout>default</layout>
> +      <releases>false</releases>
> +      <snapshots>true</snapshots>
> +      <scanned>true</scanned>
> +      <refreshCronExpression>0 0\,30 0 * * ?</refreshCronExpression>
> +      <daysOlder>30</daysOlder>
> +    </managedRepository>
> +  </managedRepositories>
> +  <remoteRepositories>
> +    <remoteRepository>
> +      <id>central</id>
> +      <name>Central Repository</name>
> +      <url>http://repo1.maven.org/maven2</url>
> +      <layout>default</layout>
> +    </remoteRepository>
> +    <remoteRepository>
> +      <id>maven2-repository.dev.java.net</id>
> +      <name>Java.net Repository for Maven 2</name>
> +      <url>http://download.java.net/maven/2/</url>
> +      <layout>default</layout>
> +    </remoteRepository>
> +  </remoteRepositories>
> +
> +  <proxyConnectors>
> +    <proxyConnector>
> +      <sourceRepoId>internal</sourceRepoId>
> +      <targetRepoId>central</targetRepoId>
> +      <proxyId/>
> +      <policies>
> +        <snapshots>disabled</snapshots>
> +        <releases>once</releases>
> +        <checksum>fix</checksum>
> +        <cache-failures>cached</cache-failures>
> +      </policies>
> +      <whiteListPatterns>
> +        <whiteListPattern>**/*</whiteListPattern>
> +      </whiteListPatterns>
> +    </proxyConnector>
> +    <proxyConnector>
> +      <sourceRepoId>internal</sourceRepoId>
> +      <targetRepoId>maven2-repository.dev.java.net</targetRepoId>
> +      <proxyId/>
> +      <policies>
> +        <snapshots>disabled</snapshots>
> +        <releases>once</releases>
> +        <checksum>fix</checksum>
> +        <cache-failures>cached</cache-failures>
> +      </policies>
> +      <whiteListPatterns>
> +        <whiteListPattern>javax/**</whiteListPattern>
> +      </whiteListPatterns>
> +    </proxyConnector>
> +  </proxyConnectors>
> +
> +  <repositoryScanning>
> +    <fileTypes>
> +      <fileType>
> +        <id>artifacts</id>
> +        <patterns>
> +          <pattern>**/*.pom</pattern>
> +          <pattern>**/*.jar</pattern>
> +          <pattern>**/*.ear</pattern>
> +          <pattern>**/*.war</pattern>
> +          <pattern>**/*.car</pattern>
> +          <pattern>**/*.sar</pattern>
> +          <pattern>**/*.mar</pattern>
> +          <pattern>**/*.rar</pattern>
> +          <pattern>**/*.dtd</pattern>
> +          <pattern>**/*.tld</pattern>
> +          <pattern>**/*.tar.gz</pattern>
> +          <pattern>**/*.tar.bz2</pattern>
> +          <pattern>**/*.zip</pattern>
> +        </patterns>
> +      </fileType>
> +      <fileType>
> +        <id>indexable-content</id>
> +        <patterns>
> +          <pattern>**/*.txt</pattern>
> +          <pattern>**/*.TXT</pattern>
> +          <pattern>**/*.block</pattern>
> +          <pattern>**/*.config</pattern>
> +          <pattern>**/*.pom</pattern>
> +          <pattern>**/*.xml</pattern>
> +          <pattern>**/*.xsd</pattern>
> +          <pattern>**/*.dtd</pattern>
> +          <pattern>**/*.tld</pattern>
> +        </patterns>
> +      </fileType>
> +      <fileType>
> +        <id>auto-remove</id>
> +        <patterns>
> +          <pattern>**/*.bak</pattern>
> +          <pattern>**/*~</pattern>
> +          <pattern>**/*-</pattern>
> +        </patterns>
> +      </fileType>
> +      <fileType>
> +        <id>ignored</id>
> +        <patterns>
> +          <pattern>**/.htaccess</pattern>
> +          <pattern>**/KEYS</pattern>
> +          <pattern>**/*.rb</pattern>
> +          <pattern>**/*.sh</pattern>
> +          <pattern>**/.svn/**</pattern>
> +          <pattern>**/.DAV/**</pattern>
> +        </patterns>
> +      </fileType>
> +    </fileTypes>
> +    <knownContentConsumers>
> +      <knownContentConsumer>update-db-artifact</knownContentConsumer>
> +      <knownContentConsumer>create-missing-checksums</knownContentConsumer>
> +      <knownContentConsumer>update-db-repository-metadata</knownContentConsumer>
> +      <knownContentConsumer>validate-checksum</knownContentConsumer>
> +      <knownContentConsumer>validate-signature</knownContentConsumer>
> +      <knownContentConsumer>index-content</knownContentConsumer>
> +      <knownContentConsumer>auto-remove</knownContentConsumer>
> +      <knownContentConsumer>auto-rename</knownContentConsumer>
> +      <knownContentConsumer>metadata-updater</knownContentConsumer>
> +      <!--knownContentConsumer>repository-purge</knownContentConsumer-->
> +    </knownContentConsumers>
> +    <invalidContentConsumers>
> +      <invalidContentConsumer>update-db-bad-content</invalidContentConsumer>
> +    </invalidContentConsumers>
> +  </repositoryScanning>
> +
> +  <databaseScanning>
> +    <cronExpression>0 0 0 * * ?</cronExpression>
> +    <unprocessedConsumers>
> +      <unprocessedConsumer>index-artifact</unprocessedConsumer>
> +      <unprocessedConsumer>update-db-project</unprocessedConsumer>
> +      <unprocessedConsumer>validate-repository-metadata</unprocessedConsumer>
> +      <unprocessedConsumer>index-archive-toc</unprocessedConsumer>
> +      <unprocessedConsumer>update-db-bytecode-stats</unprocessedConsumer>
> +      <unprocessedConsumer>index-public-methods</unprocessedConsumer>
> +    </unprocessedConsumers>
> +    <cleanupConsumers>
> +      <cleanupConsumer>not-present-remove-db-artifact</cleanupConsumer>
> +      <cleanupConsumer>not-present-remove-db-project</cleanupConsumer>
> +      <cleanupConsumer>not-present-remove-indexed</cleanupConsumer>
> +    </cleanupConsumers>
> +  </databaseScanning>
> +
> +  <webapp>
> +    <ui>
> +      <showFindArtifacts>true</showFindArtifacts>
> +      <appletFindEnabled>true</appletFindEnabled>
> +    </ui>
> +  </webapp>
> +
> +</configuration>
>
> Propchange: maven/archiva/trunk/archiva-web/archiva-webapp/src/appserver-base/conf/archiva.xml
> ------------------------------------------------------------------------------
>     svn:eol-style = native
>
>
>   


-- 
- Joakim Erdfelt
  joakim@erdfelt.com
  Open Source Software (OSS) Developer


Re: svn commit: r586858 - /maven/archiva/trunk/archiva-web/archiva-webapp/src/appserver-base/conf/archiva.xml

Posted by Brett Porter <br...@apache.org>.
On 23/10/2007, at 11:09 AM, Joakim Erdfelt wrote:

>>
>> I use -Dappserver.base=/path/to/other-install, but only when I  
>> need to test the other data. Do you need to test a large  
>> repository every time you test the webapp?
>
> This doesn't work.
> It loads both files resulting in a "Configuration can not be saved  
> when it is loaded from two sources" error when loaded this way ...
>
> [archiva-webapp]$ mvn -Dappserver.base=$HOME/java/archiva clean  
> jetty:run
>
> The $HOME/java/archiva directory has a conf, log, and repos,  
> subdirectory.
> The $HOME/java/archiva/conf/archiva.xml file contains my desired  
> configuration.

This is when you have ~/.m2/archiva.xml that contains repositories  
too, since the current logic is to merge them.

I would document that (unless you know what you are doing), it would  
be better to use one or the other. It's not realistic for that to be  
~/.m2/archiva.xml in a development environment since there can be  
only one. I suggest this is the best way to address it right now -  
through documentation.

You can also see my extensive comments in  
DefaultArchivaConfiguration's javadoc (I think they still apply,  
though I'm not sure since you made a lot of changes in there - it  
appears since the tests still hold they would).

Cheers,
Brett

--
Brett Porter - brett@apache.org
Blog: http://www.devzuz.org/blogs/bporter/

Re: svn commit: r586858 - /maven/archiva/trunk/archiva-web/archiva-webapp/src/appserver-base/conf/archiva.xml

Posted by Joakim Erdfelt <jo...@erdfelt.com>.
Brett Porter wrote:
>
> On 22/10/2007, at 2:02 AM, Joakim Erdfelt wrote:
>
>> Can you wrap this into a profile?
>
> I thought about that, but the idea is to have it by default so that if 
> I forget an option I get a sensible default. Otherwise, I accidentally 
> hose my actual "production" install on the same machine by the 
> appearance of ~/.m2/archiva.xml
>
>> Like we do for the mysql / postgres options?
>> This makes testing large repositories rather difficult, as I have to 
>> reconfigure every time now.
>
> I use -Dappserver.base=/path/to/other-install, but only when I need to 
> test the other data. Do you need to test a large repository every time 
> you test the webapp?

This doesn't work.
It loads both files resulting in a "Configuration can not be saved when 
it is loaded from two sources" error when loaded this way ...

[archiva-webapp]$ mvn -Dappserver.base=$HOME/java/archiva clean jetty:run

The $HOME/java/archiva directory has a conf, log, and repos, subdirectory.
The $HOME/java/archiva/conf/archiva.xml file contains my desired 
configuration.

>
>> It also appears that this is showing up in the standalone plexus 
>> application, making user level configuration impossible that way too.
>
> I'm not sure what you are referring to here?
>
> I'm happy to roll it back if it's inconveniencing anyone else, I just 
> wanted to go for the safer option by default.

See my recent note on the 1.0-beta-3 release.
Still tracking down what files it thinks it has loaded.

-- 
- Joakim Erdfelt
  joakim@erdfelt.com
  Open Source Software (OSS) Developer


Re: svn commit: r586858 - /maven/archiva/trunk/archiva-web/archiva-webapp/src/appserver-base/conf/archiva.xml

Posted by Brett Porter <br...@apache.org>.
On 22/10/2007, at 2:02 AM, Joakim Erdfelt wrote:

> Can you wrap this into a profile?

I thought about that, but the idea is to have it by default so that  
if I forget an option I get a sensible default. Otherwise, I  
accidentally hose my actual "production" install on the same machine  
by the appearance of ~/.m2/archiva.xml

> Like we do for the mysql / postgres options?
> This makes testing large repositories rather difficult, as I have  
> to reconfigure every time now.

I use -Dappserver.base=/path/to/other-install, but only when I need  
to test the other data. Do you need to test a large repository every  
time you test the webapp?

> It also appears that this is showing up in the standalone plexus  
> application, making user level configuration impossible that way too.

I'm not sure what you are referring to here?

I'm happy to roll it back if it's inconveniencing anyone else, I just  
wanted to go for the safer option by default.

Cheers,
Brett

--
Brett Porter - brett@apache.org
Blog: http://www.devzuz.org/blogs/bporter/