Stuart McCulloch wrote:
2008/9/16 Sahoo <[EMAIL PROTECTED]>
I had sent this email to maven forum, but I think I may be able to get some
tips from felix forum as well because I am using maven-bundle-plugin. I must
say I am surprised as to how this is happening when I am using manifest goal
of bundle plugin. Any help is much appreciated.
another quick question - when this problem occurs, do the javax.servlet
classes also appear in the project's "target/classes" directory? if so then
the problem may lie somewhere else in the build (ie. classes somehow getting
copied into this directory earlier on and just happened to be picked up by
the jar-plugin which just jars whatever happens to be inside
"target/classes") rather than in the jar-plugin
I don't know the answer. I will keep it in mind when this happens again.
mvn -X output taken during a failed build kind of indicates that those
classes were there in target dir.
[DEBUG] Configuring mojo
'org.apache.maven.plugins:maven-jar-plugin:2.2:jar' -->
[DEBUG] (s) addDefaultSpecificationEntries = false
[DEBUG] (s) addDefaultImplementationEntries = false
[DEBUG] (s) manifest =
[EMAIL PROTECTED]
[DEBUG] (s) manifestFile =
/export/v3/v3/security/javax.security.jacc/target/classes/META-INF/MANIFEST.MF
[DEBUG] (f) archive =
[EMAIL PROTECTED]
[DEBUG] (f) classesDirectory =
/export/v3/v3/security/javax.security.jacc/target/classes
[DEBUG] (f) defaultManifestFile =
/export/v3/v3/security/javax.security.jacc/target/classes/META-INF/MANIFEST.MF
[DEBUG] (f) finalName = javax.security.jacc-10.0-SNAPSHOT
[DEBUG] (f) forceCreation = false
[DEBUG] (f) outputDirectory =
/export/v3/v3/security/javax.security.jacc/target
[DEBUG] (f) project = MavenProject:
org.glassfish:javax.security.jacc:10.0-SNAPSHOT @
/export/v3/v3/security/javax.security.jacc/pom.xml
[DEBUG] (f) useDefaultManifestFile = false
[DEBUG] -- end configuration --
[INFO] [jar:jar]
[DEBUG] isUp2date: false (Destination
/export/v3/v3/security/javax.security.jacc/target/javax.security.jacc-10.0-SNAPSHOT.jar
not found.)
[INFO] Building jar:
/export/v3/v3/security/javax.security.jacc/target/javax.security.jacc-10.0-SNAPSHOT.jar
[DEBUG] adding directory META-INF/
[DEBUG] adding entry META-INF/MANIFEST.MF
[DEBUG] adding directory javax/
[DEBUG] adding directory javax/security/
[DEBUG] adding directory javax/security/jacc/
[DEBUG] adding directory javax/servlet/
[DEBUG] adding directory javax/servlet/http/
[DEBUG] adding entry META-INF/LICENSE.txt
[DEBUG] adding entry META-INF/LICENSE.txt
[DEBUG] adding entry javax/security/jacc/PolicyConfigurationFactory$1.class
[DEBUG] adding entry javax/security/jacc/PolicyConfigurationFactory.class
[DEBUG] adding entry javax/security/jacc/PolicyContextException.class
[DEBUG] adding entry javax/security/jacc/PolicyConfiguration.class
[DEBUG] adding entry javax/security/jacc/URLPattern.class
[DEBUG] adding entry javax/security/jacc/EJBRoleRefPermission.class
[DEBUG] adding entry javax/security/jacc/EJBMethodPermission.class
[DEBUG] adding entry javax/security/jacc/WebResourcePermission.class
[DEBUG] adding entry javax/security/jacc/HttpMethodSpec.class
[DEBUG] adding entry javax/security/jacc/URLPatternSpec.class
[DEBUG] adding entry javax/security/jacc/WebRoleRefPermission.class
[DEBUG] adding entry javax/security/jacc/PolicyContext.class
[DEBUG] adding entry javax/security/jacc/PolicyContextHandler.class
[DEBUG] adding entry javax/security/jacc/WebUserDataPermission.class
[DEBUG] adding entry javax/servlet/http/HttpServletRequest.class
[DEBUG] adding entry javax/servlet/http/Cookie.class
[DEBUG] adding entry javax/servlet/http/HttpSession.class
[DEBUG] adding entry javax/servlet/http/HttpSessionContext.class
[DEBUG] adding entry javax/servlet/ServletRequest.class
[DEBUG] adding entry javax/servlet/ServletInputStream.class
[DEBUG] adding entry javax/servlet/RequestDispatcher.class
[DEBUG] adding entry javax/servlet/ServletContext.class
[DEBUG] adding entry javax/servlet/ServletResponse.class
[DEBUG] adding entry javax/servlet/ServletException.class
[DEBUG] adding entry javax/servlet/Servlet.class
[DEBUG] adding entry javax/servlet/ServletOutputStream.class
[DEBUG] adding entry javax/servlet/ServletConfig.class
[DEBUG] adding directory META-INF/maven/
[DEBUG] adding directory META-INF/maven/org.glassfish/
[DEBUG] adding directory META-INF/maven/org.glassfish/javax.security.jacc/
[DEBUG] adding entry
META-INF/maven/org.glassfish/javax.security.jacc/pom.xml
[DEBUG] adding entry
META-INF/maven/org.glassfish/javax.security.jacc/pom.properties
[INFO] Preparing source:jar
...
Thanks,
Sahoo
Thanks,
Sahoo
We are experiencing an issue in our build system and it is not happening
for every one. I used to think it only happens for mvn 2.0.8, but just now a
developer told me that they see it mvn 2.0.7 as well. For whatever reason,
sometimes, a jar artifact is containing not only the classes compiled from
the sources that are part of that artifact, it also contains dependent
.class files. It is a very serious problem for us. Given below is the
artifact that's causing trouble.
<project ...>
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.glassfish</groupId>
<artifactId>api-pom</artifactId>
<version>10.0-SNAPSHOT</version>
</parent>
<artifactId>javax.security.jacc</artifactId>
<packaging>jar</packaging>
<name>javax.security.jacc API v.1.2</name>
<dependencies>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.servlet</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
As you can see, it depends on org.glassfish:javax.servlet:10.0-SNAPSHOT,
which is a jar type artifact and contains javax.servlet classes. I can
assure you that in the source tree of javax.security.jacc module, there is
no javax.servlet class. Yet, javax.security.jacc-10.0-SNAPSHOT.jar contains
a bunch of javax.servlet classes. I should also state that it only happens
when both javax.servlet module and javax.security.jacc module are part of
same maven reactor. The build log produced with -X option is quite large, so
I am supplying log for jacc module portion only. Pl. see the attachment
called build.all.jacc.log. I will be happy to supply more of it if need be.
I should say, I don't understand something from the log file. I am
highlighting it here with bold letters:
[INFO] Reactor build order:
...
[INFO] javax.servlet API v.3.0
[INFO] javax.security.jacc API v.1.2
...
[INFO]
------------------------------------------------------------------------
[INFO] Building javax.servlet API v.3.0
[INFO] task-segment: [clean, install]
[INFO]
------------------------------------------------------------------------
...
[INFO] Installing
/export/v3/v3/web/javax.servlet/target/javax.servlet-10.0-SNAPSHOT-sources.jar
to
/home/mvatkina/.m2/repository/org/glassfish/javax.servlet/10.0-SNAPSHOT/javax.servlet-10.0-SNAPSHOT-sources.jar
[INFO]
------------------------------------------------------------------------
[INFO] Building javax.security.jacc API v.1.2
[INFO] task-segment: [clean, install]
[INFO]
------------------------------------------------------------------------
...
[INFO] [clean:clean]
[INFO] Deleting directory /export/v3/v3/security/javax.security.jacc/target
[DEBUG] org.glassfish:javax.security.jacc:jar:10.0-SNAPSHOT (selected for
null)
[DEBUG] junit:junit:jar:4.3.1:test (selected for test)
[DEBUG] active project artifact:
* artifact = org.glassfish:javax.servlet:jar:10.0-SNAPSHOT:compile;
project: MavenProject: org.glassfish:javax.servlet:10.0-SNAPSHOT @
/export/v3/v3/web/javax.servlet/pom.xml (selected for compile)
*
What does this active project artifact mean? By looking at the attached log
file, do you have any suggestion for me?
Thanks,
Sahoo
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]