Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combine API, core, mock, servlet, and jass into single jar file #26

Merged
merged 2 commits into from
Aug 22, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 30 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,46 @@
1.5 (Next Release)
==================

This release unifies support for various Java platforms in a single released package and significantly improves development infrastructure.
This release unifies support for various Java platforms within a single package and significantly improves development infrastructure.

Features
--------

* Waffle now requires Java 1.6 or newer, uses generics where possible - [@hazendaz](https://github.com/hazendaz).
* Using JNA 3.4.2 (currently private build) - [@dblock](https://github.com/dblock).
* Refactored `waffle-jna.jar` into several distinct packages - [@dblock](https://github.com/dblock).
* Waffle now requires JNA 3.4.2 (currently private build) - [@dblock](https://github.com/dblock).
* The `waffle-jna.jar` has been split into separate packages - [@dblock](https://github.com/dblock).
* `waffle-api.jar`: API interfaces.
* `waffle-core.jar` : Core JNA-based implementation.
* `waffle-mock.jar` : Minimal HTTP Servlet mocks, used in tests.
* `waffle-jaas.jar` : JAAS support.
* `waffle-servlet.jar`: Generic Servlet filters.
* `waffle-servlet3.jar`: Generic Servlet3 filters.
* `waffle-spring-security2.jar`: Spring-security 2.
* `waffle-spring-security3.jar`: Spring-security 3.
* `waffle-tomcat-5.jar` : Tomcat 5 valves.
* `waffle-tomcat-6.jar` : Tomcat 6 valves.
* `waffle-tomcat-7.jar` : Tomcat 7 valves.
* Rewritten documentation in Markdown, the CHM documentation has been removed - [@dblock](https://github.com/dblock).
* [#3](https://github.com/dblock/waffle/pull/3): Replaced `commons-logging` with `slf4j` and `logback` - [@hazendaz](https://github.com/hazendaz).
* Use jcl over slf4j for Spring, as it uses `commons-logging`.
* Jacob-based COM interfaces and implementation have been removed - [@dblock](https://github.com/dblock).
* [#1](https://github.com/dblock/waffle/pull/1): Adjusted logging from info to debug to reduce noise level - [@mcfly83](https://github.com/mcfly83).
* [#17](https://github.com/dblock/waffle/pull/17): JAR manifest information includes specification and implementation details, such as GIT revision - [@ryantxu](https://github.com/ryantxu).
* [#23] Added `waffle.util.WaffleInfo` which collects system information useful for debugging - [@ryantxu](https://github.com/ryantxu).

Interface Changes
-----------------

* Waffle `boolean` getters now use `is*` java standard - [@hazendaz](https://github.com/hazendaz).
* `getContinue` is now `isContinue`
* `getDebug` is now `isDebug`
* `getAllowGuestLogin` is now `isAllowGuestLogin`
* `getImpersonate` is now `isImpersonate`
* Fixed case of `RevertToSelf`, now `revertToSelf` - [@hazendaz](https://github.com/hazendaz).
* All array getters now return empty arrays rather than `null` - [@hazendaz](https://github.com/hazendaz).

Development
-----------

* Upgraded thirdparty dependencies, using Ivy - [@hazendaz](https://github.com/hazendaz).
* tomcat 5.5.35
* tomcat 6.0.35
Expand All @@ -26,28 +50,12 @@ This release unifies support for various Java platforms in a single released pac
* spring 2.5.6.SEC03
* spring-security 2.0.7
* spring-security 3.1.1
* junit 4.10 - all tests now use junit 4 style rather than junit 3 style
* junit 4.10
* emma 2.1.5320
* Documentation has been rewritten in Markdown, R.I.P. CHM - [@dblock](https://github.com/dblock).
* [#3](https://github.com/dblock/waffle/pull/3): Converted commons-logging to slf4j logging - [@hazendaz](https://github.com/hazendaz).
* Added slf4j.
* Added jcl over slf4j jar for spring as it still uses commons-logging.
* Added logback for native slf4j solution.
* Added sample xml files for logback solution to all demos.
* [#1](https://github.com/dblock/waffle/pull/1): Adjusted logging from info to debug to reduce noise level - [@mcfly83](https://github.com/mcfly83).
* Removed previously deprecated Jacob-based COM interfaces and implementation - [@dblock](https://github.com/dblock).
* [#17](https://github.com/dblock/waffle/pull/17): JAR manifest information includes specification and implementation details, such as GIT revision - [@ryantxu](https://github.com/ryantxu).
* Reworked development version to use ivy - [@hazendaz](https://github.com/hazendaz).
* Removed all third party included jars.
* Retained tomcat 5.5.35 due to ivy/maven only having 5.5.23 available.
* Waffle `boolean` getters now use `is*` java standard - [@hazendaz](https://github.com/hazendaz).
* `getContinue` is now `isContinue`
* `getDebug` is now `isDebug`
* `getAllowGuestLogin` is now `isAllowGuestLogin`
* `getImpersonate` is now `isImpersonate`
* `RevertToSelf` case fix, is now `revertToSelf` - [@hazendaz](https://github.com/hazendaz).
* All array getters now return empty arrays rather than `null` - [@hazendaz](https://github.com/hazendaz).
* [#24](https://github.com/dblock/waffle/pull/24): Using mockito for waffle-mock - [@ryantxu](https://github.com/ryantxu).
* [#24](https://github.com/dblock/waffle/pull/24): Use mockito for waffle-mock - [@ryantxu](https://github.com/ryantxu).

1.4 (6/21/2011)
===============
Expand Down
6 changes: 1 addition & 5 deletions Source/JNA/build.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<project name="waffle-jna" basedir="." default="build">
<target name="recurse">
<ant dir="waffle-api" target="${ant.target}" />
<ant dir="waffle-mock" target="${ant.target}" />
<ant dir="waffle-core" target="${ant.target}" />
<ant dir="waffle-jaas" target="${ant.target}" />
<ant dir="waffle-servlet" target="${ant.target}" />
<ant dir="waffle-jna" target="${ant.target}" />
<ant dir="waffle-tomcat5" target="${ant.target}" />
<ant dir="waffle-tomcat6" target="${ant.target}" />
<ant dir="waffle-tomcat7" target="${ant.target}" />
Expand Down
2 changes: 1 addition & 1 deletion Source/JNA/build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<path refid="jna.classpath" />
<path refid="slf4j.classpath" />
<path refid="guava.classpath" />
<path refid="mockito.classpath" />
</path>
<macrodef name="compile">
<attribute name="optimize" />
Expand Down Expand Up @@ -117,7 +118,6 @@
<fileset dir="${waffle.test.lib}">
<include name="**/*Tests.class" />
<exclude name="**/*LoadTests.class" />
<exclude name="**/*All*Tests.class" />
</fileset>
</batchtest>
<formatter type="xml" />
Expand Down
8 changes: 0 additions & 8 deletions Source/JNA/waffle-api/.classpath

This file was deleted.

8 changes: 0 additions & 8 deletions Source/JNA/waffle-api/build.xml

This file was deleted.

Empty file.
14 changes: 0 additions & 14 deletions Source/JNA/waffle-core/.classpath

This file was deleted.

17 changes: 0 additions & 17 deletions Source/JNA/waffle-core/.project

This file was deleted.

13 changes: 0 additions & 13 deletions Source/JNA/waffle-core/build.xml

This file was deleted.

40 changes: 0 additions & 40 deletions Source/JNA/waffle-core/src-test/waffle/AllTestSuites.java

This file was deleted.

37 changes: 0 additions & 37 deletions Source/JNA/waffle-core/src-test/waffle/util/AllUtilTests.java

This file was deleted.

76 changes: 76 additions & 0 deletions Source/JNA/waffle-core/src-test/waffle/util/WaffleInfoTests.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*******************************************************************************
* Waffle (https://github.com/dblock/waffle)
*
* Copyright (c) 2010 Application Security, Inc.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http:https://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Application Security, Inc.
*******************************************************************************/
package waffle.util;

import static org.junit.Assert.assertEquals;

import javax.xml.parsers.ParserConfigurationException;

import org.junit.Test;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import waffle.windows.auth.IWindowsAccount;
import waffle.windows.auth.IWindowsAuthProvider;
import waffle.windows.auth.IWindowsComputer;
import waffle.windows.auth.impl.WindowsAccountImpl;
import waffle.windows.auth.impl.WindowsAuthProviderImpl;

import com.sun.jna.Platform;

/**
* Build an info document and check that it has the right values
*/
public class WaffleInfoTests {

@Test
public void testWaffleInfo() throws ParserConfigurationException {
WaffleInfo helper = new WaffleInfo();
Document info = helper.getWaffleInfo();

// Make sure JNA Version is properly noted
assertEquals(Platform.class.getPackage().getImplementationVersion(),
info.getDocumentElement().getAttribute("jna"));

Node node = info.getDocumentElement() // waffle
.getFirstChild() // auth
.getFirstChild() // currentUser
.getNextSibling(); // computer

assertEquals("computer", node.getNodeName());

IWindowsAuthProvider auth = new WindowsAuthProviderImpl();
IWindowsComputer computer = auth.getCurrentComputer();

NodeList nodes = node.getChildNodes();
assertEquals(computer.getComputerName(), nodes.item(0).getTextContent());
assertEquals(computer.getMemberOf(), nodes.item(1).getTextContent());
assertEquals(computer.getJoinStatus(), nodes.item(2).getTextContent());

// Add Lookup Info for Various accounts
String lookup = WindowsAccountImpl.getCurrentUsername();
IWindowsAccount account = new WindowsAccountImpl(lookup);
Element elem = helper.getLookupInfo(info, lookup);
assertEquals(lookup, elem.getAttribute("name"));
assertEquals(account.getName(), elem.getFirstChild().getTextContent());

// Report an error when unknown name
lookup = "__UNKNOWN_ACCOUNT_NAME___";
elem = helper.getLookupInfo(info, lookup);
assertEquals(lookup, elem.getAttribute("name"));
assertEquals("exception", elem.getFirstChild().getNodeName());
}
}

This file was deleted.

Loading