Wednesday, April 13, 2016

Maven maven-antrun-plugin run executions in various phases

Maven maven-antrun-plugin run executions in various phases.
This is an example of that:


<plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <version>1.8</version>
    <executions>
        <execution>
            <id>1</id>
            <phase>generate-test-resources</phase>
            <configuration>
                <target>
                    <echo message="%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"/>
                    <echo message="run - generate-test-resources"/>
                    <echo message="%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"/>
                </target>
            </configuration>
            <goals>
                <goal>run</goal>
            </goals>
        </execution>
        <execution>
            <id>2</id>
            <phase>generate-resources</phase>
            <configuration>
                <target>
                    <echo message="%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"/>
                    <echo message="run - generate-resources"/>
                    <echo message="%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"/>
                </target>
            </configuration>
            <goals>
                <goal>run</goal>
            </goals>
        </execution>
        <execution>
            <id>443-4</id>
            <phase>process-test-classes</phase>
            <configuration>
                <target>
                    <echo message="%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"/>
                    <echo message="process-test-classes"/>
                    <echo message="%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"/>
                    <fail/>
                </target>
            </configuration>
            <goals>
                <goal>run</goal>
            </goals>
        </execution>
        <execution>
            <id>3</id>
            <phase>test</phase>
            <configuration>
                <target>
                    <echo message="%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"/>
                    <echo message="DOES NOT RUN ! test"/>
                    <echo message="%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"/>
                </target>
            </configuration>
            <goals>
                <goal>run</goal>
            </goals>
        </execution>
    </executions>
</plugin>

Tuesday, April 12, 2016

Disable Windows Maintenance on in a VM

Seems like it isn't worth it to let Windows do Maintenance on in a VM.
Turn it off like this:

Start -> Task Scheduler
Task Scheduler Library -> Microsoft -> Windows -> Task Scheduler

Turn it off in 2 places:

Regular Maintenance -> Context Menu -> Disable
Idle Maintenance -> Context Menu -> Disable


Thursday, April 7, 2016

Postgres getting the description of a table, specifically column names

Do this:

SELECT column_name, data_type FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'table_name_goes_here';