Skip to content

Commit

Permalink
Configured CI (#16)
Browse files Browse the repository at this point in the history
Closes #10.
  • Loading branch information
claudiow authored and dblock committed Jul 5, 2016
1 parent 8d16303 commit 6c249df
Show file tree
Hide file tree
Showing 16 changed files with 322 additions and 228 deletions.
38 changes: 19 additions & 19 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
build/date.properties
log4jna/src/win32dll/EventLogCategories.h
log4jna/src/win32dll/EventLogCategories.rc
log4jna/src/win32dll/MSG00001.bin
log4jna/src/win32dll/Win32EventLogAppender.res
log4jna/src/win32dll/target/
log4jna/src/win32dll/version.rc
demo/bin
demo/build
demo/lib
log4jna/bin
log4jna/build
log4jna/doc
log4jna/lib-test
log4jna/lib
log4jna/test
target
.settings

build/date.properties
log4jna/src/win32dll/EventLogCategories.h
log4jna/src/win32dll/EventLogCategories.rc
log4jna/src/win32dll/MSG00001.bin
log4jna/src/win32dll/Win32EventLogAppender.res
log4jna/src/win32dll/target/
log4jna/src/win32dll/version.rc
demo/bin
demo/build
demo/lib
log4jna/bin
log4jna/build
log4jna/doc
log4jna/lib-test
log4jna/lib
log4jna/test
target
.settings

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Log4JNA
=======
[![Build status](https://ci.appveyor.com/api/projects/status/dre9sl70e8wegiti/branch/maven-conversion?svg=true)](https://ci.appveyor.com/project/claudiow/log4jna/branch/maven-conversion)

![Log4JNA](https://github.com/dblock/log4jna/raw/master/log4jna.jpg?raw=true "Log4JNA")

Expand Down
32 changes: 32 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: 2.0.{build}
os: Windows Server 2012
branches:
only:
- maven-conversion
install:
- ps: |
Add-Type -AssemblyName System.IO.Compression.FileSystem
if (!(Test-Path -Path "C:\maven" )) {
(new-object System.Net.WebClient).DownloadFile(
'http://www.us.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip',
'C:\maven-bin.zip'
)
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven")
}
- cmd: SET MAVEN_HOME=C:\maven\apache-maven-3.3.9
- cmd: SET PATH=%MAVEN_HOME%\bin;%JAVA_HOME%\bin;%PATH%
- cmd: SET MAVEN_OPTS=-XX:MaxPermSize=2g -Xmx4g
- cmd: SET JAVA_OPTS=-Xmx4g
- cmd: mvn -version
- cmd: javac -version

# For build and test we need to pass -Djna.nosys=true to avoid exception:
# java.lang.UnsatisfiedLinkError: Can't obtain updateLastError method for class com.sun.jna.Native
build_script:
- mvn clean install -B -Djna.nosys=true

test_script:
- mvn clean -B test -Djna.nosys=true
cache:
- C:\maven\apache-maven-3.3.9
- '%USERPROFILE%\.m2'
2 changes: 1 addition & 1 deletion assembly/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/.settings/
/.settings/
2 changes: 1 addition & 1 deletion demo/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/.settings/
/.settings/
114 changes: 57 additions & 57 deletions demo/src/main/resources/log4j2-application.xml
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="TRACE">
<Properties>
<!--
|
| Win32EventLogAppender.dll location.
|
| Use this configuration to use the dll from your local Maven repository
|
| 1 - Add or uncomment the dll dependency in your pom file using the following dependency declaration.
|
| <dependency>
| <groupId>org.apache.log4jna</groupId>
| <artifactId>Win32EventLogAppender</artifactId>
| <version>2.0</version>
| <type>dll</type>
| </dependency>
|
| 2 - Uncomment the property
| 3 - Replace <%userprofile%> with your actual local maven repository location.
| 4 - Perform the required modifications in you registry using regedit.
| -->
<!-- Property name="dllfile">
<%userprofile%>\.m2\repository\org\apache\log4jna\Win32EventLogAppender\2.0\Win32EventLogAppender.dll
</Property -->

<!--
| Use this configuration to use the dll from the test resources directory
| 1 - Uncomment the property
| 2 - Replace <workspace> with the actual directory of your project workspace
| -->
<!-- Property name="dllfile">
<workspace>\src\test\resources\Win32EventLogAppender.dll
</Property -->

<Property name="dllfile">
C:\Users\claudiow\git\log4jna\src\main\resources\Win32EventLogAppender.dll
</Property>

</Properties>
<Appenders>
<Console name="console-log" target="SYSTEM_OUT" level="debug">
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %l - %msg%n" />
</Console>

<Win32EventLog name="Win32EventLog" source="Log4jnaTest" log="Application" eventMessageFile="${dllfile}"
categoryMessageFile="${dllfile}">
<PatternLayout pattern="%-5p [%t] %m%n" />
</Win32EventLog>
</Appenders>
<Loggers>
<Root level="trace">
<appender-ref ref="Win32EventLog" />
<appender-ref ref="console-log" />
</Root>
</Loggers>
</Configuration>
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="TRACE">
<Properties>
<!--
|
| Win32EventLogAppender.dll location.
|
| Use this configuration to use the dll from your local Maven repository
|
| 1 - Add or uncomment the dll dependency in your pom file using the following dependency declaration.
|
| <dependency>
| <groupId>org.apache.log4jna</groupId>
| <artifactId>Win32EventLogAppender</artifactId>
| <version>2.0</version>
| <type>dll</type>
| </dependency>
|
| 2 - Uncomment the property
| 3 - Replace <%userprofile%> with your actual local maven repository location.
| 4 - Perform the required modifications in you registry using regedit.
| -->
<!-- Property name="dllfile">
<%userprofile%>\.m2\repository\org\apache\log4jna\Win32EventLogAppender\2.0\Win32EventLogAppender.dll
</Property -->

<!--
| Use this configuration to use the dll from the test resources directory
| 1 - Uncomment the property
| 2 - Replace <workspace> with the actual directory of your project workspace
| -->
<!-- Property name="dllfile">
<workspace>\src\test\resources\Win32EventLogAppender.dll
</Property -->

<Property name="dllfile">
C:\Users\claudiow\git\log4jna\src\main\resources\Win32EventLogAppender.dll
</Property>

</Properties>
<Appenders>
<Console name="console-log" target="SYSTEM_OUT" level="debug">
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %l - %msg%n" />
</Console>

<Win32EventLog name="Win32EventLog" source="Log4jnaTest" log="Application" eventMessageFile="${dllfile}"
categoryMessageFile="${dllfile}">
<PatternLayout pattern="%-5p [%t] %m%n" />
</Win32EventLog>
</Appenders>
<Loggers>
<Root level="trace">
<appender-ref ref="Win32EventLog" />
<appender-ref ref="console-log" />
</Root>
</Loggers>
</Configuration>
118 changes: 59 additions & 59 deletions demo/src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="TRACE">
<Properties>
<!--
|
| Win32EventLogAppender.dll location.
|
| Use this configuration to use the dll from your local Maven repository
|
| 1 - Add or uncomment the dll dependency in your pom file using the following dependency declaration.
|
| <dependency>
| <groupId>org.apache.log4jna</groupId>
| <artifactId>Win32EventLogAppender</artifactId>
| <version>2.0</version>
| <type>dll</type>
| </dependency>
|
| 2 - Uncomment the property
| 3 - Replace <%userprofile%> with your actual local maven repository location.
| 4 - Perform the required modifications in you registry using regedit.
| -->
<!-- Property name="dllfile">
<%userprofile%>\.m2\repository\org\apache\log4jna\Win32EventLogAppender\2.0\Win32EventLogAppender.dll
</Property -->

<!--
| Use this configuration to use the dll from the test resources directory
| 1 - Uncomment the property
| 2 - Replace <workspace> with the actual directory of your project workspace
| -->
<!-- Property name="dllfile">
<workspace>\src\test\resources\Win32EventLogAppender.dll
</Property -->

<Property name="dllfile">src\main\resources\Win32EventLogAppender.dll</Property>

</Properties>
<Appenders>
<Console name="console-log" target="SYSTEM_OUT" level="debug">
<PatternLayout
pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %l - %msg%n" />
</Console>

<Win32EventLog name="Win32EventLog" source="WinLogger"
log="Win32LogApplication"
eventMessageFile="${dllfile}"
categoryMessageFile="${dllfile}"
class="org.apache.log4jna.nt.Win32EventLogAppender">
<PatternLayout pattern="%-5p [%t] %m%n" />
</Win32EventLog>
</Appenders>
<Loggers>
<Root level="trace">
<appender-ref ref="Win32EventLog" />
<appender-ref ref="console-log" />
</Root>
</Loggers>
</Configuration>
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="TRACE">
<Properties>
<!--
|
| Win32EventLogAppender.dll location.
|
| Use this configuration to use the dll from your local Maven repository
|
| 1 - Add or uncomment the dll dependency in your pom file using the following dependency declaration.
|
| <dependency>
| <groupId>org.apache.log4jna</groupId>
| <artifactId>Win32EventLogAppender</artifactId>
| <version>2.0</version>
| <type>dll</type>
| </dependency>
|
| 2 - Uncomment the property
| 3 - Replace <%userprofile%> with your actual local maven repository location.
| 4 - Perform the required modifications in you registry using regedit.
| -->
<!-- Property name="dllfile">
<%userprofile%>\.m2\repository\org\apache\log4jna\Win32EventLogAppender\2.0\Win32EventLogAppender.dll
</Property -->

<!--
| Use this configuration to use the dll from the test resources directory
| 1 - Uncomment the property
| 2 - Replace <workspace> with the actual directory of your project workspace
| -->
<!-- Property name="dllfile">
<workspace>\src\test\resources\Win32EventLogAppender.dll
</Property -->

<Property name="dllfile">src\main\resources\Win32EventLogAppender.dll</Property>

</Properties>
<Appenders>
<Console name="console-log" target="SYSTEM_OUT" level="debug">
<PatternLayout
pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %l - %msg%n" />
</Console>

<Win32EventLog name="Win32EventLog" source="WinLogger"
log="Win32LogApplication"
eventMessageFile="${dllfile}"
categoryMessageFile="${dllfile}"
class="org.apache.log4jna.nt.Win32EventLogAppender">
<PatternLayout pattern="%-5p [%t] %m%n" />
</Win32EventLog>
</Appenders>
<Loggers>
<Root level="trace">
<appender-ref ref="Win32EventLog" />
<appender-ref ref="console-log" />
</Root>
</Loggers>
</Configuration>
62 changes: 31 additions & 31 deletions log4jna-api/.classpath
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
1 change: 0 additions & 1 deletion log4jna-api/.gitignore

This file was deleted.

Loading

0 comments on commit 6c249df

Please sign in to comment.