Acegi Security release 0.7.0 is out

The long awaited 0.7.0 relase of Acegi Security System for Spring is out. I’m happy to have contributed (just a bit) to this great project. And it is built with maven!!

Dear Spring Community

I’m pleased to announce the Acegi Security System for Spring release 0.7.0 is now available from http://acegisecurity.sourceforge.net. The project provides comprehensive security services for The Spring Framework. You can read about the features in detail at http://acegisecurity.sourceforge.net.

There are many changes, improvements and fixes in release 0.7.0 (as listed at http://acegisecurity.sourceforge.net/changes-report.html). The major new feature areas are:

* Significant improvements to ACL security services

* AspectJ support (useful for instance-level security)

* Refactoring of ObjectDefinitionSources (especially useful for web URI security)

* Automatic propagation of security identity via RMI and HttpInvoker

* Integration with Servlet Spec’s getRemoteUser()

* Refactoring of Contacts sample to use the new ACL security services

* Additional event publishing (now includes authorisation, not just authentication)

* CVS restructure to use Maven as the build system

* A new project web site with FAQs, links to external articles etc

The new ACL security services deserve special mention, as they make it possible to develop applications that require complex instance-based security without any custom code. The entire configuration of such applications can be declared in the IoC container using standard Acegi Security services, so this should help significantly improve architecture and development time.

As per the Apache APR project versioning guidelines, this is a major release. We expect the next major release will be 1.0.0, although release 0.7.0 should be considered stable enough for most projects to use. There are detailed upgrade instructions included in the release ZIP and on the Acegi Security home page.

For Maven users, Acegi Security’s latest JARs are available from http://acegisecurity.sourceforge.net/maven/acegisecurity/jars. We will also be adding release 0.7.0 and above to iBiblio.

We hope you find this new release useful in your projects.

Best regards

Ben

Is maven so difficult?

Many people say that Maven is more difficult to use than Ant, I just don’t agree.

I don’t agree that Maven learning curve is steeper than Ant, the fact is that many people already know Ant, but for newbies Maven hides all the low level stuff and can focus in what they want to do instead of how to do it. It’s a kind of declarative (maven) vs procedural (ant) point of view. You only need to create scripts if you want to customize your building, and you can use ant for that.

And remember! Maven is not only about automatic dependency downloading and a beautiful autogenerated site, but also project build standarization (standards are good, aren’t they?)

Docbook and Maven: generating xhtml instead of html

While the CVS version of the maven sdocbook plugin already does it, if you want to generate xhtml instead of html with the latest 1.4.1 release, you only need to set the following properties (e.g. to project.properties).

maven.sdocbook.html.xsl=${maven.sdocbook.stylesheets.dir}/xhtml/docbook.xsl
maven.sdocbook.htmlchunk.xsl=${maven.sdocbook.stylesheets.dir}/xhtml/chunk.xsl

Docbook and Maven

I’ve released two new versions of the maven sdocbook plugin (note that it’s called sdocbook for historical reasons but it uses the full docbook, not the simplified one). The latest version allows the creation of pdf, html in a single page and html splitted in sections. It also allows the customization of the stylesheets used for transformation.

It’s as easy as running maven sdocbook after you put the docbook source in the sdocbook folder.

To generate the docbook when building the site just add this postGoal to your maven.xml.

    <postGoal name="site">
        <attainGoal name="sdocbook"/>
    </postGoal>

There are two projects where I’ve implemented the docbook transformation using all the features:

  • ONess
  • Acegi Security System for Spring

If you’d like to generate the docbook files as part of the maven generated site (with the navigation bar on the left, logos and footer), you can try the following goal after generating the docbook files, but before xdoc goal.

    <goal name="docbook2xdoc">
        <maven:get var="maven.sdocbook.generated.html"
            plugin="maven-sdocbook-plugin"
            property="maven.sdocbook.generated.html"/>
        <mkdir dir="${maven.gen.docs}/docbook2xdoc"/>

        <j:set var="maven.html2xdoc.dir.bak" value="${maven.html2xdoc.dir}"/>
        <j:set var="maven.gen.docs.bak" value="${maven.gen.docs}"/>

        <j:set var="maven.html2xdoc.dir" value="${maven.sdocbook.generated.html}"/>
        <j:set var="maven.gen.docs" value="${maven.gen.docs}/docbook2xdoc"/>
        <attainGoal name="html2xdoc:transform"/>

        <j:set var="maven.html2xdoc.dir" value="${maven.html2xdoc.dir.bak}"/>
        <j:set var="maven.gen.docs" value="${maven.gen.docs.bak}"/>
    </goal>

Sending e-mails with Spring

The Spring Framework allows a very simple way to send e-mails.

/* Create a MIME message */
MimeMessage message = mailSender.createMimeMessage();
MimeMessageHelper helper = new MimeMessageHelper(message, "UTF-8");
helper.setTo("My friend <[email protected]>");
helper.setFrom("Myself <[email protected]>");
helper.setSubject("The subject");

/* Send plaintext */
String plaintext = "The text of the mail";
helper.setText(plaintext, false);

/* Send html */
String htmltext = "<html><body><p>The text of the mail</p></body></html>";
//helper.setText(htmltext, true);

/* Send both (multipart) */
//helper.setText(plaintext, htmltext);

mailSender.send(message);

The mailSender can be injected with the following xml in the application context.

    <bean id="mailSender"
        class="org.springframework.mail.javamail.JavaMailSenderImpl">
        <property name="host"><value>mail.server.com</value></property>
        <property name="username"><value>smtpusername</value></property>
        <property name="password"><value>smtppassword</value></property>
    </bean>

Spring Framework 1.1.3 released

A new version of the Spring Framework, the 1.1.3 has just been released ant it’s available to maven users from the ibiblio repository.

I'm pleased to announce that Spring 1.1.3 has just been released.
This is a bugfix and minor enhancement release in the 1.1 series;
most importantly, JDK 1.3 compatibility is fully restored.
Among the new features in this release are:

* added "setResourceLoader" method to GenericApplicationContext, for overriding the default resource loading strategy
* added FileSystemResourceLoader, resolving paths as file system resources rather than as class path resources
* BeanWrapperImpl automatically registers a default ResourceArrayPropertyEditor
* added CustomCollectionEditor, by default registered to convert between Set, SortedSet and List (when necessary)
* added "fileEncoding" and "propertiesPersister" properties to PropertyResourceConfigurer
* reworked DefaultListableBeanFactory's "getBeansOfType" to return FactoryBean instances when passed a FactoryBean type
* DefaultXmlBeanDefinitionParser resolves "set" tag as LinkedHashSet on JDK 1.4, falling back to HashSet on JDK 1.3
* factored out AbstractRefreshableApplicationContext as base class of AbstractXmlApplicationContext
* added "setIgnoreUnknownFields" method to DataBinder, enforcing request parameters to match fields when turned "false"

* added "execute(ConnectionCallback)" method to JdbcTemplate, allowing any kind of operation on a given Connection
* added DB2SequenceMaxValueIncrementer, implementing the DataFieldMaxValueIncrementer interface for a DB2 sequence
* fixed Hibernate/JTA synchronization to also work with EJB remote transaction propagation (with >1 thread involved)
* added "transactionConfigClass" and "transactionConfigProperties" customization properties to SqlMapClientFactoryBean

* added optional "proxyInterface" property to JndiObjectFactoryBean, for exposing a proxy rather than the plain object
* added "lookupOnStartup" and "cache" properties to JndiObjectFactoryBean, allowing for lazy lookup on first access etc
* added "codebaseUrl" property to HttpInvokerClientInterceptor, specifying a URL for dynamic class download
* added support for dynamic class downloading to AbstractHttpInvokerRequestExecutor and its subclasses

* DispatcherServlet by default cleans up request attributes after include request (configurable via "cleanupOnInclude")
* UrlBasedViewResolver supports a "forward:" prefix too, for forwards to other controllers through special view names
* added "attributes" (Properties) and "attributesMap" (Map) properties to UrlBasedViewResolver, for static attributes
* InternalResourceView performs an include if the response has already been committed (-> forward not possible anymore)
* JstlView and TilesJstlView respect a JSTL "localizationContext" config in web.xml, checking those messages first
* added overloaded "createVelocityContext" and "exposeHelpers" methods to VelocityView, with passed-in servlet response
* added "toolAttributes" property to VelocityView, taking attribute name / tool class name pairs for tools to expose
* added JasperReportsXxxView to allow for convenient rendering of CSV/HTML/PDF/XLS web views with Jasper Reports
* added MappingDispatchActionSupport class, as convenience subclass of Struts 1.2's MappingDispatchAction

Congreso Javahispano 2004

I’m doing a presentation at Congreso JavaHispano 2004 in Madrid, december 15, 16, about Acegi Security System for Spring. If you’re interested registration is free.

Maven Blogs

If you want to get the latest news from the Maven project you can try Maven Blogs, where the blogs of some maven developers are aggregated.

A good new is that Maven 1.0.2 is in the way in less than 24 hours. Thank to all those guys developing this great tool. And of course thanks to all the contributors and users that help improving it.

Maven AspectJ plugin 3.2 released

The maven team is pleased to announce the Maven AspectJ Plugin 3.2 release!

The main change is the ability of weaving only a subset of aspects.

The maven team is pleased to announce the Maven AspectJ Plugin 3.2 release!
http://maven.apache.org/reference/plugins/aspectj/

Changes in this version include:

  New Features:
o Added maven.aspectj.argfiles and maven.aspectj.weaveAspectSources properties.
  Issue: MPASPECTJ-12. Thanks to Mark Proctor.
o Added maven.aspectj.noweave and maven.aspectj.lint properties. Issue:
  MPASPECTJ-13.

  Fixed bugs:
o Added maven.aspectj.source and maven.aspectj.time properties that where
  incorrectly removed.

To automatically install the plugin, type the following on a single line:

maven plugin:download -DgroupId=maven -DartifactId=maven-aspectj-plugin -Dversion=3.2

For a manual installation, you can download the plugin here:
http://www.apache.org/dyn/closer.cgi/java-repository/maven/plugins/maven-aspectj-plugin-3.2.jar

Have fun!
-The maven team

Maven 1.0.1 Released

After a long time from 1.0, the 1.0.1 release is out!.

The maven team is pleased to announce the Maven 1.0.1 release!

Download

This release contains bugfixes since the Maven 1.0 release. In addition, all of
the latest stable plugin releases are included, which include both bugfixes and
some new features.

We recommend that all users upgrade to this release, in particular those using
pre-1.0 betas or release candidates.

Maven is a project management and project comprehension tool. Maven is based
on the concept of a project object model: builds, documentation creation, site
publication, and distribution publication are all controlled from the project
object model. Maven also provides tools to create source metrics, change logs
based directly on source repository, and source cross-references.



Changes in this version can be found here:
Changes

Please note that each plugin has its own changes report - please refer to the plugins
site to see the plugin you are interested in.

Have fun!
-The Apache Maven Team