Struts with MAVEN 2.0
How can I made a '.war' file with the goal mvn war:war to include the struts-config.xml under a specific directory? by defaults MAVEN mades it under classes directory, but I need to reuse old applications and I don�nt want to change web.xml file.Thanks
The log says Maven 2.2.1 and the exception is around hudson.maven.MavenBuildProxy2$Filter. Could it be as simple as trying to run the Maven 3 build step with Maven 2.2.1?
Anyway, if you want to use Maven 3 build step you should configure your Hudson machine with Maven 3.x.
Similar Messages
-
FlexPMD maven plugin no longer useable with Maven due to imcompatible binaries?
I am using Maven 2.2.1 with FlexPMD 1.2 and Flexmojos 3.7.1, with the maven-site-plugin 3.0
I get the following error:
[INFO] [site:site {execution: default-site}]
[FATAL ERROR] org.apache.maven.plugins.site.SiteMojo#execute() caused a linkage
error (java.lang.AbstractMethodError) and may be out-of-date. Check the realms:
[FATAL ERROR] Plugin realm = app0.child-container[org.apache.maven.plugins:maven
-site-plugin:3.0]
urls[0] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/plugins/mav
en-site-plugin/3.0/maven-site-plugin-3.0.jar
urls[1] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/reporting/m
aven-reporting-exec/1.0.1/maven-reporting-exec-1.0.1.jar
urls[2] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-u
tils/1.5.10/plexus-utils-1.5.10.jar
urls[3] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/maven-setti
ngs-builder/3.0/maven-settings-builder-3.0.jar
urls[4] = file:/C:/dreammachine/cache/m2/repository/org/apache/velocity/velocity
/1.5/velocity-1.5.jar
urls[5] = file:/C:/dreammachine/cache/m2/repository/commons-collections/commons-
collections/3.2.1/commons-collections-3.2.1.jar
urls[6] = file:/C:/dreammachine/cache/m2/repository/commons-lang/commons-lang/2.
5/commons-lang-2.5.jar
urls[7] = file:/C:/dreammachine/cache/m2/repository/oro/oro/2.0.8/oro-2.0.8.jar
urls[8] = file:/C:/dreammachine/cache/m2/repository/velocity/velocity/1.5/veloci
ty-1.5.jar
urls[9] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxia
-core/1.2/doxia-core-1.2.jar
urls[10] = file:/C:/dreammachine/cache/m2/repository/xerces/xercesImpl/2.9.1/xer
cesImpl-2.9.1.jar
urls[11] = file:/C:/dreammachine/cache/m2/repository/xml-apis/xml-apis/1.3.04/xm
l-apis-1.3.04.jar
urls[12] = file:/C:/dreammachine/cache/m2/repository/org/apache/httpcomponents/h
ttpclient/4.0.2/httpclient-4.0.2.jar
urls[13] = file:/C:/dreammachine/cache/m2/repository/org/apache/httpcomponents/h
ttpcore/4.0.1/httpcore-4.0.1.jar
urls[14] = file:/C:/dreammachine/cache/m2/repository/commons-codec/commons-codec
/1.3/commons-codec-1.3.jar
urls[15] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
a-module-xhtml/1.2/doxia-module-xhtml-1.2.jar
urls[16] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
a-module-apt/1.2/doxia-module-apt-1.2.jar
urls[17] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
a-module-xdoc/1.2/doxia-module-xdoc-1.2.jar
urls[18] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
a-module-fml/1.2/doxia-module-fml-1.2.jar
urls[19] = file:/C:/dreammachine/cache/m2/repository/javax/servlet/servlet-api/2
.5/servlet-api-2.5.jar
urls[20] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
a-decoration-model/1.2/doxia-decoration-model-1.2.jar
urls[21] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
a-site-renderer/1.2/doxia-site-renderer-1.2.jar
urls[22] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-
i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
urls[23] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-
velocity/1.1.8/plexus-velocity-1.1.8.jar
urls[24] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/shared/mav
en-doxia-tools/1.4/maven-doxia-tools-1.4.jar
urls[25] = file:/C:/dreammachine/cache/m2/repository/commons-io/commons-io/1.4/c
ommons-io-1.4.jar
urls[26] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-
archiver/1.0/plexus-archiver-1.0.jar
urls[27] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-
io/1.0/plexus-io-1.0.jar
urls[28] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/jetty/6.1
.25/jetty-6.1.25.jar
urls[29] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/jetty-uti
l/6.1.25/jetty-util-6.1.25.jar
urls[30] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/servlet-a
pi/2.5-20081211/servlet-api-2.5-20081211.jar
[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/C:/dreammachine/tools/m2/lib/maven-2.2.1-uber.jar
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.AbstractMethodError
at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getReports(Ab
stractSiteRenderingMojo.java:246)
at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:121)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
If I revert to maven-site-plugin 2.1 this issue disappears, but I then get the error reported here:
https://issues.sonatype.org/browse/FLEXMOJOS-310?page=com.atlassian.jira.plugin.system.iss uetabpanels:comment-tabpanel#issue-tabs
If I migrate to maven 3.0.3 with maven-site-plugin 3.0 I get the following error:
[INFO] configuring report plugin com.adobe.ac:flex-pmd-maven-plugin:1.2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:31.730s
[INFO] Finished at: Tue Sep 27 17:21:49 BST 2011
[INFO] Final Memory: 21M/243M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:si
te (default-site) on project cafe-parsley: Execution default-site of goal org.ap
ache.maven.plugins:maven-site-plugin:3.0:site failed: An API incompatibility was
encountered while executing org.apache.maven.plugins:maven-site-plugin:3.0:site
: java.lang.AbstractMethodError: null
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.maven.plugins:maven-site-plugin:3.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/plu
gins/maven-site-plugin/3.0/maven-site-plugin-3.0.jar
[ERROR] urls[1] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/rep
orting/maven-reporting-exec/1.0.1/maven-reporting-exec-1.0.1.jar
[ERROR] urls[2] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/rep
orting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
[ERROR] urls[3] = file:/C:/dreammachine/cache/m2/repository/org/apache/velocity/
velocity/1.5/velocity-1.5.jar
[ERROR] urls[4] = file:/C:/dreammachine/cache/m2/repository/oro/oro/2.0.8/oro-2.
0.8.jar
[ERROR] urls[5] = file:/C:/dreammachine/cache/m2/repository/velocity/velocity/1.
5/velocity-1.5.jar
[ERROR] urls[6] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/aether/
aether-util/1.7/aether-util-1.7.jar
[ERROR] urls[7] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/sisu/si
su-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[8] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/sisu/si
su-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[9] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/
plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[10] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[11] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/plexus
/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[12] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/plexus
/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[13] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
xia/doxia-sink-api/1.2/doxia-sink-api-1.2.jar
[ERROR] urls[14] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
xia/doxia-logging-api/1.2/doxia-logging-api-1.2.jar
[ERROR] urls[15] = file:/C:/dreammachine/cache/m2/repository/junit/junit/3.8.1/j
unit-3.8.1.jar
[ERROR] urls[16] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
xia/doxia-core/1.2/doxia-core-1.2.jar
[ERROR] urls[17] = file:/C:/dreammachine/cache/m2/repository/xerces/xercesImpl/2
.9.1/xercesImpl-2.9.1.jar
[ERROR] urls[18] = file:/C:/dreammachine/cache/m2/repository/xml-apis/xml-apis/1
.3.04/xml-apis-1.3.04.jar
[ERROR] urls[19] = file:/C:/dreammachine/cache/m2/repository/org/apache/httpcomp
onents/httpclient/4.0.2/httpclient-4.0.2.jar
[ERROR] urls[20] = file:/C:/dreammachine/cache/m2/repository/org/apache/httpcomp
onents/httpcore/4.0.1/httpcore-4.0.1.jar
[ERROR] urls[21] = file:/C:/dreammachine/cache/m2/repository/commons-codec/commo
ns-codec/1.3/commons-codec-1.3.jar
[ERROR] urls[22] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
xia/doxia-module-xhtml/1.2/doxia-module-xhtml-1.2.jar
[ERROR] urls[23] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
xia/doxia-module-apt/1.2/doxia-module-apt-1.2.jar
[ERROR] urls[24] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
xia/doxia-module-xdoc/1.2/doxia-module-xdoc-1.2.jar
[ERROR] urls[25] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
xia/doxia-module-fml/1.2/doxia-module-fml-1.2.jar
[ERROR] urls[26] = file:/C:/dreammachine/cache/m2/repository/javax/servlet/servl
et-api/2.5/servlet-api-2.5.jar
[ERROR] urls[27] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
xia/doxia-decoration-model/1.2/doxia-decoration-model-1.2.jar
[ERROR] urls[28] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
xia/doxia-site-renderer/1.2/doxia-site-renderer-1.2.jar
[ERROR] urls[29] = file:/C:/dreammachine/cache/m2/repository/commons-collections
/commons-collections/3.2.1/commons-collections-3.2.1.jar
[ERROR] urls[30] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/sh
ared/maven-doxia-tools/1.4/maven-doxia-tools-1.4.jar
[ERROR] urls[31] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
/plexus-archiver/1.0/plexus-archiver-1.0.jar
[ERROR] urls[32] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
/plexus-io/1.0/plexus-io-1.0.jar
[ERROR] urls[33] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
/plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
[ERROR] urls[34] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
/plexus-velocity/1.1.8/plexus-velocity-1.1.8.jar
[ERROR] urls[35] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
/plexus-utils/1.5.10/plexus-utils-1.5.10.jar
[ERROR] urls[36] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/j
etty/6.1.25/jetty-6.1.25.jar
[ERROR] urls[37] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/s
ervlet-api/2.5-20081211/servlet-api-2.5-20081211.jar
[ERROR] urls[38] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/j
etty-util/6.1.25/jetty-util-6.1.25.jar
[ERROR] urls[39] = file:/C:/dreammachine/cache/m2/repository/commons-lang/common
s-lang/2.5/commons-lang-2.5.jar
[ERROR] urls[40] = file:/C:/dreammachine/cache/m2/repository/commons-io/commons-
io/1.4/commons-io-1.4.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[project>com.jpmorgan.ib.arch
itecture.deia.app:cafe-parsley:1.0-SNAPSHOT, parent: ClassRealm[maven.api, paren
t: null]]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContaine
Thus it seems FlexPMD can no longer be used with Maven due to some sort of binary incompatibility issue...
Does anyone know how to resolve this issue?Hooray, I got to the bottom of issue.
Basically the flex PMD maven plugin is broken at version 1.2 with more recent version of maven-site-plugin. This is because of a new abstract method introduced to the class AbstractMavenReport - canGenerateReport();
This method isn't implemented in the FlexPmdMojo and FlexPmdReportMojo classes on the SVN trunk or in flexPMD 1.2 and was causing >mvn site to fail as outlined above. Add implementations of this method, returning true in both classes and the plugin works again!
Note the method also needs to be added to the relevant Mojo and ReportMojo classes for the FlexMetrics and CPD maven plugins to get them working too.
Flex PMD commiters - please release a new version of the project to resolve this showstopper! -
Using Struts with JDeveloper, BC4J and OC4J 9.0.2
Is it feasible to use Struts with JDeveloper 9.0.2, BC4J 9.0.2 and OC4J 9.0.2? We have an application that uses the BC4J JBO tags in version 9.0.2. We wish to use Struts and we want to retain the use of the JBO tags. Is there a way to do this without upgrading to 9.0.3?
Here are two related questions:
Can we upgrade to oracle9iAS 9.0.3 yet still use JDeveloper 9.0.2 and BC4J/JBO 9.0.2?
Can we upgrade to JDeveloper 9.0.3 and BC4J/JBO 9.0.3 yet still deploy to oracle9iAS 9.0.2? -
How team should work with maven
Could somebody to explain how the team should work with maven.
For example.
10 developers and 1 team lead are working together.
Everyones has the own module in development.
Next, one made the changes in his module and marked it like
<version>1.3</version>? And say to neighbor whous modul is depend on his: "will be make your modul to point version 1.3 for my
<artifactId>his-app</artifactId>
<version>1.3</version> ? Or how?
If he to point the unexisting version the maven will swear.
And next. There's something pom.xml for team lead on top level of another modules of developers which team lead to use for assebling?
Help please to understand how to use this frameworkIt sounds like the functionality you are looking for is what maven calls snapshots. This allows developers to build and deploy the latest code base on the fly and maven can grab the latest releases without having to continually update the pom.
-
Using Struts with Oracle Portal
Hello,
I am trying to run my applications developed using Struts Framework in Oracle Portal.Though Oracle Portal uses jpdk api's is there any way I can try to integrate Struts with Oracle Portal so that I can work test my application on any server and then develop portlet and run them on Oracle Portal as well?Check out these other discussions:
Portletizing a struts JSP application
Urgent: Portletizing an struts JSP application
Similar but different detail:
struts -
Database connectivity in struts with mysql
Hi,
I want to database connectivity in struts with mysql in struts-config.xml file. I have give the code in struts-config.xml file is given below...................
<data-sources>
<data-source key="dbname" type="org.apache.commons.dbcp.BasicDataSource" >
<set-property property="driverClassName" value="com.mysql.jdbc.Driver" />
<set-property property="url" value="jdbc:mysql://localhost:3306/antrowinnovation" />
<!-- <set-property property="username" value=""/>
<set-property property="password" value="indra" /> -->
</data-source>
</data-sources>
And give the code in Action class is given below...
int i=0;
Connection con;
Statement stmt;
DataSource dataSource = (DataSource)servlet.getServletContext().getAttribute("dbname");
System.out.println(dataSource);
try{
System.out.println("Database connecting....");
con=dataSource.getConnection();
stmt=con.createStatement();
System.out.println("Database connected....");
i=stmt.executeUpdate("insert into login values('" + username + "','" + password + "')");
System.out.println("Values inserted....");
}catch(Exception e){
System.out.println(e.getMessage());
System.out.println("Exception in try");
e.printStackTrace();
return 0;
But when i have run this then i got this Exception....
INFO: Initialize action of type: login.LoginAction
null
Database connecting....
null
Exception in try
java.lang.NullPointerException
at login.LoginAction.insertUser(LoginAction.java:27)
at login.LoginAction.execute(LoginAction.java:47)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:825)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:743)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)
Plz help me..Read some Struts tutorial.
-
Exception while using struts with jsf
Hi
Iam trying to integrate struts with jsf. when iam trying to load jsf page ...getting the following error
Unable to initialize jsf interceptors probably due missing JSF implementation libraries
Please help me to fix this .this is my web.xml
<?xml version="1.0"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>appstruts2</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app> -
How to install and config Struts with oc4j?
Hi,
I download jakarta-struts-1.0,but I don't know
how to install and config Struts with oc4j?Can you
tell me the detail steps?
Thanks!Follow the instructions in this link:
http://jakarta.apache.org/struts/installation-oas.html. It's
for Orion but should also apply for oc4j. -
Compile Project with Maven and Crystal Reports dependencies
Hi.
I'd like to build a java project with maven. That project uses Crystal Reports. I have added all Crystal Reports jar files in the folder lib (from the runtime download) to my maven dependencies. But i get always the following error message.
The import com.crystaldecisions.ReportViewer cannot be resolved
in that package is the ReportViewerBean.class an so i get also the following message.
ReportViewerBean cannot be resolved
I tried several different ways with no success.
im looking foreward for your advice.
thanks.
Edited by: hansmeier_de on Aug 25, 2010 11:20 AMdid you list them in the dependencies in your pom file?
-
Hi,
I am building javax.mail.jar using with the source of "JavaMail 1.4.4 source code", downloaded from http://kenai.com/projects/javamail/downloads , we have some customized changes in few source java files (regarding IMAP and response) of this source, otherwise no changes we have done in this source for building mail jar with maven.
I was using Maven 2.2.1 - successfully downloaded repository on my systems when I had Java 1.6. Then I have moved to java 7 but it failed, on roll back changes I was unable to download repositories as I had downloaded at earlier stage.
System has set JAVA_HOME of Java Home directory
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------
[INFO] Internal error in the plugin manager executing goal 'com.sun.enterprise:osgiversion-maven-plugin:0.4.11:compute-osgi-version': Unable to load the mojo 'com.sun.enterprise:osgiversion-maven-plugin:0.4.11:compute-osgi-version' in the plugin 'com.sun.enterprise:osgiversion-maven-plugin'. A required class is missing: Lorg/apache/maven/shared/osgi/Maven2OsgiConverter;
org.apache.maven.shared.osgi.Maven2OsgiConverter
[INFO] ----------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionExcep tion: Internal error in the plugin manager executing goal 'com.sun.enterprise:osgiversion-maven-plugin:0.4.11:compute-osgi-version': Unable to load the mojo 'com.sun.enterprise:osgiversion-maven-plugin:0.4.11:compute-osgi-version' in the plugin 'com.sun.enterprise:osgiversion-maven-plugin'. A required class is missing: Lorg/apache/maven/shared/osgi/Maven2OsgiConverter;
at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoals(DefaultLifecycleExecutor.java:698)
at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoalWithLifecycle(DefaultLifecycleExecuto r.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoalAndHandleFailures(DefaultLifecycleExe cutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeTaskSegments(DefaultLifecycleExecutor.jav a:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMav en.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven .java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:3 62)
at org.apache.maven.cli.compat.CompatibleMain.main(Co mpatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(L auncher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher. java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode (Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.ja va:375)
Caused by: org.apache.maven.plugin.PluginManagerException: Unable to load the mojo 'com.sun.enterprise:osgiversion-maven-plugin:0.4.11:compute-osgi-version' in the plugin 'com.sun.enterprise:osgiversion-maven-plugin'. A required class is missing: Lorg/apache/maven/shared/osgi/Maven2OsgiConverter;
at org.apache.maven.plugin.DefaultPluginManager.getCo nfiguredMojo(DefaultPluginManager.java:679)
at org.apache.maven.plugin.DefaultPluginManager.execu teMojo(DefaultPluginManager.java:468)
at org.apache.maven.lifecycle.DefaultLifecycleExecuto r.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/maven/shared/osgi/Maven2OsgiConverter;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.jav a:2291)
at java.lang.Class.getDeclaredField(Class.java:1880)
at hidden.org.codehaus.plexus.util.ReflectionUtils.ge tFieldByNameIncludingSuperclasses(ReflectionUtils. java:47)
at org.codehaus.plexus.component.composition.FieldCom ponentComposer.getFieldByName(FieldComponentCompos er.java:212)
at org.codehaus.plexus.component.composition.FieldCom ponentComposer.findMatchingField(FieldComponentCom poser.java:171)
at org.codehaus.plexus.component.composition.FieldCom ponentComposer.assembleComponent(FieldComponentCom poser.java:62)
at org.codehaus.plexus.component.composition.DefaultC omponentComposerManager.assembleComponent(DefaultC omponentComposerManager.java:68)
at org.codehaus.plexus.DefaultPlexusContainer.compose Component(DefaultPlexusContainer.java:1486)
at org.codehaus.plexus.personality.plexus.lifecycle.p hase.CompositionPhase.execute(CompositionPhase.jav a:29)
at org.codehaus.plexus.lifecycle.AbstractLifecycleHan dler.start(AbstractLifecycleHandler.java:101)
at org.codehaus.plexus.component.manager.AbstractComp onentManager.startComponentLifecycle(AbstractCompo nentManager.java:105)
at org.codehaus.plexus.component.manager.AbstractComp onentManager.createComponentInstance(AbstractCompo nentManager.java:95)
at org.codehaus.plexus.component.manager.PerLookupCom ponentManager.getComponent(PerLookupComponentManag er.java:48)
at org.codehaus.plexus.DefaultPlexusContainer.lookup( DefaultPlexusContainer.java:331)
at org.codehaus.plexus.DefaultPlexusContainer.lookup( DefaultPlexusContainer.java:440)
at org.apache.maven.plugin.DefaultPluginManager.getCo nfiguredMojo(DefaultPluginManager.java:652)
... 19 more
Caused by: java.lang.ClassNotFoundException: org.apache.maven.shared.osgi.Maven2OsgiConverter
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
at org.codehaus.classworlds.RealmClassLoader.loadClas sDirect(RealmClassLoader.java:195)
at org.codehaus.classworlds.DefaultClassRealm.loadCla ss(DefaultClassRealm.java:255)
at org.codehaus.classworlds.DefaultClassRealm.loadCla ss(DefaultClassRealm.java:274)
at org.codehaus.classworlds.RealmClassLoader.loadClas s(RealmClassLoader.java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 52)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:320)
... 36 more
[INFO] ----------------------------------------------------------------------
[INFO] Total time: 29 minutes 36 seconds
[INFO] Finished at: Fri Dec 21 13:07:49 IST 2012
[INFO] Final Memory: 13M/23M
[INFO] ----------------------------------------------------------------------
Complete log output of downloading process can be seen here - http://neelamsharma.s3.amazonaws.com/Maven_Result-2.2.1.txt
I am removing local repository ".m2" folder from my user each time before restart build. I have tried to download on different OS but it always stuck at same error.
Can anybody please let me know what settings are changed that I need to update ? Or which repositories need to remove to get rid of this error?Looks like there is some sun plugin being used there. Might be that you need the java.net nexus repository so maven can fetch plugin dependencies from it.
-
Failed to build Java Mail API 1.4.5 with maven-3.0.4
Hi,
I am trying to build Java Mail 1.4.5 with Maven-3.0.4 using default settings of maven.
It is getting failed to build due to following errors -
[ERROR] COMPILATION ERROR :
[INFO] -----------------------------------------------------------
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[210,37] cannot find symbol
symbol : variable Version
location: class javax.mail.Session
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[369,47] cannot find symbol
symbol : variable Version
location: class javax.mail.Session
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[913,29] cannot find symbol
symbol : variable Version
location: class javax.mail.Session
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[916,29] cannot find symbol
symbol : variable Version
location: class javax.mail.Session
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[919,29] cannot find symbol
symbol : variable Version
location: class javax.mail.Session
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[922,29] cannot find symbol
symbol : variable Version
location: class javax.mail.Session
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[925,29] cannot find symbol
symbol : variable Version
location: class javax.mail.Session
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[928,29] cannot find symbol
symbol : variable Version
location: class javax.mail.Session
[INFO] 8 errors
[INFO] -----------------------------------------------------------
[INFO] ----------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ----------------------------------------------------------------------
[INFO] Total time: 1:51.197s
[INFO] Finished at: Tue Jan 08 13:06:01 IST 2013
[INFO] Final Memory: 12M/67M
[INFO] ----------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
3.2:compile (default-compile) on project javax.mail: Compilation failure: Compil
ation failure:
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[210,37] cannot find symbol
[ERROR] symbol : variable Version
[ERROR] location: class javax.mail.Session
[ERROR]\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[369,47] cannot find symbol
[ERROR] symbol : variable Version
[ERROR] location: class javax.mail.Session
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[913,29] cannot find symbol
[ERROR] symbol : variable Version
[ERROR] location: class javax.mail.Session
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[916,29] cannot find symbol
[ERROR] symbol : variable Version
[ERROR] location: class javax.mail.Session
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[919,29] cannot find symbol
[ERROR] symbol : variable Version
[ERROR] location: class javax.mail.Session
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[922,29] cannot find symbol
[ERROR] symbol : variable Version
[ERROR] location: class javax.mail.Session
[ERROR]\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[925,29] cannot find symbol
[ERROR] symbol : variable Version
[ERROR] location: class javax.mail.Session
[ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[928,29] cannot find symbol
[ERROR] symbol : variable Version
[ERROR] location: class javax.mail.Session
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
rg.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on
project javax.mail: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation fail
ure
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompiler
Mojo.java:656)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209)
... 19 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureExceptionSame issue I am facing when I am trying to build Java Mail with netbeans - 7.2.1, it getting failed with same version issue in Session.java class.
How can I set this Version in Session.java class to get rid of this error?
If we can use nexus repository then please let me know how to set this.
Thanks,
Neelam SharmaI answered this question here:
http://stackoverflow.com/questions/14217596/failed-to-build-java-mail-api-1-4-5-with-maven-3-0-4/14288418#14288418 -
Hi
I m using struts with session and entity beans.Actually i dont know the pattern how to call session bean from struts and from where the session bean is called.
Plz help me to guide in this direction.If possible tell me steps
bye from akbarHi
I m using struts with session and entity beans.Actually i dont know the pattern how to call session bean from struts and from where the session bean is called.
Plz help me to guide in this direction.If possible tell me steps
bye from akbar -
Hi.
I have upgraded from 1.5 APT to the 1.6 method of doing compile time annotations, and I am runing into a problem trying to build a jar containing my annotations processor.
I get the error from maven (mvn package)
[INFO] Compilation failure
error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider annotations.processing.processors.CodeAnnotationProcessor not found
I have the following directory structure
src
--main
----java
------annotations
--------processing
----------processors
------------CodeAnnotationProcessor.java
----------annotations
------------CodeAnnotation.java
----resources
------META-INF
--------service
----------javax.annotation.processing.Processor
I build this with the following with maven
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>mygroup</groupId>
<artifactId>annotations-processor</artifactId>
<packaging>jar</packaging>
<version>1.0.0</version>
<name>annotations-processor</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.4.2</version>
<scope>system</scope>
<systemPath>C:/Java/jdk1.6.0_10/lib/tools.jar</systemPath>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>The javax.annotation.processing.Processor file contains
annotations.processing.processors.CodeAnnotationProcessorAny my
package annotations.processing.processors;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.SupportedSourceVersion;
import javax.annotation.processing.SupportedAnnotationTypes;
import javax.lang.model.element.TypeElement;
import javax.lang.model.SourceVersion;
import java.util.Set;
@SupportedAnnotationTypes(
"annotations.processing.annotations.CodeAnnotation")
@SupportedSourceVersion(SourceVersion.RELEASE_6)
public class CodeAnnotationProcessor extends AbstractProcessor {
public boolean process(Set<? extends TypeElement> annotations,
RoundEnvironment roundEnv) {
return true;
}And my CodeAnnotation is as follows
package annotations.processing.annotations;
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.SOURCE)
public @interface CodeAnnotation {
}Milesy wrote:
Hi.
I have upgraded from 1.5 APT to the 1.6 method of doing compile time annotations, and I am runing into a problem trying to build a jar containing my annotations processor.
I get the error from maven (mvn package)
[INFO] Compilation failure
error: Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: Provider annotations.processing.processors.CodeAnnotationProcessor not foundFor me it worked when I used the settings
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<fork>true</fork>
<executable>${java.home}/../bin/javac</executable>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
</plugins>
...Forking the compiler is perhaps not the best option, but its just for the annotation processor. -
Good strategies for building ATG EAR with Maven?
It's been a while since I've looked at this. is there a clean set of choices for building an ATG-based EAR using Maven? Is the best we can do to use the antrun plugin, or is there a cleaner integration with Maven to do this? Is there reasonable documentation someone can point me to that details the strategies?
Yes while using Maven, chances are that we may end up using the Ant task for invoking ATG's runAssembler inside pom to build the EAR. While using the Ant task within Maven helps us accomplishing the task but we tend to loose the power of Maven that way. It would be better if we either use Ant for the whole stuff or just Maven without mixing them.
There is ATG DUST(Dynamo Unit and System Tests) framework for building JUnit tests for ATG applications which uses Maven.
http://atgdust.sourceforge.net/first-test.html
But I think DUST uses Maven just to build the JARs and does not uses ATG's assembler.
I have never tried it but you may want to take a look at this Maven plugin which seems to be capable of generating ATG based EAR.
http://jira.codehaus.org/browse/MOJO-1116
Although it seem to be not updated off late. The plugin page mentions ATG 7.1 while the latest ATG offering is 10.1.1 But I guess it might work with a recent ATG version also (may be with some tweaks) as I don't think there would have been any major changes in the way ATG's runAssembler works and generates ATG EAR. -
Struts with BC4J on JDeveloper903
We are developing a project using Struts with BC4J on JDeveloper903.
I understand every JSP Page needs a related Action class & Form bean. It makes sense to create a Form bean if you are doing any transactions like Add or Update b'cos you want to retain the state but for browse i don't have to retain the state. So i am planning only Action class for each JSP Page.
Does this approach have any disadvantage(s) ?
In other words,
Do i need to Create a Form bean for simple browse pages, we have so many browse pages ?
Thanks in advance.A form bean represents the logical notion of an input form (which may extend across several web pages and server requests). If you don't have to worry about receiving user input from a form, you don't need a form bean. It's perfectly fine to have action mappings and action classes that never involve a form bean.
Maybe you are looking for
-
Script to apply a random CMYK swatches from a group of swatches to selected objects.
I would like to write some scripts for randomising the allocation of swatches to adjacent object. Example: Imagine a map of Europe and all her nation states/territories. I have a User Defined Swatch Library. I can open the AI document it was made fro
-
Migrate to Oracle 9.2.0.5 or 9.2.0.6?
We are in the process of migrating (upgrading) several applications from current Oracle Db versions 8.1.7/9i/9.2.0.2 to Oracle 9.2.0.5. Most of the applications use 9.2.0.2 on Solaris 8. Few are on 8.1.7, solaris 8 and few on 9i on Tru-64 unix. We wo
-
Mail fonts reverting to Times, but sig remains true
Hi I have my mail message body font set to Trebuchet 11, which is the same as my email signature. However, on the vast majority of non-Mac Mail people I send mail to, any replies appear with my typed message in Times New Roman. This I would think is
-
Can't download pictures from camera
I have an HP PSA 1315V all in one printer and 2 days ago when I tried to get the pictures off my camera and go through the printer to put them on the computer it came up with an error message: The program has encountered an unexpected error: the type
-
Installing two different OSs...
Hello Mac Geniuses! My friend (who doesn't have the internet) has asked me how to install OS9 and OSX on his G4 dual Powermac (the only other spec I have for the computer is around 450mhz...). I think I know, but I don't want to screw anything up. He