kinyelo / vosao

Automatically exported from code.google.com/p/vosao
GNU Lesser General Public License v2.1
1 stars 2 forks source link

make app id, app version, username, email and password properties #400

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
configure properties in pom.xml or overwrite on command line

messy diff attached (IDEA killed some whitespace)

pom.xml:

    <properties>
      <gae.application.id>GAE_APPLICATION_ID</gae.application.id>
      <gae.application.version>vosao-0-8</gae.application.version>
      <vosao.admin.username>USERNAME</vosao.admin.username>
      <vosao.admin.email>EMAIL</vosao.admin.email>
      <vosao.admin.password>PASSWORD</vosao.admin.password>
    </properties>

kernel/pom.xml:

    <build>
      <sourceDirectory>target/filtered-sources/java</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
        </plugins>
      <resources>
        <resource>
          <directory>src/main/java</directory>
          <filtering>true</filtering>
          <targetPath>../filtered-sources/java</targetPath>
        </resource>
        <resource>
          <directory>src/main/resources</directory>
          <filtering>true</filtering>
        </resource>
      </resources>
    </build>

appengine-web.xml:

    <application>${gae.application.id}</application>
    <version>${gae.application.version}</version>

SetupBeanImpl:

    private void initUsers() {
        List<UserEntity> admins = getDao().getUserDao().getByRole(UserRole.ADMIN);
        if (admins.size() == 0) {
            UserEntity admin = new UserEntity("${vosao.admin.username)", BCrypt.hashpw("${vosao.admin.password}", BCrypt.gensalt()), "${vosao.admin.email}", UserRole.ADMIN);
            getDao().getUserDao().save(admin);
            log.info("Adding admin user ${vosao.admin.username}.");
        }
    }

Original issue reported on code.google.com by google@oliverlietz.de on 24 Dec 2010 at 11:42

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by kinyelo@gmail.com on 26 Dec 2010 at 9:27

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r978.

Original comment by kinyelo@gmail.com on 2 Jan 2011 at 8:31