Re: [forge-dev] [forge-users] faq?
by Lincoln Baxter, III
Hey that's awesome! I hope this is a fun thing to work on, and not just an
annoyance :) I'll try to help wherever possible.
First.. you'll need an account on http://github.com, then you'll need git:
http://git-scm.com/
Then you'll want to fork the repository on github:
https://github.com/forge/plugin-hibernate-tools This will create a copy of
the code in your account, you'll do all of your work on that fork, then
submit a "Pull Request" when you want to push the code up to the master
repository. I can help you with that later if you are not familiar with Git.
Do you need a git quickstart?
There is a formal contribution guide here, but I wouldn't worry about this
except for agreeing to the JBoss CLA (I really don't know why we require
this, for legal protection I guess.)
http://seamframework.org/Documentation/SeamForge#H-Contribute
If you are using Forge Alpha3 and don't need to debug live, then you don't
need to build Forge from source... so you can just build and test the plugin
while forge runs, like so:
$ forge source-plugin /path/to/plugin/project/folder
This will build and load your plugin dynamically (assuming it builds :)
You'll probably want to join forge-dev, just in case you want to ask more
questions about the development itself :)
https://lists.jboss.org/mailman/listinfo/forge-dev
I believe max is saying you'll need to build hibernate-tools (
https://github.com/hibernate/hibernate-tools) locally and add it to the
plugin POM, but I went ahead and deployed a snapshot so all you'll need to
do is add this to the plugin POM:
https://repository.jboss.org/nexus/content/groups/public/org/hibernate/hi...
While working on the plugin project in forge:
> $ project add-dependency org.hibernate:hibernate-tools:3.4.0.CR2-SNAPSHOT
>
>
I think I found the plugin code, max is this right?
https://github.com/maxandersen/forge/blob/htools/persistence-plugin/src/m...
That just needs to be copied over into this new plugin project and updated
to use the new forge APIs, andI think all of the Inject project instance
stuff can be replaced by @Inject private Project project;
I hope this is good information,
~Lincoln
On Thu, Apr 7, 2011 at 12:56 PM, brian <brianx(a)vt.edu> wrote:
>
> ok i've got a green light. where do i start?
>
> On Thu, 2011-04-07 at 17:31 +0200, Max Rydahl Andersen wrote:
> > I'll take a stab on getting it over there - will be traveling and doing a
> few presentations the next cpl weeks so can't give guaranteed ETA right now.
> >
> > If anyone else looks at it just let me know if any questions/issues and I
> should be able to easily answer/point in right direction.
> >
> > /max
> >
> > On Apr 7, 2011, at 17:09, Lincoln Baxter, III wrote:
> >
> > > I think if someone can get this up and running as a first attempt in a
> Git repo (to enable easy installation) I think this would quickly gain
> support and contributors.
> > >
> > > I've created a git repository in which this plugin should live:
> https://github.com/forge/plugin-hibernate-tools . If either of you would
> like to work on it, let me know and I can add you as team-members on that
> repo.
> > >
> > > Max, could you do me a favor and just put the plugin stuff you already
> started in there? It can compile or not, I just need to see what you've got.
> Give me the ingredients and we can do some baking.
> > >
> > > ~Lincoln
> > >
> > > On Thu, Apr 7, 2011 at 10:56 AM, Max Rydahl Andersen <
> max.andersen(a)redhat.com> wrote:
> > >
> > > > Unfortunately the database reverse-engineering plugin is still under
> development. We actually have it working, but the plugin was never released
> or updated for Alpha3. Actually, I think Max has things mostly done, if
> you're interested you might be able to get it working pretty easily using
> the plugin writing section of the guide:
> > > >
> > > >
> http://docs.jboss.org/forge/1.0.0.Alpha3/reference/en-US/html_single/#for...
> > > >
> > > > Max, what would you say it would take to get this working on Alpha3?
> Is Hibernate-tools in maven yet?
> > >
> > > It's just a matter of someone lending a hand and willing to work on it.
> > >
> > > The code is utterly simple, just need someone to help maintain it. "it"
> being hibernatetools + forge integration.
> > >
> > > /max
> > >
> > > >
> > > > ~Lincoln
> > > >
> > > > On Thu, Apr 7, 2011 at 10:46 AM, brian <brianx(a)vt.edu> wrote:
> > > > Lincoln,
> > > >
> > > > Is there a how-to for the case where I have an existing
> > > > database/entities?
> > > >
> > > > I think what I'd like to do is either (a) gen entities from my
> database
> > > > or (b) update my existing entities with EJB3/JB6 annotations... then
> gen
> > > > the front-end.
> > > >
> > > >
> > > > On Thu, 2011-04-07 at 10:26 -0400, Lincoln Baxter, III wrote:
> > > > > Hi Brian,
> > > > >
> > > > > If you get stuck, try pressing <TAB> or press <ENTER> and you will
> be
> > > > > prompted for the missing arguments, with a list of available
> options.
> > > > >
> > > > > In this case, however, just type:
> > > > >
> > > > > persistence setup --provider HIBERNATE --container
> JBOSS_AS6
> > > > > Hope this helps!
> > > > >
> > > > > ~Lincoln
> > > > >
> > > > > On Thu, Apr 7, 2011 at 10:18 AM, brian <brianx(a)vt.edu> wrote:
> > > > > Hi folks I'm just getting started using
> > > > >
> http://docs.jboss.org/forge/1.0.0.Alpha3/reference/en-US/html_single/#for...
> > > > >
> > > > > and step 4, the persistence, is a little vague to me
> > > > > syntactically: how
> > > > > about an example, say using Hib and JB6?
> > > > >
> > > > > I'm sure there's a FAQ, and this question is possibly on
> it.
> > > > > Can
> > > > > someone point me at it?
> > > > >
> > > > > Thanks in advance. Looking forward to using Forge!
> > > > > -Brian
> > > > >
> > > > >
> > > > >
> > > > > _______________________________________________
> > > > > forge-users mailing list
> > > > > forge-users(a)lists.jboss.org
> > > > > https://lists.jboss.org/mailman/listinfo/forge-users
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Lincoln Baxter, III
> > > > > http://ocpsoft.com
> > > > > http://scrumshark.com
> > > > > "Keep it Simple"
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Lincoln Baxter, III
> > > > http://ocpsoft.com
> > > > http://scrumshark.com
> > > > "Keep it Simple"
> > >
> > > /max
> > > http://about.me/maxandersen
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > Lincoln Baxter, III
> > > http://ocpsoft.com
> > > http://scrumshark.com
> > > "Keep it Simple"
> >
> > /max
> > http://about.me/maxandersen
> >
> >
> >
>
>
>
--
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"
13 years, 7 months
[JBoss JIRA] Created: (SEAMFORGE-133) 'Invalid byte 2 of 2-byte UTF-8 sequence' error on CentOS
by kuu yee (JIRA)
'Invalid byte 2 of 2-byte UTF-8 sequence' error on CentOS
---------------------------------------------------------
Key: SEAMFORGE-133
URL: https://issues.jboss.org/browse/SEAMFORGE-133
Project: Seam Forge
Issue Type: Bug
Components: Documentation
Affects Versions: 1.0.0.Beta1
Environment: OS: CentOS5.4
locale: zh_CN.UTF-8
Reporter: kuu yee
build Forge reference guide error:
[root@localhost reference]# mvn clean install -DjdocbookSourceDirectory=src/main/docbook/en-US/ -e
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
Downloading: http://snapshots.jboss.org/maven2/org/eclipse/wst/css/core/maven-metadata...
[WARNING] Could not transfer metadata org.eclipse.wst.css:core/maven-metadata.xml from/to maven-repository.dev.java.net (http://download.java.net/maven/1): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
Downloading: http://snapshots.jboss.org/maven2/org/eclipse/wst/sse/core/maven-metadata...
[WARNING] Could not transfer metadata org.eclipse.wst.sse:core/maven-metadata.xml from/to maven-repository.dev.java.net (http://download.java.net/maven/1): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
Downloading: http://snapshots.jboss.org/maven2/org/eclipse/wst/common/uriresolver/mave...
[WARNING] Could not transfer metadata org.eclipse.wst.common:uriresolver/maven-metadata.xml from/to maven-repository.dev.java.net (http://download.java.net/maven/1): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
Downloading: http://snapshots.jboss.org/maven2/org/eclipse/wst/sse/core/maven-metadata...
[WARNING] Could not transfer metadata org.eclipse.wst.sse:core/maven-metadata.xml from/to maven-repository.dev.java.net (http://download.java.net/maven/1): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Seam Forge - Reference Guide 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ forge-reference-guide ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce) @ forge-reference-guide ---
[WARNING] This rule is not compatible with the current version of Maven. The rule is not able to perform any checks.
[INFO]
[INFO] --- build-helper-maven-plugin:1.5:maven-version (default) @ forge-reference-guide ---
[INFO]
[INFO] --- build-helper-maven-plugin:1.5:parse-version (default) @ forge-reference-guide ---
[INFO]
[INFO] --- build-helper-maven-plugin:1.5:add-source (attach-source) @ forge-reference-guide ---
[INFO] Source directory: /ci/seam3/forge/docs/reference/src/main/docbook/en-US added.
[INFO]
[INFO] --- maven-antrun-plugin:1.6:run (default) @ forge-reference-guide ---
[INFO] Executing tasks
main:
[INFO] Executed tasks
[INFO]
[INFO] --- maven-jdocbook-plugin:2.2.3:resources (default-resources) @ forge-reference-guide ---
Downloading: http://snapshots.jboss.org/maven2/org/eclipse/wst/css/core/maven-metadata...
[WARNING] Could not transfer metadata org.eclipse.wst.css:core/maven-metadata.xml from/to maven-repository.dev.java.net (http://download.java.net/maven/1): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
Downloading: http://snapshots.jboss.org/maven2/org/eclipse/wst/sse/core/maven-metadata...
[WARNING] Could not transfer metadata org.eclipse.wst.sse:core/maven-metadata.xml from/to maven-repository.dev.java.net (http://download.java.net/maven/1): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
Downloading: http://snapshots.jboss.org/maven2/org/eclipse/wst/common/uriresolver/mave...
[WARNING] Could not transfer metadata org.eclipse.wst.common:uriresolver/maven-metadata.xml from/to maven-repository.dev.java.net (http://download.java.net/maven/1): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
Downloading: http://snapshots.jboss.org/maven2/org/eclipse/wst/sse/core/maven-metadata...
[WARNING] Could not transfer metadata org.eclipse.wst.sse:core/maven-metadata.xml from/to maven-repository.dev.java.net (http://download.java.net/maven/1): No connector available to access repository maven-repository.dev.java.net (http://download.java.net/maven/1) of type legacy using the available factories WagonRepositoryConnectorFactory
[INFO] Expanding: /root/.m2/repository/org/jboss/seam/seam-jdocbook-style/1.1.0.GA/seam-jdocbook-style-1.1.0.GA.jdocbook-style into /ci/seam3/forge/docs/reference/target/docbook/staging
[INFO] Expanding: /root/.m2/repository/org/jboss/jbossorg-jdocbook-style/1.1.0/jbossorg-jdocbook-style-1.1.0.jdocbook-style into /ci/seam3/forge/docs/reference/target/docbook/staging
[INFO]
[INFO] --- maven-jdocbook-plugin:2.2.3:translate (default) @ forge-reference-guide ---
[INFO]
[INFO] --- maven-jdocbook-plugin:2.2.3:generate (default-generate) @ forge-reference-guide ---
[INFO] Processing en-US -> pdf
redirecting output to file [/ci/seam3/forge/docs/reference/target/docbook/work/log/console-en-US-pdf.log]
Error on line 4 column 17 of file:/ci/seam3/forge/docs/reference/src/main/docbook/en-US/master.xml:
Error reported by XML parser: Invalid byte 2 of 2-byte UTF-8 sequence.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.919s
[INFO] Finished at: Thu Apr 07 22:11:38 CST 2011
[INFO] Final Memory: 30M/217M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.maven.plugins:maven-jdocbook-plugin:2.2.3:generate (default-generate) on project forge-reference-guide: XSLT problem: error rendering [org.xml.sax.SAXParseException: Invalid byte 2 of 2-byte UTF-8 sequence.] on master.xml -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.maven.plugins:maven-jdocbook-plugin:2.2.3:generate (default-generate) on project forge-reference-guide: XSLT problem
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:203)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: XSLT problem
at org.jboss.maven.plugins.jdocbook.AbstractDocBookMojo.execute(AbstractDocBookMojo.java:419)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
... 19 more
Caused by: org.jboss.jdocbook.xslt.XSLTException: error rendering [org.xml.sax.SAXParseException: Invalid byte 2 of 2-byte UTF-8 sequence.] on master.xml
at org.jboss.jdocbook.render.impl.BasicRenderer.performRendering(BasicRenderer.java:178)
at org.jboss.jdocbook.render.impl.BasicRenderer.render(BasicRenderer.java:159)
at org.jboss.jdocbook.render.impl.BasicRenderer.render(BasicRenderer.java:100)
at org.jboss.maven.plugins.jdocbook.GenerationMojo.process(GenerationMojo.java:112)
at org.jboss.maven.plugins.jdocbook.AbstractDocBookMojo.doExecute(AbstractDocBookMojo.java:387)
at org.jboss.maven.plugins.jdocbook.AbstractDocBookMojo.execute(AbstractDocBookMojo.java:415)
... 21 more
Caused by: javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: Invalid byte 2 of 2-byte UTF-8 sequence.
at com.icl.saxon.om.Builder.build(Builder.java:273)
at com.icl.saxon.Controller.transform(Controller.java:936)
at org.jboss.jdocbook.render.impl.BasicRenderer.performRendering(BasicRenderer.java:175)
... 26 more
Caused by: org.xml.sax.SAXParseException: Invalid byte 2 of 2-byte UTF-8 sequence.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.icl.saxon.om.Builder.build(Builder.java:265)
... 28 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
Re: [forge-dev] forge stuff
by Lincoln Baxter, III
(Copying forge-dev)
Agreed. I've put this on the roadmap for Alpha4. We have a lot of work to do
in this regard.
~Lincoln
On Sun, Apr 3, 2011 at 4:46 PM, Paul Bakker <paul.bakker.nl(a)gmail.com>wrote:
> Hi Lincoln,
>
> I started using the source-plugin mechanism and that works great!
>
> About public APIs, that's really difficult. I'm afraid many plugins need
> other core plugins on the classpath, even if it's only to check if a certain
> facet is installed because @RequiresFacet needs a Class as an argument.
> What would be needed is an *-API module for some of the important core
> plugins I think such as project-model, and the J2EE plugins. What exactly
> should and shouldn't be in the API is hard to say. Maybe it's an idea to
> create a list of dependencies that are needed in the non-core plugins
> created so far. That would at least give a first impression on what should
> be in the API. It's difficult to figure this out before people actually
> start to use it, but it's too late to figure this out after a lot of plugins
> are created because all of them will brake after refactoring.
>
> Paul
>
>
> On Fri, Apr 1, 2011 at 11:50 PM, Lincoln Baxter, III <
> lincolnbaxter(a)gmail.com> wrote:
>
>> Hey Paul,
>>
>> (Copying forge-dev)
>>
>> You're right, this should probably be clarified in the docs. It's safe to
>> assume that the* forge-shell-api *is what will be made available, as the
>> plugin guide states (only indirectly because it's the only depenency in the
>> POM). I'm not really sure how best to handle other requirements yet at this
>> point, like if you needed to reference the MavenCoreFacet directly, for
>> instance, how to handle exposing other "core plugins" that aren't really
>> part of the core API yet.
>>
>> Loving your ideas for plugins. Keep em coming! I'm going to be working
>> with management at JBoss to get the central plugin index up and running so
>> we can make it even easier to share, though, It will probably take a while.
>>
>> Your thoughts on this would be greatly appreciated :)
>> ~Lincoln
>>
>>
>> On Fri, Apr 1, 2011 at 5:07 PM, Paul Bakker <paul.bakker.nl(a)gmail.com>wrote:
>>
>>> Hi Lincoln,
>>>
>>> The dependencies that you found in the Arquillian plugin where actually
>>> obsolete. I needed them for the first approach I tried (loading project
>>> classes) which I abandoned later. I removed them and all is still working.
>>>
>>> I noticed something that might be confusing in the docs. There's a
>>> warning not to include libs that are provided by Forge. How does someone
>>> know which libraries to include and which not? Maybe we should provide a
>>> list of provided libraries in the docs? Another thing that's not completely
>>> clear now is what Forge classes/interfaces are safe to use in a plugin. Are
>>> all classes in *-api modules usable, and all others not? And how does
>>> someone know about those api modules without looking at the source code?
>>> This should be specified clearly in the docs. If people start writing
>>> plugins using implementation classes they might brake easily with new
>>> versions of Forge.
>>>
>>> I have a few new ideas for plugins too:
>>> -Code quality plugin -> configure checkstyle/findbugs/sonar in Maven with
>>> single commands
>>> -JSF components plugin -> configure Richfaces / Primefaces with a single
>>> command
>>> -Hibernate 2nd level cache -> configure 2nd level caching using one of
>>> the many implementations
>>>
>>> All of them just do configuration on the project. To my experience those
>>> types of configuration normally involve a lot of copy/paste from manuals
>>> while setting them up. Forge can do that for us :-)
>>> What do you think about them? I have some time again this weekend, so
>>> I'll get started on one of them.
>>>
>>> Let me say again that it's incredibly fun to work and discuss on this!
>>> Wish I have more time :-)
>>>
>>> Paul
>>>
>>
>>
>>
>> --
>> Lincoln Baxter, III
>> http://ocpsoft.com
>> http://scrumshark.com
>> "Keep it Simple"
>>
>
>
--
Lincoln Baxter, III
http://ocpsoft.com
http://scrumshark.com
"Keep it Simple"
13 years, 7 months
[JBoss JIRA] Created: (SEAMFORGE-127) Shell cannot parse command values containing '!' exclaimation points
by Lincoln Baxter III (JIRA)
Shell cannot parse command values containing '!' exclaimation points
--------------------------------------------------------------------
Key: SEAMFORGE-127
URL: https://issues.jboss.org/browse/SEAMFORGE-127
Project: Seam Forge
Issue Type: Bug
Components: Shell
Affects Versions: 1.0.0.Alpha3
Reporter: Lincoln Baxter III
{code}
[pfdemo] pfdemo $ echo sdfdf!
sdfdf !
[pfdemo] pfdemo $ echo sdfdf!sdf
***ERROR*** Exception encountered: !sdf: event not found (type "set VERBOSE true" to enable stack traces)
[pfdemo] pfdemo $
[pfdemo] pfdemo $ echo 'asdf!asdf`
***ERROR*** Exception encountered: !asdf`: event not found (type "set VERBOSE true" to enable stack traces)
[pfdemo] pfdemo $
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 7 months
Maven plugins configuration
by Paul Bakker
Hi all,
I've been working on some Forge plugins that require adding plugins to the
Maven configuration. For example:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.0-beta-3</version>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.3.2</version>
</plugin>
</reportPlugins>
</configuration>
</plugin>
It's fairly easy to add a new plugin, all tough the get/set API of Maven is
not great. Adding configuration to a plugin (as in the above example) is
very painful though because you need to parse the XML from a string. We
should have a builder API like the one available for adding dependencies. I
would be happy to work on this, but I want to discuss what's the best way to
approach this. The difficult thing is that anything could be within the
configuration tag.
One option would be to use Groovy for this. Groovy has an excellent XML
builder. Plugin authors could use Groovy directly to create the XML
structure, we should only provide an Adaptor to easily transform the Groovy
node structure to a Maven node structure. On top of that we could provide a
Java API like this:
configuration.addElement("reportPlugins")
.addElement("plugin")
.addElement("groupId") etc.
With Groovy it would also be easy to, for example, check if an configuration
element already exists.
If we would use Groovy that means Groovy has to be on the classpath too of
course.
Paul
13 years, 7 months
Bug? adding servlet to web.xml
by Brian Leathem
In my forge plugin, I call:
ServletFacet servlet = project.getFacet(ServletFacet.class);
WebAppDescriptor descriptor = servlet.getConfig();
descriptor.servlet("Faces Servlet", FacesServlet.class.getName(),
"*.jsf", "/faces/*");
and I end up with:
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>Faces Servlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>javax.faces.webapp.FacesServlet</url-pattern>
<url-pattern>*.jsf</url-pattern>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
Am I doing something wrong? or is this a bug (I'd file a jira, but jboss
jira is down this weekend)
Brian Leathem
13 years, 7 months